Friday, November 28, 2008

[jQuery] Re: Remove ellipsis from shortened title.

dt will be an object.
you could use javascripts replace() method

maybe..

$('dt').text().replace("…", "");
.. i think

DemersDesigns wrote:
Hello, I am using Simplepie and truncating fields that are longer than a certain length. This process adds an ellipsis to the end, which I want in most situations. However, for titles, I do not want the ellipsis to show. I am trying to use jquery to remove the ellipsis character code (&hellip;) from any H3 tag that has it, but am having a real problem getting it done. Here is what I have been working from with no luck.  <script type="text/javascript"> $(function(){ $("dt &hellip;").remove(); }); </script>   Thanks as always! -Paul    

No comments: