Results 1 to 4 of 4

Thread: gAjax RSS Feeds Displayer

  1. #1
    Join Date
    Oct 2007
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default gAjax RSS Feeds Displayer

    1) Script Title: gAjax RSS Feeds Displayer (hosted

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...sdisplayer.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.

  2. #2
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    The easiest way is just to automatically generate a unique random ID to pass in as the 1st parameter of the script. For example:

    Code:
    var cssfeed=new gfeedfetcher('rss'+Math.floor(Math.random()*100), "example1class", "")
    The same code in red can be used repeatedly as is.

  3. #3
    Join Date
    Oct 2007
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks, that works fine.
    But now this css is missing:
    Code:
    #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">?

  4. #4
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Why not just use the CSS class name portion to style each feed individually? In other words:

    Code:
    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.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •