1/* Invite Friends to Register JS */ 2 3jQuery(function(jQuery) { 4 var i = 0; 5 6 jQuery('.invfr_add').on('click', function() { 7 8 // clone 9 var row = jQuery('#invfr_form .inviteFriendDiv:last'); 10 var clone = row.clone(); 11 clone.find('input').val(''); 12 row.after(clone); 13 // increment name and id 14 clone.find('input') 15 .attr('name', function(index, name) { 16 return name.replace(/(\d+)/, function(fullMatch, n) { 17 return Number(n) + 1; 18 }); 19 }) 20 .attr('id', function(index, name) { 21 return name.replace(/(\d+)/, function(fullMatch, n) { 22 return Number(n) + 1; 23 }); 24 }); 25 26 return false; 27 }); 28 29 jQuery('#inviteModal').on('hidden.bs.modal', function (e) { 30 jQuery('#invfr_form').find("input[type=text],input[type=email]").val('').end(); 31 jQuery('.inviteToDivClass').html(''); 32jQuery('#invfr_note').html(''); 33//jQuery('.error .error-msg').text(''); 34jQuery('.error').removeClass('error'); 35jQuery('.error-msg').removeAttr('style'); 36 37 38 jQuery('.inviteToDivClass').html('<h5>Friends</h5><div class="inviteFriendDiv"><div class="input-group mb-3 inputDivClass"><div class="input-group-prepend"><span class="input-group-text" id="inputGroup-sizing-default">To: </span></div><input type="email" name="friend_email[0]" id="friend_email-0" value="" class="form-control toEmailId" aria-label="Default" aria-describedby="inputGroup-sizing-default" placeholder="Email ID" /><span class="error-msg">Enter a valid email address</span></div> <div class="input-group mb-3 p-0 inputDivClass marginRight0Px" ><input type="text" name="friend_name[0]" id="friend_name-0" value="" class="form-control " aria-label="Default" aria-describedby="inputGroup-sizing-default" placeholder="Name" /><span class="error-msg">Enter your friend’s name</span></div><a class="invfr_remove"><i class="fa fa-times" aria-hidden="true"></i></a></div> '); 39 40 41}); 42 43 44}); 45 46 jQuery("body").on("click", ".invfr_remove", function () { 47 jQuery(this).closest("div").remove(); 48 });
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.