Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/86.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 显示rss jquery中的全屏img_Javascript_Jquery_Html_Parsing_Rss - Fatal编程技术网

Javascript 显示rss jquery中的全屏img

Javascript 显示rss jquery中的全屏img,javascript,jquery,html,parsing,rss,Javascript,Jquery,Html,Parsing,Rss,我正在搜索一个示例,介绍如何在单击img元素时全屏显示它。 有人有主意吗 下面是一个rssfeed iparse的示例 <channel> <description><![CDATA[<ul> <li> Some text </li> some more text </ul> <div align="center"> <iframe width="420" height="31

我正在搜索一个示例,介绍如何在单击
img
元素时全屏显示它。 有人有主意吗

下面是一个
rss
feed i
parse
的示例

<channel>
<description><![CDATA[<ul>
  <li>
    Some text
  </li>
  some more text
</ul>
<div align="center">
  <iframe width="420" height="315" src="//www.youtube.com/embed/Xo73N23PJUw" frameborder="0" allowfullscreen></iframe>
  <img src="http://www.123.gr/diafora/2014/sakis-03-06-14.jpg" border="0"></a>
</div>
</description>
</channel>

  • 一些文本
  • 更多的文字
    还有我的密码

                 <?php 
                    $html = "";
                    $url = "http://123.gr/index.php?format=feed&type=rss";
                    $xml = file_get_contents($url);
                    $x = new SimpleXmlElement($xml);
    
    
    
    foreach ( $x->channel->item as $entry ){
                     ?>
                            }
                        <div data-role="collapsible" data-theme="b">
                            <h4><?php echo $entry->title; ?></h4>
                            <p><?php  echo $entry->description; ?></p>
                        </div>
    <?php { ?>
    
    
    }
    


    这样就可以了。如果你有额外的像素,也可以尝试重置边距和填充

    .fullSize {
        top:0;
        left:0;
        position:absolute;
        width:100%;
        height:100%;
    }
    

    我正试图创造这样的东西,但我不知道这是否可能

    $entry->description = str_replace( '<img/i' , '<img id="imgtab" ', $entry->description);
    

    $entry->description=str\u replace('fullSize是一个类。

    你的意思是这样的吗?我不认为这是我要找的。在你发送的小提琴上,我刚刚修改了fullSize类,看看我发布的答案。小提琴只是我希望rss中的'img'元素看起来像什么的一个例子

    <script>
                $(document).ready(function () {
                $("#imgtab").toggle(function () { //fired the first time
                $("#imgtab").animate({
                    width: "1200px",
                    height: "1116px"
                });
                }, function () { // fired the second time 
                $("#imgtab").animate({
                    width:  "100%",
                    height: "100%"
                });
                });
                });
            </script>