1. Ian George
  2. jquery.tagsphere
  3. Issues
Issue #6 resolved

Tag links not working on iPad v.1

Anonymous created an issue

This has the best response on the ipad as regards rotation and motion, :) but my links don't respond to touch on the ipad? Am I missing something?

Even the links from your site snippet don't respond....

Comments (4)

  1. Anonymous

    Hi, i had the same problem on iPad 2 that the links are not clickable. I guess its not the best way but I fixed it this way: i added:

    		$("ul li a").bind('touchstart', function() {
    			if($(this).css('z-index') > 3) {
    				location.href=this.href;
    			}
    		});
    

    before the "container.bind('touchstart', function(evt){ ..."

    works for me so far.

  2. Anonymous

    Me again, i have another solution which is much better because the last solution was already fire the link while dragging the tags. Uncomment the container.bind('touchstart', function(evt){} and add dragging = true; to container.bind('touchmove', function(evt){}, add the $("ul li span").bind('click', function() {}.

    Replace all <a href></a> with <span></span>

    			/*	 container.bind('touchstart', function(evt){
    					evt.preventDefault();
    					var touch = evt.originalEvent.touches[0] || evt.originalEvent.changedTouches[0];
    
    					dragging = true;
    
    					motionx.add(touch.pageX, true);
    					motiony.add(touch.pageY, true);
    
    				});*/
    
    
    		$("ul li span").bind('click', function() {
    			alert($(this).css('z-index'))
    			if($(this).css('z-index') >= 30) {
    				location.href=this.href;
    			}
    		});
    		
             container.bind('touchmove', function(evt){
                                evt.preventDefault();
                                var touch = evt.originalEvent.touches[0] || evt.originalEvent.changedTouches[0];
    							dragging = true;
                                motionx.add(touch.pageX, false);
                                motiony.add(touch.pageY, false);
                                vectorx = motionx.avg();
                                vectory = motiony.avg();
                            });
    
  3. Anonymous

    Hi, Awesome work Ian, thanks so much!

    Had a weird issue with non-webkit browsers (FF, IE, Opera): when background color for container div IS NOT specified in CSS (inline or external CSS) the code only works in webkit browsers (Chrome and Safari).

    Specifying #tagcloud{ background-color:#fff } in my CSS solved the problem.

    Hope this saves someone 3.5 hours of figuring out what the hell's going on :)

  4. Log in to comment