1๐
โ
You forgot to close the ready
function:
$(document).ready(function(){
$("button").click(function(){
$("p").toggle();
});
}); // <-- Close the function
๐คEli
1๐
Yes, you can use jquery in your django project.
The problem with this code is that you forgot to close the ready button
$(document).ready(function(){
$("button").click(function(){
$("p").toggle();
});
});
If you want to use jquery in your django project then Iโll suggest you to include jquery in the base template and use that template to create other pages. Also it is advisable to create separate blocks of javascript, css and HTML so that you can choose what files you want to include in particular page, it is much easier that way.
๐คShobhit Sharma
- [Answered ]-Django โ How to link tables
- [Answered ]-Form wizard with ModelForms having parameters in __init__
Source:stackexchange.com