20 much appreciated responses...

katesays:

12:47 pm - Jun 7 2012

Hi,
this is a nice little script, thank you very much for posting it:)
However this works only for instances-children of ‘p’ elements.
Being new to jquery I tried to change the containing element from “p” to “body” or even “div” as follows:

I’d be happy to help. Is your code above working? I’m unclear on what you need help with exactly. Are you able to put it into a JSFiddle with an example of the HTML markup you’re trying to manipulate, then I can help you with any issues you might have.

The onload function just means that the code inside it fires once the targeted element has fully loaded into the DOM (on your web page). So $(‘img.dog’).onload(); only fires once the image of a dog has loaded.

Great piece of code, thank you. I’m just playing around in your JSFiddle (how cool is that site?!) as I’m trying to get this to work for a table. I can’t quite get it to work. I’m in your http://jsfiddle.net/trtcN/13/ and using .replace as a table class.

I’m not sure if this is closed now but I’m having issues with multiple replacements, I am wanting to replace the three words of a company name with the company colours, I really don’t want to go through and manually add a span for each of the three words individually although I know this would work, is there anyway of doing this with code? BTW I’m a novice at JS/JQuery, etc.