jQuery show() function display inline block. How? -
I have some such code
function switch_tabs (obj) {$ ('. Hide tab-content ') (); $ ('Tabs A'). RemoveClass ("Selected"); Var id = obj.attr ("rel"); $ ('#' + ID) .show (); Obj.addClass ("selected"); }
The function shows the display: block but I want to add the display: inline block instead of block
Can anyone help me? Thanks
instead of showing
, using CSS to hide and show Try Content
function switch_tabs (obj) {$ ('tab-content'). CSS ('display', 'none'); // You can still use `.hide () '$ $ ('. Tab A '). RemoveClass ("Selected"); Var id = obj.attr ("rel"); $ ('#' + ID). CSS ('display', 'inline-block'); Obj.addClass ("selected"); }
Comments
Post a Comment