I am getting the attribute of an image on a page. It is the onclick attribute, but I need some text from the onclick function. (Sounds strange, but I do). Using the following works totally fine:
var link_path = $(html).find("img[alt='Show in Asset Map']").attr ('onclick'); alert(link_path); >From that, I can gather the onclick attribute. But, I would like to use .split() to section it up, but I keep getting a warning ($ (html).find("img[alt='Show in Asset Map']").attr("onclick").split is not a function) when I try to use split with this. Even Breaking it down and trying link_path.split('a'); does not work and gives the error. Why would this be?