View Full Version : gAjax RSS Feeds Displayer

05-13-2008, 09:10 AM
1) Script Title: gAjax RSS Feeds Displayer (hosted

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

3) Describe problem:

Is it possible to get rid of the ID and only use classes?

The reason I want this is that I need to put several Feeds on one page.
I cant do this by editing the css because there will be some submission by users.

05-13-2008, 10:05 PM
The easiest way is just to automatically generate a unique random ID to pass in as the 1st parameter of the script. For example:

var cssfeed=new gfeedfetcher('rss'+Math.floor(Math.random()*100), "example1class", "")

The same code in red can be used repeatedly as is.

05-14-2008, 02:59 AM
Thanks, that works fine.
But now this css is missing:

#example1 a{ /*CSS specific to demo 3*/
text-decoration: underline;
font-weight: bold;

#example1 p{ /*CSS specific to demo 3*/
margin-bottom: 2px;

How do I put this inside a DIV like: <div style="css here">?

05-14-2008, 03:09 AM
Why not just use the CSS class name portion to style each feed individually? In other words:

var cssfeed=new gfeedfetcher('rss'+Math.floor(Math.random()*100), "example1class", "")

You'd assign a different CSS class (code in red) to each feed instance, and in your CSS, style those classes.