Hi all,
I’ve got a code that calculates the amount of <li>
tags are produced but I’m looking to do a sum ; total amount of <li>
take away 5…
source: projects,
open: function( event, ui ) {
var len = $('.ui-autocomplete > li').length;
console.log('Founded '+len+' results');
console.log( $( "#this" ).html('There are '+len+' results') )
$( ".ui-menu-item:nth-child(5)" ).append( '<li class="more_results"><div>There are '+len+' results <a href="">view all courses</a></div></li>' );
}
})
Is anyone able to point me in the right direction please?
Thanks