- Posts: 1
 - Thank you received: 0
 
Are you enjoying the extensions? Did you like the support? Help others decide.
Leave a reviewPlease Log in or Create an account to join the conversation.
(function($) {	
	$.fn.animate = function(options) {
	
		var defaults = {
			speed: 1000,
			pause: 3000
		};
		
		var options = $.extend(defaults, options);
		
		this.each(function() {
			var obj = $(this);
			// possible code here on obj
					    
		    	var timer = setInterval(function() {
		    		animateopener();
		    	}, options.pause);
	     		
	     		// Pause the animation on mouse over    
		    	obj.hover(
		        	function () {
		            		clearInterval(timer);  
		        	}, 
		        	function () {
		            		timer = setInterval(function(){
						animateopener();
					}, options.pause);        
		        	}
		   	);
		
			function animateopener() {
				// your code here
			};
		});
	};	
})(jQuery);
jQuery(document).ready(function($) {
	$("some html element here").animate({
		speed: 1000,
		pause: 3000
	});
});Please Log in or Create an account to join the conversation.

Simplify Your Web is not affiliated with or endorsed by The Joomla! Project™ or Open Source Matters.
The Joomla!® name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.