You will recieve your password to this address. Address is not made public.

Your preferred username that is used when logging in.

Expose and add padding to the expose area? Created Jun 8, 2009

This thread is solved

Views: 2587     Replies: 8     Last reply Dec 31, 2011  
You must login first before you can use this feature

arash

Posts: 2

Registered:
Jun 8, 2009

Expose and add padding to the expose area?

Posted: Jun 8, 2009

Hi! Is it possible to add a padding to the surrounding expose area of an exposed element?

I.e. like:

$('#ExposeMe').expose({padding:10}).load

...resulting in...


+-------------------+
|ppppppppppppppppppp|
|p+---------------+p|
|p|  #ExposeMe    |p|
|p+---------------+p|
|ppppppppppppppppppp|
+-------------------+

An element I am trying to expose has no padding by itself (and should not have padding or otherwise the design would break) and it looks strange, when it is lightboxed without padding.

Thank you!
Arash

Tero
Author of jQuery Tools and this website + JavaScript developer of Flowplayer.

Posts: 1867

Registered:
Nov 16, 2007

» Expose and add padding to the expose area?

Posted: Jun 9, 2009

Reply to: Expose and add padding to the expose area?, from arash
Yes. This is possible. Here is an example code:


$("#ExposeMe").expose({
  api:true, 
  onBeforeLoad: function() {
     this.getExposed().animate({padding: 30});
  }, 

  onBeforeClose: function() {
     this.getExposed().animate({padding: 0});
  }
}).load();

jamesxchance

Posts: 2

Registered:
Jan 16, 2011

» » Expose and add padding to the expose area?

Posted: Jan 16, 2011

Reply to: » Expose and add padding to the expose area?, from tipiirai
Is there a way to make the expose animation expand to the left instead of the right.