return element index within min/max value

$.returnIdxProof = function(_idx, _max) { _idx = (_idx < 0) ? _max - 1 : _idx; _idx = (_idx < _max) ? _idx : 0; return _idx; };

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.