October 11, 201411 yr Basically this error has came out of no where.. Last night it wasn't even issue and everything was working fine. However, I checked this morning and I'm not sure whether the client has done anything or if something has stopped working. If you visit http://strawberrylemonadeonline.com/ on your mobile device, the navigation messes up and text appears outside the select. I've been fiddling for ages and I cannot find a solution. It's even harder as on dev tools, I'm not getting the error happen only on genuine mobile devices.. Can anyone help? ps - I appreciate the code is awful, I got approached by a client who didn't want to pay the original web company who created the site to fix small errors, so he came to me. Thanks
October 11, 201411 yr Looks like there are some javascript errors, notably : setPositionProperty(-(position.left - (slider.viewport.width() - lastChild.width())), 'reset', 0); Uncaught TypeError: Cannot read property 'left' of undefined Its from this function (below) so you'll want to go through it and find out exactly what isn't working here. Have a look at var lastChild = slider.children.last(); var position = lastChild.position(); var setSlidePosition = function(){ // if last slide if(slider.active.last){ if (slider.settings.mode == 'horizontal'){ // get the last child's position var lastChild = slider.children.last(); var position = lastChild.position(); // set the left position setPositionProperty(-(position.left - (slider.viewport.width() - lastChild.width())), 'reset', 0); }else if(slider.settings.mode == 'vertical'){ // get the last showing index's position var lastShowingIndex = slider.children.length - slider.settings.minSlides; var position = slider.children.eq(lastShowingIndex).position(); // set the top position setPositionProperty(-position.top, 'reset', 0); } Edited October 11, 201411 yr by mantis
October 11, 201411 yr Author Looks like there are some javascript errors, notably : setPositionProperty(-(position.left - (slider.viewport.width() - lastChild.width())), 'reset', 0); Uncaught TypeError: Cannot read property 'left' of undefined Its from this function (below) so you'll want to go through it and find out exactly what isn't working here. Have a look at var lastChild = slider.children.last(); var position = lastChild.position(); var setSlidePosition = function(){ // if last slide if(slider.active.last){ if (slider.settings.mode == 'horizontal'){ // get the last child's position var lastChild = slider.children.last(); var position = lastChild.position(); // set the left position setPositionProperty(-(position.left - (slider.viewport.width() - lastChild.width())), 'reset', 0); }else if(slider.settings.mode == 'vertical'){ // get the last showing index's position var lastShowingIndex = slider.children.length - slider.settings.minSlides; var position = slider.children.eq(lastShowingIndex).position(); // set the top position setPositionProperty(-position.top, 'reset', 0); } Thanks for the help! Much appreciate it. I'll take a look further.
Create an account or sign in to comment