I have something that looks like
<div id="ABCLinks"> : <span dir="ltr"><a href="www.google.com" title="GOOGLE">Google</a></span>
I am trying to replace only the text ":" with "Websites:" Without adding any source tags around it ().
This is what I have tried with no effect:
<script type="text/javascript">
$(document).ready(function() {
$("#ABCLinks").text(function () {
return $(this).text().replace(":", "Websites:");
});
});
</script>
I am getting this html output (I am using a php skin to automatically embed my jquery script, it works for other jquery scripts)
<script type="text/javascript">$(document).ready(function() {
​$("#ABCLinks").text(function () {
return $(this).text().replace(":", "Websites:"); });​​​​​
});
</script>