PDA

View Full Version : gAjax RSS Pausing Scroller: Sorting in reverse order



zrodimel
08-23-2009, 07:58 PM
1) Script Title: gAjax RSS Pausing Scroller

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

3) Describe problem: Hi, I am not much of a coder and can't seem to figure out how to do what I need to do. I used the gAjax Rss Pausing Scroller to create an event scroller for a website. However, I want to be able to change it so that it shows oldest events first instead of showing the newest events by date first. It is for a school so it makes sense to show older (or closer to the current date) events before ones that will be later on in the year. So, all i really need to do it somehow reverse the order in which it pulls the and displays the feed from google calendar. Does anybody know how to do that? Thanks. An example of it scrolling in the wrong order can be found at http://www.wcs.k12.in.us

Thanks again!

ddadmin
08-24-2009, 06:13 AM
Sure, try finding the following line inside gfeedfetcher.js, and add to it the line in red:


arr.sort(function(a,b){return new Date(b.publishedDate)-new Date(a.publishedDate)})
arr.reverse()