Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #223350

    Hi guys, one more thing I’m trying to get right with my build. Im trying to apply custom scroll bars across all browsers using the following instruction http://jscrollpane.kelvinluck.com/

    Not matter what i try when i add a function to the child themes functions.php my home page turns completely white.

    What am i doing wrong here? Do you have a resource specific to enfold about adding custom functions and javascript?

    #223789

    Hi!

    JavaScript code should not be in functions.php, try putting it in js/avia.js instead (at the very end, you may need to change the $ for jQuery).

    Cheers!
    Josue

    #223842

    Thanks for getting back to me.

    I have added this to the avia.js

    $(function()
    {
    $(‘.scroll-pane’).jScrollPane();
    });

    Where is the best place to add the following in the theme?

    <!– styles needed by jScrollPane –>
    <link type=”text/css” href=”style/jquery.jscrollpane.css” rel=”stylesheet” media=”all” />

    <!– latest jQuery direct from google’s CDN –>
    <script type=”text/javascript” src=”http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js”&gt;
    </script>

    <!– the mousewheel plugin – optional to provide mousewheel support –>
    <script type=”text/javascript” src=”script/jquery.mousewheel.js”></script>

    <!– the jScrollPane script –>
    <script type=”text/javascript” src=”script/jquery.jscrollpane.min.js”></script>

    #223857

    Hi!

    header.php, before the <head> tag closes, you must put the absolute path to the files, ex:
    http://yourwebsite.com/script/jquery.jscrollpane.min.js

    Cheers!
    Josue

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.