I have developed a website using some effects (fadeIn, fadeOut, slideUp ...) which works fine, but now I see that those transitions are very slow in the iphone.
As everything else works fine, I would like to exchange those effects for hide and show during runtime and keeping the callback functions...
Are you trying to make the animation itself faster? That's controlled by the first argument you pass to the hide() function. It accepts a numeric value too (an int, not a string).
$('#clickme').click(function() { $('#book').hide(100, function () {
$('#someotherelement').show(200);
});
});
This will hide the element first and start the show of the second only after the first has finished.
Thanks neeraj. That is what I need, I didn't know that it existed
Eggers, I didn't want to changte the .js that I had for my live site, so with neeraj's solution, I just have to add that line in case that I detect that it's an Iphone
Thanks!
marc
Leave a comment on fumarx's reply
Change topic type
Link this topic
Provide the permalink of a topic that is related to this topic