PDA

View Full Version : Touch Image Gallery vs IE



Barefoot
07-24-2013, 03:07 PM
1) Script Title: Touch Image Gallery

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex4/touchgallery.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

ddadmin
07-25-2013, 05:24 AM
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.

Barefoot
07-25-2013, 05:28 AM
I am running IE ver. 8.0.6001.18702.

jscheuer1
07-25-2013, 06:48 AM
Use this modified version of the script (right click and 'Save As'):

5153

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):


$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.

Barefoot
07-26-2013, 06:08 PM
Thank you John.

All is working well now.