Advertisement
hogash

Horizontal fix for ammon

Feb 24th, 2012
161
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. //horizontal scroll fix - place it at the very bottom of the js file.
  2. (function($){
  3. $(window).live('resize', outlineFix());
  4.  
  5. function outlineFix(){
  6. var w = $(window).width(),
  7. $obj = $('.right-outline, #header.style3 ul.menu');
  8. $obj.each(function(index, element) {
  9. var $this = $(this),
  10. wid = $this.width(),
  11. pos = $this.offset().left,
  12. r = w - pos - wid - 20;
  13. $this.css({ 'padding-right' : r+'px', 'margin-right': '-'+r+'px' })
  14. });
  15. return;
  16. }
  17. $(window).load(function(){
  18. outlineFix();
  19. });
  20. })(jQuery);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement