Reputation: 1
I am looking to do something like this: (Wont work..)
<script>
$(document).ready(
$('a[title="Girls"] .ellipsis_text').text('test');
);
To change the span text with the class ellipsis_text from the following code:
<li><a href="http://www.site.com/girls" title="Girls"><span class="cls_truncate_text"><span class='ellipsis_text'>Girls</span></span></a></li>
Do anybody know how to do this?
Upvotes: 0
Views: 72
Reputation: 1666
Try this:
$(document).ready(function(){
$('a[title="Girls"]').find('.ellipsis_text').html('test');
});
Upvotes: 1
Reputation: 3287
You forgot function()
Try with
$(document).ready(function() {
$('a[title="Girls"] .ellipsis_text').text('test');
});
Demo: http://jsfiddle.net/M25sx/
Upvotes: 1