If you have a comment on this topic, contact Aptify Documentation. If you want to return to the Aptify Community Site, please click here.

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Under scripts/aptify.touchevents.js

  1. Create a new variable for caching the target '.mynewicon' class
  2. E.g. var mynewicon = $('.mynewicon);
  3. Add following code to create the touch events for touchStart, touchEnd and touchCancel.


$( mynewicon).live("touchstart", function () {
$(this).addClass("home-icon-active-fake");
})
$( mynewicon).live("touchend", function () {
$(this).removeClass("home-icon-active-fake");
})
$( mynewicon).live("touchcancel", function () {
$(this).removeClass("home-icon-active-fake");
})


(Note: Whenever a new button is added which has click and touch effect, add a touch event to make it work on a mobile device).

  • No labels