{"id":100,"date":"2020-04-15T16:33:36","date_gmt":"2020-04-15T16:33:36","guid":{"rendered":"https:\/\/codexjunction.com\/?p=100"},"modified":"2023-10-12T10:21:02","modified_gmt":"2023-10-12T10:21:02","slug":"is-not-a-function-solved","status":"publish","type":"post","link":"https:\/\/codexjunction.com\/is-not-a-function-solved\/","title":{"rendered":"$ is not a Function &#8211; (Solved)"},"content":{"rendered":"<p>$ is not a Function is one of the most common jQuery function is encountered while working with jquery. Fresher or and Experienced developer, everyone faces this error in their daily development projects.<\/p>\n<p><a href=\"https:\/\/codexjunction.com\/hosting\/how-do-i-remove-the-monitoring-script-from-godaddy\/\"><strong>How Do I Remove the Monitoring Script from Godaddy<\/strong><\/a><\/p>\n<p>$ is not a function error can be caused due to various reasons as mentioned below:<\/p>\n<ul>\n<li>Due to jQuery conflict<\/li>\n<li>Due to not calling the jQuery library file before function<\/li>\n<li>Calling multiple jQuery library files in single page<\/li>\n<li>\n<pre class=\"lang-js prettyprint prettyprinted\"><code><span class=\"pln\">$<\/span><span class=\"pun\">(<\/span><span class=\"kwd\">function<\/span><span class=\"pun\">(<\/span><span class=\"pln\">$<\/span><span class=\"pun\">)<\/span> <span class=\"pun\">{}); Calling $ before function can also cause this issue sometimes, try to avoid it.<\/span><\/code><\/pre>\n<\/li>\n<\/ul>\n<p>$ is not a functions can be easily solved by the following methods:<\/p>\n<p>There are quite <a href=\"https:\/\/stackoverflow.com\/questions\/3931529\/is-not-a-function-jquery-error\" target=\"_blank\" rel=\"noopener noreferrer\">lots of answers<\/a> based on the situation.<\/p>\n<p>1) Try to replace\u00a0<strong>&#8216;$&#8217;<\/strong>\u00a0with\u00a0<strong>&#8220;jQuery&#8221;<\/strong><\/p>\n<p>2) Check that code you are executed are always below the main jquery script.<\/p>\n<pre class=\"lang-js prettyprint prettyprinted\"><code><span class=\"pun\">&lt;<\/span><span class=\"pln\">script src<\/span><span class=\"pun\">=<\/span><span class=\"str\">\"http:\/\/code.jquery.com\/jquery-1.11.3.min.js\"<\/span><span class=\"pun\">&gt;&lt;\/<\/span><span class=\"pln\">script<\/span><span class=\"pun\">&gt;<\/span>\r\n<span class=\"pun\">&lt;<\/span><span class=\"pln\">script type<\/span><span class=\"pun\">=<\/span><span class=\"str\">\"text\/javascript\"<\/span><span class=\"pun\">&gt;<\/span><span class=\"pln\">\r\njQuery<\/span><span class=\"pun\">(<\/span><span class=\"pln\">document<\/span><span class=\"pun\">).<\/span><span class=\"pln\">ready<\/span><span class=\"pun\">(<\/span><span class=\"kwd\">function<\/span><span class=\"pun\">(){<\/span>\r\n\r\n<span class=\"pun\">});<\/span>\r\n<span class=\"pun\">&lt;\/<\/span><span class=\"pln\">script<\/span><span class=\"pun\">&gt;<\/span><\/code><\/pre>\n<p>3) Pass $ into the function and add &#8220;jQuery&#8221; as a main function like below.<\/p>\n<pre class=\"lang-js prettyprint prettyprinted\"><code><span class=\"pun\">&lt;<\/span><span class=\"pln\">script type<\/span><span class=\"pun\">=<\/span><span class=\"str\">\"text\/javascript\"<\/span><span class=\"pun\">&gt;<\/span><span class=\"pln\">\r\njQuery<\/span><span class=\"pun\">(<\/span><span class=\"pln\">document<\/span><span class=\"pun\">).<\/span><span class=\"pln\">ready<\/span><span class=\"pun\">(<\/span><span class=\"kwd\">function<\/span><span class=\"pun\">(<\/span><span class=\"pln\">$<\/span><span class=\"pun\">){<\/span>\r\n\r\n<span class=\"pun\">});<\/span>\r\n<span class=\"pun\">&lt;\/<\/span><span class=\"pln\">script<\/span><span class=\"pun\">&gt;<\/span><\/code><\/pre>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>$ is not a Function is one of the most common jQuery function is encountered while working with jquery. Fresher or and Experienced developer, everyone faces this error in their daily development projects. How Do I Remove the Monitoring Script from Godaddy $ is not a function error can be caused due to various reasons as mentioned below: Due to jQuery conflict Due to not calling the jQuery library file before function Calling multiple jQuery library files in single page $(function($) {}); Calling $ before function can also cause this issue sometimes, try to avoid it. $ is not a [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":149,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[19],"tags":[512,146,143,141,145,142,138,140,508,510,511,509,139,144],"class_list":["post-100","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-jquery","tag-a-online-course-web-tutorial","tag-autocomplete-is-not-a-function","tag-datatable-is-not-a-function","tag-datepicker-is-not-a-function","tag-datetimepicker-is-not-a-function","tag-foreach-is-not-a-function","tag-jquery-is-not-a-function","tag-jquery-is-not-defined","tag-learn-java-online","tag-learn-laravel-online","tag-learn-php-online","tag-learn-python-online","tag-sortable-is-not-a-function","tag-typeerror-is-not-a-function"],"_links":{"self":[{"href":"https:\/\/codexjunction.com\/wp-json\/wp\/v2\/posts\/100","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/codexjunction.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/codexjunction.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/codexjunction.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/codexjunction.com\/wp-json\/wp\/v2\/comments?post=100"}],"version-history":[{"count":6,"href":"https:\/\/codexjunction.com\/wp-json\/wp\/v2\/posts\/100\/revisions"}],"predecessor-version":[{"id":2541,"href":"https:\/\/codexjunction.com\/wp-json\/wp\/v2\/posts\/100\/revisions\/2541"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/codexjunction.com\/wp-json\/wp\/v2\/media\/149"}],"wp:attachment":[{"href":"https:\/\/codexjunction.com\/wp-json\/wp\/v2\/media?parent=100"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/codexjunction.com\/wp-json\/wp\/v2\/categories?post=100"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/codexjunction.com\/wp-json\/wp\/v2\/tags?post=100"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}