I trigger a click event when clicking on another button using jQuery(".Classname").click()
, but it is not working using Safari on iPhone.
Example:
jQuery(".button1").click(function(){
jQuery(".button2").click();
})
I trigger a click event when clicking on another button using jQuery(".Classname").click()
, but it is not working using Safari on iPhone.
Example:
jQuery(".button1").click(function(){
jQuery(".button2").click();
})
try use .trigger() method.
jQuery(".button1").click(function(){
jQuery(".button2").trigger("click");
})
Add the CSS fix to your button,
.button2 {
cursor:pointer;
}
Consider this is an tip; if the element is not bound using $.click()
use the DOM object like
jQuery(".button1").click(function(){
jQuery(".button2")[0].click(); // or .get(0).click();
})