PDA

View Full Version : gAjax RSS ticker > Fade effect & styles



vanhaus
01-28-2012, 02:32 AM
1) Script Title: gAjax RSS ticker

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex18/gajaxrssticker.htm

3) Describe problem: 1) I would like to put a line break after the title so that the other labels (date, id, etc) appear on the next line below. I'd like to format like title(new line)id, date(new line)snippet. Just wondering the best way to implement this? 2) How to add fade in/out effects to the feeds? 3) Is it difficult to limit the number of characters displayed in the titles or snippets with three dots ... trailing to indicate more? I notice that the text has a tendency to spill outside the div. 4) If RSS feeds have images...how to get them into the feed so that all images fit into predefined size either by width or height. 5) How to change the font size of the snippet text?

That's a lot of stuff, I know. But I'm thinking other might have similar ideas. Thanks for your help on this.

ddadmin
01-30-2012, 07:55 PM
Hi:
To answer your questions:

1) The most robust way to change the format of the ouput is just to directly modify function formatrssmessage() inside the .js file. For example, to add a line break after the title and label elements, you might try adding the code in red below to the following line:


rssoutput+=itemcontainer + itemtitle + " " + itemlabel + "<br /> " + itemdate + "\n" + itemdescription + itemcontainer.replace("<", "</") + "\n\n"

For 2) and 3), try the below modified .js file, which adds a fade in/out effect, plus adds an ellipsis to titles greater than 15 characters (to change 15 to another number, just search for "15" inside the .js file.

For 4/5, you should be able to do this just by using CSS to target the relevant sections within each RSS item. If you need additional help let me know.