jQuery not working (1 post)

  1. sabhandari
    Posted 3 years ago #


    I am using Mystique wordpress plugin and want to execute some jQuery code as below:
    Hide elements along with cookie on link click.
    I added the following code to my header.php file:

    <?php wp_enqueue_script('jquery'); ?>
    <script type="text/javascript" src="/wp-content/themes/mystique/js/jquery.cookie.js"></script>
    <script type="text/javascript" src="/wp-content/themes/mystique/js/jquery.showhide.min.js"></script>
    <script type="text/javascript">
    jQuery(document).ready(function($) {
        use_cookie: true,
        cookie_name: 'example_6'

    Then added the element with id as ex-6 in the sidebar widget as:

        <a href="#" title="Toggle the span" id="ex-6">Ads Off</a>

    You can check all the action on

    But clicking on that ads off link doesn't invoke the jquery code.

    I can achieve the hide show with simple div style attribute but I need to set a cookie regarding user option for 3 days.

    Any ideas guys.

Topic Closed

This topic has been closed to new replies.

About this Topic