JQuery: How to find what is between two text points

Posted by Sarfraz on Stack Overflow See other posts from Stack Overflow or by Sarfraz
Published on 2010-04-07T16:49:37Z Indexed on 2010/04/07 16:53 UTC
Read the original article Hit count: 123

Filed under:
|
|
|
|

Hello,

Let's say I have this:

<div id="wrapper">
 <pre class="highlight">
    $(function(){
    // hide all links except for the first
    $('ul.child:not(:first)').hide();
    $("a.slide:first").css("background-color","#FF9900");

    /*
        The comment goes here.
    */

  </pre>
</div>

With Jquery, I want to find what is in between:

    /*
        The comment goes here.
    */

Including those comment signs. So it should return:

    /*
        The comment goes here.
    */

How to do that, how to find text between two points?

Thanks

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about JavaScript