Hello,
I am new to jquery and not very experienced at js. I am developing a guide for a exhibition for my course of study with jquery and jqtouch. Everything works well except in mobile safari, witch is the most important part. I wrote this code:
- jQuery(document).ready(function() {
- var loadthis;
- $("a.aboutprojectlink").click(function(event) {
- $('#aboutprojectcontent').text("lade...");
- loadthis = $(this).attr("title");
- $("#aboutproject h1").text(loadthis);
- $("a.linkbarbutton").removeClass("linkbarbuttonclicked");
- $("a.linkbarbutton[title=start]").addClass("linkbarbuttonclicked");
- $('#aboutprojectcontent').load("projects/" + loadthis + "_start.html");
- });
- $("a.linkbarbutton").click(function(event) {
- $('#aboutprojectcontent').text("lade...");
- $('#aboutprojectcontent').load("projects/" + loadthis + "_" + $(this).attr("title") + ".html");
- $("a.linkbarbutton").removeClass("linkbarbuttonclicked");
- $(this).addClass("linkbarbuttonclicked");
- });
- });
It replaces the content of #aboutprojectcontent, the title "h1" in #aboutproject and adds and removes some classes in the sub-navigation. The same click starts an animation, it slides to another div, this is a part of jqtouch. This works well on Safari.
But on iOS it only works sometimes. It is weird. If you are touching the link for a longer time it works, if you are tapping quickly it won't. The replacement via submenu (".linkbarbutton") works well. I think there might be some kind of a conflict with the build in jqtouch-slide animation.
As base I used a Demo from jqtouch. First I used revision 108, than i switched to 148.
To see this Bug you need an iPhone / iPod Touch and go to "nach Name" and than to one of the first Points in the list. The linked files for the links on the bottom doesn't exist at this time.
Anyone an idea? I tried out something but i didn't get it... so, thanks in advance,
pressanykey