Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var Style = {
- Clasic: function(element, valid) {
- if ( valid )
- {
- $(element).attr('class', 'styleOk');
- }
- else
- {
- $(element).attr('class', 'styleNotOk');
- }
- }
- };
- function Validators() {}
- Validators.prototype.checkStyle = function(event, valid)
- {
- if ( typeof(event.data) != 'undefined' && event.data )
- {
- if ( typeof(event.data.style) != 'undefined' && event.data.style )
- {
- Style.Clasic(event.target, valid);
- }
- }
- }
- // Require
- Validators.prototype.require = function(event)
- {
- var valid;
- if ( $(event.target).val() > 0 )
- {
- valid = true;
- }
- else
- {
- valid = false;
- }
- this.checkStyle(event, valid);
- }
- var V = new Validators();
- $('#detalii_2-varianta').bind('change', { style: 'clasic' },jQuery.proxy(V, 'require') );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement