Posts

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 : Array .min

  javascript : Array  .min Target: Applicable with  Array  Data Type. Description : It traverse array and return minimum value. Note: If array is empty then return  undefined  . Syntax: []  .min Usase: [1,2,3,4,5,2,8,3,1].min It return  1 ['z','b','x','a','c'].min It return  'a' Download MYJS.js MyJs is a collection of java script extension methods that enhances the JavaScript objects, class object, DOM element, domElementsCollections, Date, String, Number and other data type.  Include in you project landing page (master page) and it will extends your DOM and JavaScript Objects.

javascript : Array .max

  javascript : Array  .max Target: Applicable with  Array  Data Type. Description : It traverse array and return maximum value. Note: If array is empty then return  undefined  . Syntax: []  .max Usase: [1,2,3,4,5,2,8,3,1].max It return  8 ['a','b','x','z','c'].max It return  'z' Download MYJS.js MyJs is a collection of java script extension methods that enhances the JavaScript objects, class object, DOM element, domElementsCollections, Date, String, Number and other data type.  Include in you project landing page (master page) and it will extends your DOM and JavaScript Objects.

javascript: Array .last

  javascript: Array  .last Target: Applicable with  Array  Data Type. Description : Return last element of array. Array[  lastIndex  ] element Note: If array is empty then return  undefined  . Syntax: []  .last return  Array[  lastIndex  ] element Usase: [1,2,3,4,5].last It return  5 [].last It return  undefined Download MYJS.js MyJs is a collection of java script extension methods that enhances the JavaScript objects, class object, DOM element, domElementsCollections, Date, String, Number and other data type.  Include in you project landing page (master page) and it will extends your DOM and JavaScript Objects.

javascript : Array .first

  javascript : Array  .first Target: Applicable with  Array  Data Type. Description : Return first element of array. Array[0] element Note: If array is empty then return  undefined  . Syntax: []  .first return  Array[0] element Usase: [1,2,3,4,5].first It return  1 [].first It return  undefined Download MYJS.js MyJs is a collection of java script extension methods that enhances the JavaScript objects, class object, DOM element, domElementsCollections, Date, String, Number and other data type.  Include in you project landing page (master page) and it will extends your DOM and JavaScript Objects.

javascript : Object .isString

  javascript : Object  .isString Target: Applicable with any javascript  Object  Variable  that holds string value . Description : When an object holds an string value then it return  true   otherwise  undefined   . basically it is defined in String prototype. Many time in programming we face a problem that an object variable holds String value or other object structure then it help us. Before writing the code of String manipulation we can check whether a variable holds String value or not. Note: It is an property of String, that is defined in String Prototype. It is useful to check an object variable is String or any other type. another way to check variable holds string value is "typeof(variable) == 'string'" Syntax: ObjectVariable  .isString return  true  when object hold's String value otherwise  undefined Usase: var obj = 'abcd'; console.log('typeof obj = ' + typeof(obj)); if(obj.isString){      co...

javascript : .one(eventName,eventHandlerFunction)

  javascript : .one( eventName,eventHandlerFunction ) Target: Applicable with any DOM element. getElementById getElementsByTagName getElementsByClassName getElementsByName querySelector querySelectorAll Description : It register  eventHandlerFunction  only for one time execution with element on triggering of  eventName.  After executing eventHandlerFunction it automatically removed. eventName  : name of event that trigger the event handler function. 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 with one element. Syntax: DOMElement.one( eventName, eventHandlerFunction ) DOMNodeList.one( eventName, eventHandlerFunction ) HTMLCollection.one( eventName, eventHandlerFunction ) Us...