Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Slideout JavaScript Document
- jQuery(document).ready(function() {
- // Hide the Slide Out
- jQuery('.slide_out_content').css({display: 'none'});
- // Put hand there for hover
- jQuery('.slide_out_normal').css({
- cursor: 'pointer',
- });
- // On click event
- jQuery('.slide_out_normal').each(function()
- {
- jQuery(this).click(function()
- {
- var target = jQuery(this).parent().find('.slide_out_content');
- var backgroundpos = jQuery('.up-down',this).css('background-position');
- var t = this;
- jQuery(target).animate({height: 'toggle'},
- 350,
- function()
- {
- if (backgroundpos == '-24px 0px')
- {
- jQuery(t).find('.up-down').css('background-position', '0px');
- jQuery('.slide_out_normal').css('background-position', '100% 0');
- }
- else
- {
- jQuery(t).find('.up-down').css('background-position', '-24px 0px');
- jQuery('.slide_out_normal').css('background-position', '0px');
- }
- });
- });
- });
- // Close Doc Ready
- });
Add Comment
Please, Sign In to add comment