javascript - how to get width of ul on the base of class jquery? -
how can width of <ul> on class name class name unique each <ul>.
i don't want select id, rather class can reused,
my <ul> html is:
<ul id="cat-sec-bar" class="restaurantssubtypedivclass" style="display: block;"> //some code here </ul> i trying this:
var divwidth = $(".restaurantssubtypedivclass").width(); //getting 0 what wrong here? other way it?
try one:
var divwidth = $(".restaurantssubtypedivclass").css('width');
Comments
Post a Comment