skip to Main Content

jQuery.Deferred exception: Cannot set properties of undefined (setting '_renderItem')

I've been using the following code to render the autocomplete results: $('#'+id_input).data("ui-autocomplete")._renderItem = function(ul, item){ let conteudo=""; conteudo += "<div class='autocomplete__comparador' >"+ "<div style='display:inline-block;vertical-align:top;'>" + "<div class='autocomplete_nome_fundo'><span style='font-size:14px;'>" + item.ticker + '</span>&nbsp;&nbsp;&nbsp;' + item.nome + "</div>"+ "</div>"+ "</div>"; return $("<li…

VIEW QUESTION

Change jquery function in for loop?

Could this function be shortened? ` $(function () { let section1 = $('.amount_1').attr('data-product_id'); let section2 = $('.amount_2').attr('data-product_id'); let section5 = $('.amount_5').attr('data-product_id'); let section10= $('.amount_10').attr('data-product_id'); let section15 = $('.amount_15').attr('data-product_id'); let $link1 = $("#" + section1).find('a').clone().text(''); if ($link1.length > 0) { $('.col1').removeAttr("href").removeClass("single").wrap($link1).addClass("active");…

VIEW QUESTION

remove selected item using jquery

How I get active class only on click div not on all div?? html code <div class="col-12"> <div class="place" id="test-1"></div> </div> <div class="col-12"> <div class="place" id="test-2"></div> </div> <div class="col-12"> <div class="place" id="test-3"></div> </div> Jquery code // adding this div for…

VIEW QUESTION

How to Click many buttons by jquery for loop

I'm trying to call many button by one jquery function. following is my html and php code: Elements of button: for($q_no=1;$q_no<=30;$q_no++){ echo('<button class="q_no_btn" id="'.$q_no.'">Question no '.$q_no.'</button>'); } My Jquery code: $(document).ready(function(){ var q_no; for(q_no=1;q_no<=30;q_no++){ $("#"(q_no).click(function(){ alert("Click on 1!!!"); })) }…

VIEW QUESTION
Back To Top
Search