js hints and hacks
Little script for run event after all images loaded.
jQuery plugin for checking input field by Credit Card Format like [xxxx-xxxx-xxxx-xxxx], which add and delete hyphen.
2 unnecessary options:
positionArray
- array of hyphen after specified numerallengthArray
length of credit card number without hyphen
By default:
positionArray : [4, 8, 12]
lengthArray : 16
Call:
$('input').creditСardFormat();
jQuery plugin for making Currency field with "$" and commas like: $12,345.
It is wrapping input in <div> and adding hidden input with same name (for sending to server just a number).
Call:
$('input').currencyFormat();
jQuery plugin for cutting text and adding ellipsis at the end.
Require DIV with "overflow: hidden" style and fixed height and tag P inside.
Call:
$('.ellipsis').addEllipsis();
Use:
[data-popup-link='name']
- use for target with name
as identifier[data-popup-content='name']
- popup content, be default should be hidden[data-popup-url='url']
- set url for ajax or 'href'
[data-popup-close='name']
- add close button on popup
Call:
$('[data-popup-link]').popup();