Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
MobileSafari Live Click Bug
<script src='' type='text/javascript'></script>
<script src='' type='text/javascript'></script>
<body style='font-family: Helvetica;'>
<h1 class='livequery_h1' style='font-size: 50px; padding: 25px;'>
livequery h1 click
<h1 class='live_h1' style='font-size: 50px; padding: 25px;'>
live h1 click
<h1 class='h1_click' style='font-size: 50px; padding: 25px;'>
h1 click
The 'live h1 click' doesn't fire in MobileSafari (iPhone)
<script type='text/javascript'>
$(document).ready(function() {
$('.livequery_h1').livequery('click', function() {
alert('livequery h1 clicked');
$('.live_h1').live('click', function() {
alert('live h1 clicked');
$('.h1_click').click(function() {
alert('h1 clicked');
Copy link

A workaround: If you add onclick='' to the .live_h1 element, it works. so:

<h1 class='live_h1' onclick='' style...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment