1 function initHelpTips(selector){
2 /* initialize the help tips for each item on the create VM template */
4 $(selector).find('input, select')
5 .live('focus', helpTip)
7 .find('input[type="checkbox"]')
8 .live('click', helpTip);
12 var label = $(this).prev('label').html();
14 // Handle the special case of NIC link field, where prev is mode, not label.
15 var prevprev_label = $(this).prev().prev('label');
16 if (prevprev_label.text().substring(3,0)==="NIC"){
17 label = prevprev_label.html();
20 /* Strip all digits and underscores from end of name.
21 Makes things work with unknown number of disks/nics. */
22 var content = $('#help-'+name.replace(/[0-9_]*$/,''));
24 if(content.length != 0){
29 .html(content.html());