Results 1 to 5 of 5

Thread: Touch Image Gallery vs IE

  1. #1
    Join Date
    Apr 2010
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Touch Image Gallery vs IE

    1) Script Title: Touch Image Gallery

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...uchgallery.htm

    3) Describe problem:
    When clicking a bullet in the bottom nav bar, IE returns the error:

    Webpage error details

    User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET4.0C; .NET4.0E; .NET CLR 1.1.4322)
    Timestamp: Wed, 24 Jul 2013 06:03:25 UTC

    Message: 'target.tagName' is null or not an object
    Line: 139
    Char: 6
    Code: 0
    URI: http://www.barefootc.com/Portfolio/touchgallery.js

    Message: 'target.tagName' is null or not an object
    Line: 139
    Char: 6
    Code: 0
    URI: http://www.barefootc.com/Portfolio/touchgallery.js


    It also does this on the demo at the DD site.

    Does anyone else have this problem?

    Thanks

  2. #2
    Join Date
    Aug 2004
    Posts
    9,902
    Thanks
    3
    Thanked 967 Times in 955 Posts
    Blog Entries
    15

    Default

    In what versions of IE do you get the problem? Testing the script in IE10 and IE9 right now, both seem to pass the test.
    DD Admin

  3. #3
    Join Date
    Apr 2010
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I am running IE ver. 8.0.6001.18702.

  4. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    29,069
    Thanks
    44
    Thanked 3,216 Times in 3,178 Posts
    Blog Entries
    12

    Default

    Use this modified version of the script (right click and 'Save As'):

    touchgallery.js

    If you're wondering what the problem is, it's at the end on that line specified by your error message. Best I can tell the cross browser normalization of events is being overridden by the jquery.touchSwipe.min.js (Github) script, so needs to be done manually (highlighted in the below):

    Code:
    			$jumptodiv.swipe({
    				tap: function(e){e = e || event; e.target = e.target || e.srcElement; // this normalizes the event and the event target
    					if (e.target.tagName == 'SPAN'){ //this is the problem line
    						var $target = $(e.target)
    						navigate( parseInt($target.data('image')) )
    					}
    				}
    			})
    		})
    	}
    But you don't have to worry about it. Just save and use the modified version I've attached to this post.

    The browser cache may need to be cleared and/or the page refreshed to see changes.
    Last edited by jscheuer1; 07-25-2013 at 07:55 AM. Reason: add last line
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  5. #5
    Join Date
    Apr 2010
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thank you John.

    All is working well now.

Similar Threads

  1. Touch Image Gallery
    By Brends in forum Dynamic Drive scripts help
    Replies: 6
    Last Post: 07-11-2013, 05:32 PM
  2. old iPod touch problem
    By Jack in forum The lounge
    Replies: 2
    Last Post: 02-10-2013, 02:49 AM
  3. Replies: 1
    Last Post: 02-26-2012, 12:06 PM
  4. Replies: 0
    Last Post: 05-19-2011, 07:33 PM
  5. Replies: 11
    Last Post: 07-23-2010, 05:03 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •