What do you want to save?
Add Code snippet
New code examples
-
PHP 2022-01-22 09:45:28
Determine the percentage of the file uploaded to the server using php
$(function() { var bar = $('.bar'); var percent = $('.percent'); var status = $('#status'); $('form').ajaxForm({ beforeSend: function() { status.empty(); var percentVal = '0%'; bar.width(percen... Add solution -
Other 2022-01-22 06:30:01
select2 multi select
######## In your HTML: <select class="js-example-basic-multiple" name="states[]" multiple="multiple"> <option value="AL">Alabama</option> ... <option value="WY">Wyoming</... Add solution -
Javascript 2021-11-22 05:33:17
Submit AJAX Forms with JQuery to database
$(function() { $('form.my_form').submit(function(event) { event.preventDefault(); // Prevent the form from submitting via the browser var form = $(this); $.ajax({ type: form.attr('method'), url: form.attr('action'), data: f... Add solution -
Javascript 2021-11-22 01:37:18
Prevent an ajax request firing twice with jQuery
var ajaxLoading = false; $(document).ready(function() { $('#ajaxRequestor').click(function(e) { e.preventDefault(); if(!ajaxLoading) { ajaxLoading = true; $('#ajaxContentPlaceholder').load('/path/to/content.html... Add solution -
Other 2021-11-22 01:36:24
bootstrap keep tab open cookie
$(function() { // for bootstrap 3 use 'shown.bs.tab', for bootstrap 2 use 'shown' in the next line $('a[data-toggle="tab"]').on('shown.bs.tab', function (e) { // save the latest tab; use cookies if you like 'em better: l... Add solution -
Javascript 2021-11-22 00:27:11
simultaneos mouse buttons clicked js
var leftButtonDown = false; var rightButtonDown = false; $(document).mousedown(function() { if(e.which == 1) { leftButtonDown = true; } else if (e.which == 3) { rightButtonDown = true; } }); $(document).mouseup(function() { ... Add solution -
Javascript 2021-11-21 19:46:12
discord js setinterval
var checkminutes = 10, checkthe_interval = checkminutes * 60 * 1000; //This checks every 10 minutes, change 10 to whatever minute you'd like setInterval(function() { message.channel.send("hello world"); //Or anything else }, checkthe_interval); Add solution -
Javascript 2021-11-20 22:29:24
jquery slider get value on change
$(function() { $( "#slider" ).slider({ range:"min", min: 0, max: 100, value: 10, slide: function wynik( event, ui ) { $( "#price" ).val("$" + ui.value); } }); $( "#price" ).val( &quo... Add solution
Best helpers
Ranking is empty