Solved

jquery no conflict

Posted on 2012-03-28
3
828 Views
Last Modified: 2012-03-28
Test page http://www.mistletoebay.co.nz/sandpit/test.php
My page was bug free until I added an accordion script that used var $j = jQuery.noConflict();
Since then I am receiving an Object expected error on line 34. The page still works fine however it would be great to resolve this issue.
can anyone suggest a fix?
Cheers,
N
0
Comment
Question by:Neil_Bradley
  • 2
3 Comments
 
LVL 82

Accepted Solution

by:
leakim971 earned 500 total points
ID: 37779893
replace :
        </script>
		<script type="text/javascript">
		$(function () {
			$('#slideshow-common img').hide();//hide all the images on the page
		});		
		var i = 0;//initialize
		var int=0;//Internet Explorer Fix
		$(window).bind("load", function() {//The load event will only fire if the entire page or document is fully loaded
			var int = setInterval("doThis(i)",500);//500 is the fade in speed in milliseconds
		});
		function doThis() {
			
			var imgs = $('#slideshow-common img').length;//count the number of images on the page
			if (i >= imgs) {// Loop the images
				clearInterval(int);//When it reaches the last image the loop ends
			}
			$('#slideshow-common img:hidden').eq(0).fadeIn(500);//fades in the hidden images one by one
			i++;//add 1 to the count
			
			$('#slideshow-common').removeClass('image-holder')
		}
	</script>

Open in new window

by :
        </script>
		<script type="text/javascript">
		jQuery(function () {
			jQuery('#slideshow-common img').hide();//hide all the images on the page
		});		
		var i = 0;//initialize
		var int=0;//Internet Explorer Fix
		jQuery(window).bind("load", function() {//The load event will only fire if the entire page or document is fully loaded
			var int = setInterval("doThis(i)",500);//500 is the fade in speed in milliseconds
		});
		function doThis() {
			
			var imgs = jQuery('#slideshow-common img').length;//count the number of images on the page
			if (i >= imgs) {// Loop the images
				clearInterval(int);//When it reaches the last image the loop ends
			}
			jQuery('#slideshow-common img:hidden').eq(0).fadeIn(500);//fades in the hidden images one by one
			i++;//add 1 to the count
			
			jQuery('#slideshow-common').removeClass('image-holder')
		}
	</script>

Open in new window

0
 
LVL 82

Expert Comment

by:leakim971
ID: 37779895
You've a 404 error for this file : http://www.mistletoebay.co.nz/sandpit/js/easyTooltip.js
0
 
LVL 5

Author Closing Comment

by:Neil_Bradley
ID: 37779925
A++ for that one!
Huge thank you the the fast and perfect solution.
Cheers,
N
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Having worked on larger scale sites, we found out that you are bound to look at more scalable solutions to integrating widgets, code snippets or complete applications and mesh them into functional sites, in any given composition. To share some of…
JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
Learn the basics of lists in Python. Lists, as their name suggests, are a means for ordering and storing values. : Lists are declared using brackets; for example: t = [1, 2, 3]: Lists may contain a mix of data types; for example: t = ['string', 1, T…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question