Solved

jquery no conflict

Posted on 2012-03-28
3
830 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

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

856 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