Created
November 19, 2010 02:50
-
-
Save silverjam/706066 to your computer and use it in GitHub Desktop.
Example of jQuery.click not working.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Tested on http://blip.fm/home page | |
// Works | |
(function() { | |
var evt = document.createEvent("MouseEvents"); | |
evt.initMouseEvent("click", true, true, window, | |
0, 0, 0, 0, 0, false, false, false, false, 0, null); | |
var cb = document.getElementById("prevPageLinkTop"); | |
cb.dispatchEvent(evt); | |
})() | |
// Doesn't work | |
jQuery("#prevPageLinkTop").click() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment