skip to Main Content

return The Id of selected button – Jquery

Hi there I have the following card that has 3 selectable buttons button. <ul class="nav nav-tabs border-0" role="tablist" id="FlightType" onclick="SelectedFlightType()"> <li class="nav-item"> <button class="nav-link active" id="oneway-tab" data-bs-toggle="tab" data-bs-target="#oneway" type="button" role="tab" aria-controls="oneway" aria-selected="true"> <span class="d-inline-block icon-20 rounded-circle bg-white align-middle me-2"></span>One-way </button>…

VIEW QUESTION

how to show checkbox as checked in jquery

enter image description here $(document).ready(function() { $('.editbtn').on('click', function(){ $('#editmodal').modal('show'); $tr=$(this).closest('tr'); var data= $tr.children("td").map(function(){ return $(this).text(); }).get(); console.log(data); $('#update_id').val(data[0]); $('#finame').val(data[1]); $('#liname').val(data[2]); $('#Eimail').val(data[3]); $('#ContactNumber').val(data[4]); $('#Giender').val(data[5]); $('#Dob').val(data[6]); $('#addriess').val(data[7]); $('#Ciity').val(data[8]); $('#pinicode').val(data[9]); $('#stiate').val(data[10]); $('#countiry').val(data[11]); $('#HobbyiDrawing').each(function(){ this.checked = true; }); $('#HobbyiDrawing').each(function(){ this.checked = false; }); //…

VIEW QUESTION

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
Back To Top
Search