Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
  • #209081

    Hi guys,

    Im updating my website and I would like to add some custom Jquery only i cannot find where to place it..

    $('#floatnav a').click(function() {
        $('#floatnav a').removeClass('active'); /*Remove previous*/
        $(this).addClass('active');             /*Active clicked*/

    I tried putting it on the bottom of avia.js but that didnt work at all.



    Hi z2h!

    This would be the best way to add it in:



    Hi Devin,

    Thanks but I seem to get no luck by using that plugin tho.. The code works perfect, it runs smoothly in Jsfiddle

    Do I have any other options?




    Please post a link to your website – I’ll check the code in avia.js

    Best regards,

    This reply has been marked as private.


    So wrapping it with this (from the codex example) should allow you to use the same script but without causing an issue with WordPress:

    jQuery(document).ready(function($) {
        // Inside of this function, $() will work as an alias for jQuery()
        // and other libraries also using $ will not be accessible under this shortcut

    Hi Devin,

    Thanks for the answer but I still dont get where to place the code in… Do I place it in the (wp-includes/js/jquery/jquery.js) folder ? Or do I combine the code you provided with mine in the Javascript Plugin?


    Nevermind got it working :) THX!


    • This reply was modified 1 year, 10 months ago by  z2h.
Viewing 7 posts - 1 through 7 (of 7 total)

The topic ‘Where to put custom js / jquery’ is closed to new replies.