javascript - my html selecting code select all the html boxs -


i made jquery code can click link on top of "htmlbox" select inside "htmlbox"

<p class="selecthtmlcode">إضغط هنا لتحديد النص أسفله</p> <textarea readonly="" class="htmlcode">&lt;div id='allinantiadblock'&gt; </textarea> 
$(document).ready(function(){    $( ".selecthtmlcode").click(function() {      $( ".htmlcode" ).select();    });  });  

but problem when have more 1 "htmlbox" (every 1 have selecting link on top of it), select last "htmlbox"

simply want every link select "htmlbox" not last 1 or of them

here link have problem http://showtime-info.blogspot.com/2014/04/24-anti-adblock.html

by way "إضغط هنا لتحديد النص أسفله" means "click here select below text"

you want select next .htmlcode element:

$(".selecthtmlcode").click(function() {    $(this).next(".htmlcode").select();  }); 

Comments

Popular posts from this blog

google api - Incomplete response from Gmail API threads.list -

Installing Android SQLite Asset Helper -

Qt Creator - Searching files with Locator including folder -