Hello all,

Below code works well for IE but not for firefox due to newlines
present in the html source.Can anybody help me making this work in
FF.It works well in IE6



 <html>
<head>
  <script src="http://code.jquery.com/jquery-latest.js";></script>

  <script>
  $(document).ready(function(){

    $("body").find("p:contains('When the day is short find that which
matters to you or stop believing')").replaceWith( '<span>chota</
span>' );

  });
  </script>

</head>
<body>
  <p>
    When the day is <span>short</span>
    find that which <b>matters</b> to you
    or stop believing
  </p>
</body>
</html>

Thanks in advance

Sourabh

Reply via email to