When adding jQuery to my template, I include it using the following code:
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js" type="text/javascript"></script>
After including jQuery, I also add a form to my page like this:
<form method="POST>
Quantity: <input type="text" name="quantity" /><br />
<input type="submit" value="Add To Cart"/>
</form>
However, when I check my console, it shows the error message:
Uncaught TypeError: Object #<Object> has no method 'canPushDown'
An interesting observation is that if I change the submit button value to:
value="Add To Car"
The error disappears! But, if I add an extra "t" to the value:
value="Add To Cartt"
The error comes back.
Below is my complete template code:
<!DOCTYPE html>
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js" type="text/javascript"></script>
</head>
<body>
<form method="POST">
Quantity: <input type="text" name="quantity" /><br />
<input type="submit" value="Add To Cart"/>
</form>
</body>
</html>
This issue seems to be specific to Django templates. Any insights on what could be causing this behavior?