- This topic is empty.
Viewing 6 posts - 1 through 6 (of 6 total)
Viewing 6 posts - 1 through 6 (of 6 total)
- The forum ‘JavaScript’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Home › Forums › JavaScript › Possible to use several Javascript codes on one page?
I´m very new to Javascript- is it possible to have multiple functions on one page. For example, an image rotator with one type of script, and a dynamic navigation section?
The two elements I want to combine are these: http://www.jeremymartin.name/examples/kwicks.php?example=1
and a simple image rotator: http://www.serie3.info/s3slider/
I´ve tried to put them on the same page, but one overrides the other.
Probably really simple, but I´m very new to Jquery.
Thanks.
You can have as many functions on a page as you want. Make sure there are no conflicting variables or functions. Can you provide the exact code so I can tell you what is wrong with it and how to correct?
This is the page of Javascript. The slider is at the top, and the Kwicks changer at the bottom.
Sure it´s something really simple. But when I put these two together, the image slider stops working- some sort of conflict. As I say, I´ve just started using Javascript.
Many thanks.
Your top script tag has no type attribute.
Put them both in the same script tag at the bottom of the page if you please. It also looks like you have a link to the jquery library twice in there, if that’s the same page.
Also, try to use the most current jQuery version.
jQuery-1.2.6 is quite old. It could be causing some problems as well.
Thanks for that guys. Really helpful.
School boy errors as I thought!!