Skip to content

Instantly share code, notes, and snippets.

@royboy789
royboy789 / ezdata_js_lib.js
Created August 27, 2017 04:41
EZ Data JS Library
var group_id = INT
var data = {
value: INT,
misc_one: INT,
misc_two: INT,
misc_three: STRING,
misc_four: STRING
}
ezdata.lib.create_item( group_id, data );
@royboy789
royboy789 / hasvalue.js
Created November 2, 2016 23:26
toggle class if input has value
$('.input-class').on('change', function(){
if( $(this).val().length > 0 ) {
$(this).toggleClass('value');
} else if($(this).val().length < 1 ) {
$(this).toggleClass('value');
}
});