javascript - how to dispaly the qtip for the particular textbox if validation fails -



javascript - how to dispaly the qtip for the particular textbox if validation fails -

i trying larn qtip jquery plugin.i want display qtip fields have fails validation.i have tried below code not working.please allow me know doing right or not.and suggest plugins makes validation easy in relates qtip.

html

<input name="issuenumber" id="issuenumber" label="" placeholder="issue number" title="please come in issue number"></input>

jquery

//i used ternary operator ($('#'+namespaceinjs+'issuenumber').val()==null || $('#'+namespaceinjs+'issuenumber').val()== '') ?displayqtip(): alert("the value is"+$('#'+namespaceinjs+'issuenumber').val());

javascript

//i have used function in ternary operator.calling if validation fails. function displayqtip(){ alert("in displayqtip "); $('#'+namespaceinjs+'issuenumber').qtip({ overwrite: false, show: { event: false, ready: true }, hide: false, style: 'cream', position: { my: 'left center', // tool tip arrow place at: 'right center', // place of tool tip text box or target item target: $('#'+namespaceinjs+'issuenumber'), } }); }

javascript jquery qtip qtip2

Comments

Popular posts from this blog

c - Compilation of a code: unkown type name string -

ubuntu - Bash Script to Check That Files Are Being Created -

Php operator `break` doesn't stop while -