Announcement

Collapse
No announcement yet.

Javascript Fail to Initialise on Filter Results Pages

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Javascript Fail to Initialise on Filter Results Pages

    Afternoon all,

    Encountering a fun one.

    SD 16.0.0.4 RJHB

    Javascript is failing to load (apparently) on filter results pages - I.E the following: https://www.columnradiators4u.co.uk/...diators-1.html

    Has anybody encountered this?

    Any pointers are greatly appreciated.

    -Matt.
    Matt. M - SMR Enterprises Ltd.

    #2
    That page works for me. Both Sorting and filtering.

    This is in Chrome.

    Maybe worth closing your browser and reopening ? (All I can think of).

    Mike
    -----------------------------------------

    First Tackle - Fly Fishing and Game Angling

    -----------------------------------------

    Comment


      #3
      At the bottom of that page I see:
      Code:
      <script src="https://cdnjs.cloudflare.com/ajax/libs/Swiper/3.4.2/js/swiper.js"></script>
      <script src="https://cdnjs.cloudflare.com/ajax/libs/Swiper/3.4.2/js/swiper.min.js"></script>
      <script src="https://cdnjs.cloudflare.com/ajax/libs/Swiper/3.4.2/js/swiper.jquery.js"></script>
      <script src="https://cdnjs.cloudflare.com/ajax/libs/Swiper/3.4.2/js/swiper.jquery.min.js"></script>
      I've a feeling that only one of these is needed (probably either the 2nd or 4th). Best check with someone who knows Swiper.
      Norman - www.drillpine.biz
      Edinburgh, U K / Bitez, Turkey

      Comment


        #4
        Originally posted by Mike Hughes View Post
        That page works for me. Both Sorting and filtering.

        This is in Chrome.

        Maybe worth closing your browser and reopening ? (All I can think of).

        Mike
        Hi Mike,

        The elements that have fallen over are the slider & a read more button which is getting squished out of existence!
        Matt. M - SMR Enterprises Ltd.

        Comment


          #5
          Originally posted by NormanRouxel View Post
          At the bottom of that page I see:
          Code:
          <script src="https://cdnjs.cloudflare.com/ajax/libs/Swiper/3.4.2/js/swiper.js"></script>
          <script src="https://cdnjs.cloudflare.com/ajax/libs/Swiper/3.4.2/js/swiper.min.js"></script>
          <script src="https://cdnjs.cloudflare.com/ajax/libs/Swiper/3.4.2/js/swiper.jquery.js"></script>
          <script src="https://cdnjs.cloudflare.com/ajax/libs/Swiper/3.4.2/js/swiper.jquery.min.js"></script>
          I've a feeling that only one of these is needed (probably either the 2nd or 4th). Best check with someone who knows Swiper.
          Thanks Norman,

          I'll have a look at commenting them out and seeing what the results bring. Their documentation (I believe) advised to offer all 4 files, but it does seem a tad redundant.

          I believe as you indicated, 2&4 are the only two that should be needed, perhaps only 4 as I call it through jquery.
          Matt. M - SMR Enterprises Ltd.

          Comment


            #6
            The documentation shows that 4 files are available. You only need one. See (on http://idangero.us/swiper/get-started/ ) the example under 2. Include Swiper Files To Website/App where only 1 .CSS and 1 .JS file is loaded.

            So if using jQuery, perhaps only the last one.

            Also, you are loading the CSS twice:
            Code:
            <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/Swiper/3.4.2/css/swiper.css">
            <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/Swiper/3.4.2/css/swiper.min.css">
            Again only one is needed.
            Norman - www.drillpine.biz
            Edinburgh, U K / Bitez, Turkey

            Comment


              #7
              Hi all,

              Resolved the issue.

              AJAX was killing the slider - I had to edit actinicsearch.js and add in 2 functions & calls to reinitialise them after AJAX loaded.

              I've also reduced the number of times the swiper code & CSS is called! (In our dev environment currently) Thank you Norman
              Matt. M - SMR Enterprises Ltd.

              Comment

              Working...
              X