$(...).ajaxForm is not a function

Artem picture Artem · Feb 8, 2016 · Viewed 8.5k times · Source

I load jquery and ajaxform plugin and after that init ajaxform on element.

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<script type="text/javascript" src="http://malsup.github.com/jquery.form.js" /></script>
<script src="script.js"></script>

script.js

$(document).ready(function() {
    $('.form').ajaxForm();
});

Error: $(...).ajaxForm is not a function. It appears on this site.

Answer

charlietfl picture charlietfl · Feb 8, 2016

Github isn't a CDN and will block you trying to use it as such.

jquery.form.js is available on numerous proper CDN's or you can download it and serve from your own site