What means the $ without brackets?

What means the $ without brackets?

ChromChrom Posts: 44Questions: 15Answers: 1
edited February 2022 in Free community support

I am trying to include the datesorter plugin in my wordpress. I loaded the files in the right order but I am struggling with the syntax.

$(document).ready(function() {
    $.fn.dataTable.moment( 'HH:mm MMM D, YY' );
    $.fn.dataTable.moment( 'dddd, MMMM Do, YYYY' );
 
    $('#example').DataTable();
} );

What means $ without brackets? Worpress doesn't accecpt $(), so I have to write jQuery. . But I am struggling with $ without brackets. The code like that throws an error. And changing it with jQuery. also does not work.

Answers

  • kthorngrenkthorngren Posts: 21,351Questions: 26Answers: 4,955

    Here is a SO thread discussing $..

    The code like that throws an error. And changing it with jQuery. also does not work.

    What are the errors?

    Kevin

  • ChromChrom Posts: 44Questions: 15Answers: 1

    ahhhh. sorry. I was too unconcentrated yesterday. I finally realized that I had to call it not in the jQuery.dataTable function.

    then I realized the js files were something like in wrong order or not uploaded to the right folder.

    Then replacing $ with jQuery worked.

Sign In or Register to comment.