Create New Item
Item Type
File
Folder
Item Name
Search file in folder and subfolders...
Are you sure want to rename?
File Manager
/
wp-content
/
plugins
/
kapee-extensions
/
inc
/
admin
/
redux-core
/
inc
/
fields
/
spinner
:
redux-spinner.js
Advanced Search
Upload
New Item
Settings
Back
Back Up
Advanced Editor
Save
/* global redux */ (function( $ ) { 'use strict'; redux.field_objects = redux.field_objects || {}; redux.field_objects.spinner = redux.field_objects.spinner || {}; redux.field_objects.spinner.init = function( selector ) { selector = $.redux.getSelector( selector, 'spinner' ); $( selector ).each( function() { var el = $( this ); var parent = el; if ( ! el.hasClass( 'redux-field-container' ) ) { parent = el.parents( '.redux-field-container:first' ); } if ( parent.is( ':hidden' ) ) { return; } if ( parent.hasClass( 'redux-field-init' ) ) { parent.removeClass( 'redux-field-init' ); } else { return; } el.find( '.redux_spinner' ).each( function() { // Slider init. var spinner = $( this ).find( '.spinner-input' ).data(); spinner.id = $( this ).find( '.spinner-input' ).attr( 'id' ); el.find( '#' + spinner.id ).spinner( { value: parseFloat( spinner.val, null ), min: parseFloat( spinner.min, null ), max: parseFloat( spinner.max, null ), step: parseFloat( spinner.step, null ), addText: spinner.plus, subText: spinner.minus, prefix: spinner.prefix, suffix: spinner.suffix, places: spinner.places, point: spinner.point } ); } ); } ); }; })( jQuery );