jquery - Updating CSS property dynamically -
$("div.ttt").css('display','block');
i have filter empties forst column float:left, when column empty want update second column css style float:left, want align left if left column empty. in fillde kind of have high level of code, how using jquery, trying do: if(!$('.ab div.ttt').css('display') == 'block'){
- select if not of elements have display:block
change style of .cd (second column) not work, need reset once items in left column..i filter out items in left , right depending on input.
try this:
var ttt = $(".ab div.ttt"), cd = $(".col.cd"); $("div#test").click(function () { if (ttt.is(':visible')) { ttt.hide(); cd.css('float', 'left'); } else { ttt.show(); cd.css('float', 'right'); } });
Comments
Post a Comment