• Alen

    (@alenma)


    I added this code along with the Resource of the Date picker:

    $('#movedate').datetimepicker({
    		dayOfWeekStart : 1,
    		lang:'en'
    		});

    But the code won’t work. I also tried alert(“Hello”); … still not working. I don’t know what I’ve done wrong.

    Can anyone help me.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    In WordPress jQuery has to be run in noconflict mode, e.g. you can’t do this:

    $

    You have to do this first:

    $ = jQuery;

    Thread Starter Alen

    (@alenma)

    so the right coding must be:

    jQuery(function ($) {
    	/* You can safely use $ in this code block to reference jQuery */
    });

    Is that it?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Javascript is Not working on the Theme’ is closed to new replies.