readmore

how to inject a string in an html fragment

I would like to insert a read more html bit at a certain position in an html fragment - say after the 10th word. I will then, via javacript, hide the text after the "read more" and only show it on click. The javascript part is ok. As to the php part... It seemed simple at first - but the problem is that tags mess up the word count and...

clearing an <a> href after the page is loaded using jquery

I'm trying to slightly modify a wordpress template. At the moment a function returns a link to an article, I am trying to replace this link so that instead of diverting you to another page it just brings the article in and loads it. To do this I need to reset the anchors href after the page has loaded. This is the bit of code I am int...

Making a button unclickable until jquery .load() has finished

I'm currently using the following code for my read more buttons: $(document).ready(function() { $("a.more-link").attr("href", ""); $("a.more-link").attr("onclick", "return false;"); $('.readmore').each(function(index) { var $link = $(this); $(".readmore").prependTo('.' + $link.attr("id") + ' > #bottominfo'); }); $(...