Wednesday, December 25, 2013

JQuery hints

Set a field value: $('input[title=Email]').attr({value:'test email'});

Hide a row: $('h3:contains("Title")').closest('tr').hide();

Change event on choice field: $('select[title=Display]').change(function(){alert($('select[title=Display]').val())});

Condition: if($('select[title=Display]').val()=="Yes") {alert($('input[title=Email]').val());}