Open Feed Ticker links in Lightbox
How to Use DMXzone Lightbox to Display the Results of my Feed Ticker?
Question
How can I show Feed Ticker links within a Lightbox window when clicked?
Answer
First create a page, place some text inside and add a Lightbox Link to it. You need to do this in order for DMXzone Lightbox to add its functionality on your page. After applying the Lightbox link you can delete this text, because the files needed for DMXzone Lightbox to work properly are placed on your page.
Now, add Feed Ticker, adjust its settings as you need and open the code view of your Dreamweaver. Find the following piece of code:
<script language="JavaScript" type="text/javascript">
// <![CDATA[
$(function(){$("#dmxFeed1").dmxFeedTicker({
feeds : [
{
url : "http://www.yourfeedurl.com/rss.php",
title : "FeedName"
}
],
orientation : "ver",
thumbSize : 2,
displayType : "auto",
linkTarget : "_blank",
fetchItems : 6,
showItems : 3,
timeout : 4000,
speed : 1000,
pause : 0,
fx : "fade",
cleartype : 1
})});
// ]]>
</script>
All you have to do now is to replace
linkTarget : "_blank",
withlinkTarget : "dmxLightbox",
andcleartype : 1
withcleartype : 1,
after : (function anonymous() {jQuery("#dmxFeed1 a[target='dmxLightbox']").dmxLightbox();})
Your code should look similar to this:
<script language="JavaScript" type="text/javascript">
// <![CDATA[
$(function(){$("#dmxFeed1").dmxFeedTicker({
feeds : [
{
url : "http://www.yourfeedurl.com/rss.php",
title : "FeedName"
}
],
orientation : "ver",
thumbSize : 2,
displayType : "auto",
linkTarget : "dmxLightbox",
fetchItems : 6,
showItems : 3,
timeout : 4000,
speed : 1000,
pause : 0,
fx : "fade",
cleartype : 1,
after : (function anonymous() {jQuery("#dmxFeed1 a[target='dmxLightbox']").dmxLightbox();})
})});
// ]]>
</script>
Note: Make sure the id of the Feedticker (in the example above #dmxFeed1) is the same in the first and in the last lines of your code!
Comments
Be the first to write a comment
You must me logged in to write a comment.