Hi, it works fine on the iPad for me.
Here's the complete code for you to copy and paste.
Does that work for you?
HTML Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>{ visibility: inherit; } Testing</title>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
<script type="text/javascript">
/*!
* jQuery Wiggle
* http://www.userdot.net/#!/jquery
*
* Copyright 2011, UserDot www.userdot.net
* Licensed under the GPL Version 3 license.
* Version 1.0.0
*
* http://www.class.pm/files/jquery/jquery.wiggle/demo/
*/
(function($) {
$.fn.wiggle = function(method, options) {
options = $.extend({
degrees: ['2','4','2','0','-2','-4','-2','0'],
delay: 35,
limit: null,
randomStart: true,
onWiggle: function(o) {},
onWiggleStart: function(o) {},
onWiggleStop: function(o) {}
}, options);
var methods = {
wiggle: function(o, step){
if (step === undefined) {
step = options.randomStart ? Math.floor(Math.random() * options.degrees.length) : 0;
}
if (!$(o).hasClass('wiggling')) {
$(o).addClass('wiggling');
}
var degree = options.degrees[step];
$(o).css({
'-webkit-transform': 'rotate(' + degree + 'deg)',
'-moz-transform': 'rotate(' + degree + 'deg)',
'-o-transform': 'rotate(' + degree + 'deg)',
'-sand-transform': 'rotate(' + degree + 'deg)',
'transform': 'rotate(' + degree + 'deg)'
});
if (step == (options.degrees.length - 1)) {
step = 0;
if ($(o).data('wiggles') === undefined) {
$(o).data('wiggles', 1);
}
else {
$(o).data('wiggles', $(o).data('wiggles') + 1);
}
options.onWiggle(o);
}
if (options.limit && $(o).data('wiggles') == options.limit) {
return methods.stop(o);
}
o.timeout = setTimeout(function() {
methods.wiggle(o, step + 1);
}, options.delay);
},
stop: function(o) {
$(o).data('wiggles', 0);
$(o).css({
'-webkit-transform': 'rotate(0deg)',
'-moz-transform': 'rotate(0deg)',
'-o-transform': 'rotate(0deg)',
'-sand-transform': 'rotate(0deg)',
'transform': 'rotate(0deg)'
});
if ($(o).hasClass('wiggling')) {
$(o).removeClass('wiggling');
}
clearTimeout(o.timeout);
o.timeout = null;
options.onWiggleStop(o);
},
isWiggling: function(o) {
return !o.timeout ? false : true;
}
};
if (method == 'isWiggling' && this.length == 1) {
return methods.isWiggling(this[0]);
}
this.each(function() {
if ((method == 'start' || method === undefined) && !this.timeout) {
methods.wiggle(this);
options.onWiggleStart(this);
}
else if (method == 'stop') {
methods.stop(this);
}
});
return this;
}
})(jQuery);
</script>
<script type="text/javascript">
function wiggleForOneSecond(t){
t.wiggle();
setTimeout(function(){t.wiggle('stop')},1000)
}
$(document).ready(function(){
var thingToWiggle = $('.wiggle');
var s = setInterval(function(){wiggleForOneSecond(thingToWiggle)},10000);
setTimeout(function(){window.clearInterval(s)},61000)
thingToWiggle.hover(function(){
window.clearInterval(s)
});
});
</script>
</head>
<body>
<img src="http://www.visibilityinherit.com/code/images/adriana.jpg" class="wiggle">
</body>
</html>
Bookmarks