开发者

Using Light box with SimplePie

Im working on a project that uses SimplePie to to pull in a number of news feeds which is working great, but I would like the SP links to open the page on site in a LightBox, how can I do this?

The code that Im using to generate the SP links is as follows:

       <?php if ($feed->error): ?>
      <p><?php echo $feed->error; ?></p>
    <?php endif; ?>

    <?php foreach ($feed->get_items() as $item): ?>

        <div class="chunk">

        <div class="time-stamp">
        <?php echo $item->get_date('j M Y | g:i a T'); ?></p>
        </div>


            <h4 <style="background:url(<?php $feed = $item->get_feed(); ?>) no-repeat; margin: 0 0 10px;"><a href="<?php echo开发者_JAVA技巧 $item->get_permalink();  ?>"><?php echo $item->get_title(); ?></a></h4>

Any help that you can give me would be great, thanks.


Hey hi, You can use this JQuery plugin http://colorpowered.com/colorbox/ Its a very good one.

For your code, you will have to use something very simple like

<a class="cboxElement" href="<?php echo $item->get_permalink();  ?>"><?php echo $item->get_title(); ?></a>

Thanks, Akshat

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜