Don't assume $ is jQuery. Rely on jQuery global instead.
				
					
				
			This commit is contained in:
		| @@ -8,19 +8,21 @@ | |||||||
|  * 8/17/2011 |  * 8/17/2011 | ||||||
|  */ |  */ | ||||||
|  |  | ||||||
| $('body').on('click', 'ul.tabs > li > a', function(e) { | jQuery(function ($) { | ||||||
|   //Get Location of tab's content |   $('body').on('click', 'ul.tabs > li > a', function(e) { | ||||||
|   var contentLocation = $(this).attr('href'); |     //Get Location of tab's content | ||||||
|  |     var contentLocation = $(this).attr('href'); | ||||||
|  |  | ||||||
|   //Let go if not a hashed one |     //Let go if not a hashed one | ||||||
|   if(contentLocation.charAt(0)=="#") { |     if(contentLocation.charAt(0)=="#") { | ||||||
|     e.preventDefault(); |       e.preventDefault(); | ||||||
|  |  | ||||||
|     //Make Tab Active |       //Make Tab Active | ||||||
|     $(this).parent().siblings().children('a').removeClass('active'); |       $(this).parent().siblings().children('a').removeClass('active'); | ||||||
|     $(this).addClass('active'); |       $(this).addClass('active'); | ||||||
|  |  | ||||||
|     //Show Tab Content & add active class |       //Show Tab Content & add active class | ||||||
|     $(contentLocation).show().addClass('active').siblings().hide().removeClass('active'); |       $(contentLocation).show().addClass('active').siblings().hide().removeClass('active'); | ||||||
|   } |     } | ||||||
|  |   }); | ||||||
| }); | }); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user