Speed up your Oxygen workflow

with Hydrogen Pack

A true Oxygens Editor Enhancer
Starts from $19.99

Slide toggle with jQuery

Expand object with click on the button.

The trigger is class on the object that will start the animation. Assign the class to the object that should be animated and replace 300 (milliseconds) to what you prefer

$( ".trigger" ).click(function() {
	$( ".toggled-object" ).slideToggle(300);
});

Wrap this with document ready code.

(function($){

    $(function() {

	// Your custom code here
		
    });

})(jQuery);

The final code should look like this

(function($){

    $(function() {

		$( ".trigger" ).click(function() {
			$( ".toggled-object" ).slideToggle(300);
		});
		
    });

})(jQuery);

If you need help with custom scripts or you are not skilled enough to implement something from the tutorial?

HIRE ME

Stay up to date with latest post and updates.