The embedded jQuery code is causing Javascript errors on other datatypes.
I have a doctype with a Google Maps datatype, and a uComponents Multi-URL Picker. If I try to click on the "Add" link in the Multi-URL picker, the Google Maps JS fails here:
if ($(this).attr('id')) { // <--- Added this to prevent <a> with no id attribute breaking the page
if ($(this).attr('id').indexOf('TabView') > -1) {
...
}
}
});
This works, but it might be better if the Google Maps jQuery limited its scope to the actual instance of the datatype, rather than doing generic selector which intercept every click of every a tag on the page....
jQuery code causing conflicts...
The embedded jQuery code is causing Javascript errors on other datatypes.
I have a doctype with a Google Maps datatype, and a uComponents Multi-URL Picker. If I try to click on the "Add" link in the Multi-URL picker, the Google Maps JS fails here:
Because the "Add" link doesn't have an ID attribute, I guess...
Any suggestions?
Mike
OK, well, I got it working by downloading the Google Maps source code, and adding a test for the ID attribute around the offending code.
This works, but it might be better if the Google Maps jQuery limited its scope to the actual instance of the datatype, rather than doing generic selector which intercept every click of every a tag on the page....
$('a').click(function () { ... });
Anyway, we're back up and running....
Cheers,
Mike
Thanks Mike, had the same issue and this fixed it. I went ahead and submitted a pull request to fix it in the source also.
I've applied Tom's pull request... it will be in the next release (after New Year - as I'm still away for Christmas).
Cheers, Lee.
Quit working during your vacation :)
LOL! Staying with family... they have wi-fi! Still 5 day away from my computer is pretty good for me! ;-)
is working on a reply...