Tag: jQuery
JavaScript
var inputName = $(‘input[name=”bodySample-1″]’).attr(‘name’); var prefix = ‘bodySample-‘; if (inputName.indexOf(prefix) === 0) { var value = inputName.substr(prefix.length); console.log(value); } This code will log...
UI Components
Date range picker Date Range Picker is a JavaScript component that provides a simple way for users to choose date ranges, dates, and times. This tool is perfect for booking systems, calendars, scheduling applications, and any other web application that requires users...
jQuery
Here is a simple method to do something after the jQuery DataTables has been successfully loaded. Just add your step inside “initComplete” function. CODE <!DOCTYPE html> <html> <head> <title>Callback function every time new...
jQuery
I use “keyup change search” in event listner like the following code below. $(“#filterCards”).on(‘keyup change search’, function() { // Do something… });
jQuery
Here is the script you can use on page load, or wheneverr user submits message or on new user chat click. You will need to include jQuery before this code to functions as expected. The jQuery stop() method is used to stop animations or effects before it is...