jquery responsive a href's not working

Discussion in 'JavaScript' started by LeeJ, Dec 8, 2014.

  1. #1
    I have designed a site that is responsive and to help this along I added a jquery nav slider for tablets and mobiles, using the Naver option from Formstone.

    This is my site -

    http://www.nolimitsfitness.co.uk/new/index.php

    Basically everything works well but whe you use the nav when on mobiles or tablets the buttons dont actually work, which is very strange. They are normal a hrefs's, so there must be something blocking their functionality but cant work it out.

    Also as another issue, the page and the site as a whole takes a long while to load, so wondered if someone can let me know how do I go about looking for the answer to that problem.

    It can take age to load and when moving to another page, we can wait what feels like an age.

    Thanks anyway.
     
    LeeJ, Dec 8, 2014 IP
  2. PoPSiCLe

    PoPSiCLe Illustrious Member

    Messages:
    4,623
    Likes Received:
    725
    Best Answers:
    152
    Trophy Points:
    470
    #2
    The site's javascript, for one, is a bit of a mess - you have several javascript-files (should be combined into one), and you're loading more than one version of jQuery (once at the start of the page, and another inside the _static.js-file) - why?
    Besides, the YSlow-extension to Firebug (a plugin for Firefox) shows a grade C for your site - mostly because you have way too many javascript-files and css-files (combine them), and you're loading a lot of images - the page (uncached) is a staggering 1,4 MB to download, and while cached, the reloads and new pages show a download of about 170-200 kB pr load - that's insane. Given that you're also loading quite a few images, and perhaps the host itself isn't the fastest, and you have a slow site.
    As for why the menu doesn't work on smaller screens, I'm not sure - the javascript files are a bit of a mess, and I really don't feel like diving into them - clean up the _static.js file, and try commenting out everything but one function, and then go from there, to see when the problem returns - I'm thinking it's a javascript call to prevent links from activating, but I can't be a 100% sure.
    Another problem - when reducing the window-size on a laptop (ie, not a touch-screen / phone / tablet), the menu disappears alltogether - that is really something you should fix.
     
    PoPSiCLe, Dec 8, 2014 IP
  3. LeeJ

    LeeJ Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #3

    Thanks for the advice, I have began trimming things down and it seems to be better already and from your thoughts I also found the link not working issue.

    Will see if I can improve things further.
     
    LeeJ, Dec 8, 2014 IP
  4. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,999
    Best Answers:
    253
    Trophy Points:
    515
    #4
    While your link is 404 now, the things you mentioned really are scripttard crap that has no damned business on a website, ESPECIALLY if you are going to make it responsive. Goofy fixed design crap like "sliders" are the antithesis of accessible design, and that's what responsive is supposed to be for: Accessibility.

    Hell, "jQuery' and "responsive" shouldn't even be related to each-other, and if your scripttardery is dicking around with the href's, you're probably doing something disastrously wrong.
     
    deathshadow, Dec 12, 2014 IP