Posts

Showing posts with the label multiple

MultiRangeSlider.js: JavaScript HTML CSS

Image
MultiRangeSlider.js download MultiRangeSlider.js MultiRangeSlider.min.js MultiRangeSlider.css source code and demo download source code view demo view demo style 1 view demo style 2 Description We face a problem that input type range allow only one value to select. If we want to select two values from a range we have no option. we need to add two input type range slider to take input min value and max value. Handling two input range control is not easy and manages events is also very difficult. For the solution of selecting multiple value and handling events it provide a solution. It allows user to select min value and max value from a range slider. It's design layout is fully controlled by CSS and provide a lot of events to handle via JavaScript. How to Use download MultiRangeSlider.js/MultiRangeSlider.min.js and include in your project. There are two way to add this control on form Method 1 let options ={container: document.querySelector('.container')}; let multiRangeSlid...

javascript : .on(eventName,eventHandlerFunction)

  javascript : .on( eventName,eventHandlerFunction ) .on( eventName.NameSpace,eventHandlerFunction ) Target: Applicable with any DOM element. getElementById getElementsByTagName getElementsByClassName getElementsByName querySelector querySelectorAll Description : It register  eventHandlerFunction  with element on triggering of  eventName   . It is the easy way to use of  addEventListener  method. eventName  : name of event that trigger the event handler function. .NameSpace  : optional for registring more than one eventHandlerFunction with an event . eventHandlerFunction  : function that register with event and executes when event fired. The [ this ] refer to the object with that eventName is register within the eventHandlerFunction. The [ e ] argument of eventHandlerFunction received the event object of event. Note: It register only one eventHandlerFunction with one event. If you want to register more than one  eventHandlerFunction...