jQuery( document ).ready( function() { jQuery.fn.suggestPro = function() { jQuery( postmanPro ).each( function( index, value ){ var allRows = jQuery( '.ps-socket-wizad-row' ); var totalRows = allRows.length - 1; var lastRow = jQuery( allRows[totalRows] ); var lastRowLength = lastRow.find( 'label' ); //Write in existing row if( lastRowLength.length < 3 ) { jQuery( lastRow ).append( ` ` ); } //New row else { jQuery( lastRow ).after( `
` ); } } ); } } )