What do you want to save?
Add Code snippet
New code examples
-
PHP 2021-10-14 18:49:06
submit form without page refresh using ajax jquery and php
$(document).ready(function(){ $('button').click(function(event){ event.preventDefault(); var name = $('#name').val(); var mobile = $('#mobile').val(); var address = $('#address').val(); var city = $('#city').val(); $.ajax({ type... Add solution -
Javascript 2021-10-13 13:15:06
jquery count selected options
$(document).ready(function(){ console.log($('#input1 option').size()); console.log($('#input1 option').length); }); <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> <select data-attr=... Add solution -
Javascript 2021-10-06 22:31:04
change background color on button click in javascript
<style> .bg1 { background-color: red; } </style> <button id="btnChangebgColor" /> <script> $(document).ready(function(){ $("#btnChangebgColor").click(function() { $(this).addClass(&quo... Add solution -
Javascript 2021-10-04 20:59:03
$ is not a function jquery
There are quite lots of answer based on situation. 1) Try to replace '$' with "jQuery" 2) Check that code you are executed are always below the main jquery script. <script src="http://code.jquery.com/jquery-1.11.3.min.js"><... Add solution -
PHP 2021-10-03 09:18:02
file upload in php through ajax
**1. index.php** <body> <span id="msg" style="color:red"></span><br/> <input type="file" id="photo"><br/> <script type="text/javascript" src="jquery-3.... Add solution -
Javascript 2021-10-01 22:14:02
jQuery - AJAX load() Method
<!DOCTYPE html> <html> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> <script> $(document).ready(function(){ $("button").click(function(){ $(&qu... Add solution -
Other 2021-09-28 02:59:03
show navbar on specific div
$(document).ready(function(){ $(".navbar").hide(); //Hide the navigation bar first $(window).scroll(function () { //Listen for the window's scroll event if (isScrolledAfterElement("#content")) { //if it has scrolled be... Add solution