javascript - How to i append CSS values in a dynamic table -


i'm using gwt table being generate dynamically lots of columns out horizontal scroll bar , scrollbar, need wrapper fixed width around table. gwt create container not adding width it.

to solve problem, i'm calculating width of screen , adding table wrapper, adding scroll bar table working weirdly.

  1. it adds scroll bar when move mouse near table
  2. it doesn't work when in resize table

i'm using live() works run time objects can't use click event.

here code.

$(function() {     var screenwidth = $(window).width();     $('body').live("mouseover", function() {         $('.scrollbar').css({             'width' : (screenwidth) - 40         });         $("body").unbind("mouseover");     }); }); 

  1. use $('body').on("mouseover") if getting scrollbar can handle setting overflow none. if need change css dynamically can add / remove class , keep css separate code. practice.

Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -