hero image

Trying to use modified sticky.js in child theme

Home Forums WordPress Themes E-event Trying to use modified sticky.js in child theme

Forums WordPress Themes E-event Trying to use modified sticky.js in child theme

PLEASE NOTE A RECENT CHANGE:
The forum is read-only. Please submit any support request here.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts

  • innoweb
    Member
    TT Client
    #66870

    Hi Mihai,

    Happy new year to all!

    I’m having a bit of an issue, I’d like to change the sticky.js for a proper color transition in the theme, when the page has been scrolled, because I don’t like the way the background color just pops up on the header, so I decided, to modify the sticky.js within the child template I’m using, but when using wp_enqueue_script my script gets loaded way before yours, even if I change the priority in the script. Can you help me out please?

    Script I’m using:

    add_action( ‘wp_enqueue_scripts’, ‘wpse26822_script_fix’, 100);
    function wpse26822_script_fix()
    {
    wp_dequeue_script(‘parent_theme_script_handle’);
    wp_deregister_script( ‘sticky.js’ );
    wp_enqueue_script(‘child_theme_script_handle’, CHILD_DIR.’js/sticky.js’, array(‘jquery’));
    }

    Thank you,
    Tamas


    Anonymous
    Inactive
    Inactive
    #67082

    Hello,

    Please send your WP (WP installation URL, WP username, WP password) and FTP (FTP host, FTP username, FTP password and optional: FTP port) credentials as a reply to the email you just got from us that contains this thread. This message will be kept private and only TeslaThemes support staff will see it. Once we get them, your issue will be resolved much quicker.
    Thanks for understanding.

    Regards.

Viewing 2 posts - 1 through 2 (of 2 total)

Trying to use modified sticky.js in child theme

Home Forums WordPress Themes E-event Trying to use modified sticky.js in child theme

[i]
[i]
[i]
[i]