Using JQuery to Change Content

skunk1311

New Member
I have a JQuery function that changes the content being displayed based on what slide you want to view. You click one of three circles and then it changes, kind of like a slideshow. But, the only problem is that you HAVE to click one of the circles in order to change the content. I would like to also have a JQUERY function that causes the desired content to slide through automatically, maybe with some animation. How can I automate my code? Live Website: http://www.getstatewideroofing.comJSFIDDLE: http://jsfiddle.net/h5wVc/4/My JQUERY (I am using 1.8.2):\[code\]$(document).ready(function() {$('.circle1').click(function () { $('#slideshow img').replaceWith('<img src="http://stackoverflow.com/questions/15577255/images/roof.png"/>'); $('#slideshow-bottom p').replaceWith('<p> Some text </p>');});$('.circle2').click(function () { $('#slideshow img').replaceWith('<img src="https://sphotos-a.xx.fbcdn.net/hphotos-ash4/313870_456560374416571_509297138_n.jpg"/>'); $('#slideshow-bottom p').replaceWith('<p>Some text</p>');});$('.circle3').click(function () { $('#slideshow img').replaceWith('<img src="http://i.imgur.com/1hxQNiw.jpg"/>'); $('#slideshow-bottom p').replaceWith('<p>Some text</p>');});});\[/code\]
 
Back
Top