I have some links that have events bound to them and some links that do not.
These links are having their click event triggered by a change in a select box.
Is there a way for jquery to visit a link if there is no event bound that link?
I do not want to reference the url within the select box vlaue attribute, I want to reference the url in the anchor tag.
something like (pseudo code) -
if (link.hasEventHandler('click')){
trigger click
} else {
window.location = link.attr('href')
}
EDIT - There's a plugin that does exactley what I need to do here - https://github.com/sebastien-p/jquery.hasEventListener
File size is an issue, so I'd like to avoid using it.
I'm using the latest jquery so cannot use .data('events')