Post by bids » Thu Aug 04, 2016 2:46 pm

Hi, I would like to help, if anyone knows how to make the animation add to cart only for mobile, leaving canceled desktop.
$('html, body').animate({ scrollTop: 0 }, 'slow');
Thank you very much in advance .
Last edited by straightlight on Thu Aug 04, 2016 11:31 pm, edited 1 time in total.
Reason: Added quote tags.

Newbie

Posts

Joined
Thu Aug 04, 2016 2:43 pm

Post by paulfeakins » Thu Aug 04, 2016 5:49 pm

You can wrap it in this:

Code: Select all

if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) {
 // some code..
}
More info here:
http://stackoverflow.com/questions/3514 ... -in-jquery

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Legendary Member
Online

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom

Post by straightlight » Thu Aug 04, 2016 11:32 pm

This topic will be moved to the Extensions Support section of the forum.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON
Who is online

Users browsing this forum: No registered users and 3 guests