2

Im using this jquery plugin called Slidorion with SPServices.

On firefix,Chrome when the page loads first it works all good. But in IE 11 it doesnt work on first load until i refresh it.

I have also used this below but no luck.Also use document ready no LUCK. Added it to my masterpage at the end before the body tag NO LUCK.

<script type="text/javascript">
    $(window).load(function(){
      //your code here
      $('#slidorion').slidorion({
            speed: 1000,
            interval: 4000,
            effect: 'slideLeft'
       });

    });
     </script>

Any ideas and thanks in Advance

Just added

I have tried this also

<script type="text/javascript">
   _spBodyOnLoadFunctionNames.push("myCustomFunctionName");

   function myCustomFunctionName() {
     $('#slidorion').slidorion({
        speed: 1000,
        interval: 4000,
        effect: 'slideLeft'
   });
   //alert("sdfds");
}


</script>

If i run the debugger f12 or firebug and load the page it works. This is only ON IE 11 and its driving me crazy. It only works when i refresh the page or even when i have an alert on the page

  • did you try document.ready() ? – Taran Goel Jul 14 '15 at 4:56
  • Yes Taran.I did – naijacoder Jul 14 '15 at 5:21
  • 1
    How and where do you reference jQuery? – eirikb Jul 14 '15 at 5:27
  • @naijacoder Try adding a 50ms or more timer between the $(window).load(function(){ and $('#slidorion').slidorion({. Don't have a reference right now, but basically on SharePoint even the document.ready() isn't always enough to make sure the scripts have been loaded on the page – moe Jul 14 '15 at 5:43
  • 1
    Try running this after everything finishes loading using _spBodyOnLoadFunctionNames.push("runAfterEverythingElse"); – Akhoy Jul 14 '15 at 6:10
1

You must await jQuery too:

<script type="text/javascript">
   _spBodyOnLoadFunctionNames.push("myCustomFunctionName");

   function myCustomFunctionName() {
      jQuery(function(){
          $('#slidorion').slidorion({
              speed: 1000,
              interval: 4000,
              effect: 'slideLeft'
           });
           //alert("sdfds");
      });
}  
</script>
  • Thanks Robert still no show. I gave up with IE 11 :( – naijacoder Jul 16 '15 at 6:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.