Of all the <p> blocks, select one or two containing the largest text size inside.
<p>
Interested in jscript, css, jquery or php code, etc.
Or just a general principle.
var maxlen = 0; var maxLenLink = null; $('p').each(function(){ if($(this).text().length>maxlen){//и правда maxlen = $(this).text().length; maxLenLink = $(this); } }); maxLenLink.css({'color':'red'});
var max = 0; var index = 0; $("p").each(function(){ var height = $(this).height(); if(height > max){ max = height; index = $(this).index(); } }); alert("Max height:"+max+" . It's Index: "+index);
Source: https://ru.stackoverflow.com/questions/170112/More articles:Java: multi-threaded serverHow to find out the number of deleted records?Software creation ToggleButton in Android. Positioning does not workjQuery live scroll.NET MEF creating multiple instancesRandom row selection from SQL tableProgrammatically determine the type of deviceHow to implement a map-map without moving to other pages?How to select the entire text of the form when you click on it?preg_replace processing replacement functionAll Articles