Jump to content


Photo
- - - - -

Simple jQuery Scroll To Top Plugin


  • Please log in to reply
2 replies to this topic

#1 devil360

devil360

    Member

  • Members
  • PipPip
  • 24 posts

Posted 13 March 2016 - 12:59 PM

If I add Simple jQuery Scroll To Top Plugin in header.tpl result its blank screen.

 

This is link page:   http://www.jqueryscr...Top-Plugin.html

 

1. Download and add the latest jQuery library and jquery.scrollToTop.min.js to the head section of your page

1 <script src="http://ajax.googleap...1/jquery.min.js"></script>
2 <script src="jquery.scrollToTop.min.js"></script>

2. Add the following html codes on the anywhere of your page

1

<a href="#top" id="toTop"></a>

 

This is the problem..........

 

3. Call the plugin with options

1 <script type="text/javascript">
2     $(function() {
3          $("#toTop").scrollToTop(1000);
4     });
5 </script>

 

Idea???

Thanks



#2 theone

theone

    Senior Member

  • Members
  • PipPipPipPip
  • 368 posts

Posted 13 March 2016 - 03:27 PM

Try wrapping the javascript in {literal}{/literal} tags.

{literal}
<script type="text/javascript">
     $(function() {
          $("#toTop").scrollToTop(1000);
     });
</script>
{/literal}

  • devil360 likes this

#3 devil360

devil360

    Member

  • Members
  • PipPip
  • 24 posts

Posted 13 March 2016 - 07:24 PM

THANKS !!!!

 

OK in all screen, the problem is in footer.tpl  not continue process and not possible click.