html - How to check the children of div container had been fulfill or not in jquery? -


i not sure how describe in title.so,just give more information here.

i have container div class=container random children link tag inside.e.g:

<div class='container' style='width:200px; height:25px;overflow:hidden;'>   <a href='' style='display:block;float:left;padding:1px 3px'>people name here[long or short]</a>   ..... <!--random total of name's link--> </div> 

so, in cases there only one name , didn't go outside of container in case, the count of name outside of container , want put tip or beside note there more name here didn't display.

thank much!!

[update]

for example:

if link inside of container is:

<a href='' style='display:block;float:left;padding:1px 3px'>join keviin</a> <a href='' style='display:block;float:left;padding:1px 3px'>my second name</a> <a href='' style='display:block;float:left;padding:1px 3px'>i not seem</a> 

with style applied. first 1 link's width maybe 80px , , second link's width maybe 100px , on, , container 200px width , doesn't have enough space third link, , third link world moved next line , because container's overflow set hidden, third link not seem, , in case , have make tip or flag beside note users there more link here ....and let user click see third link....

put links in child div, , compare width , height of parent. child div have full width/height of contents (but hidden because of overflow).

<div class='container' style='width:200px; height:25px;overflow:hidden;'>   <div class="link_container">   <a href=''>people name here[long or short]</a>   ..... <!--random total of name's link-->   </div> </div> 

javascript:

$(".container").each(function()  {    var container = $(this);    var links = container.find(".link_container");     if(links.width() > container.width() || links.height() > container.height())    {         // show tip    } } 

Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -