I was working on a problem where I needed to change the text in a menu to be the name of the department, then the phone number to the department. Both of which had to be a link to the department’s page. I figured that this would be very easy in JQuery. It took a bit of time, but I figured out a fairly easy solution. I figured out a few things along the way.
The final solution involved making an array that held the two sets of html for the menu item. I incremented a counter and modded by the number of items in the array to get the next one to display. Then I faded out the anchor tag within the item, changed the html of the now faded anchor to some html that was set to display:none, then faded in the anchor within the list item. I surrounded that with a set interval.
sheltonn March 7th, 2011
Posted In: JQuery