my image slider code onclick event was not working on android tablet .I am using Jquery lib.when I added following code ,
var clickEventType=((document.ontouchstart!==null)?'click':'touchstart');
$("#myImageFlow").bind(clickEventType, function( e ) {
$(this).addEventListener( 'touchstart', touchStart, false);
});
//custom function handler for event
function touchStart(event){
event.preventDefault();
};
this code make make my slider respond ontouch event but in Inspect console i am getting error
Error::
Uncaught TypeError: Object [object Object] has no method 'addEventListener'
because of this error some of functionality is not working ??
$(this).get(0).addEventListener( 'touchstart', touchStart, false);
.bind(clickEventType...
code may (depending on the preceding line) have just added a'touchstart'
handler, and then you're trying to add another?