Search Posts

Category: jquery-ui

AngularJS Directive – ng-model of an input changes on removing the focus

I have created a simple angular plugin for jQuery autocomplete. Everything works perfect except the following, Type php in the input, options appears for selection. Select an option by mouse or keyboard Problem Now, when click anywhere outside the input, the model value changes from actual value which is an object to a string and then blur event gets triggered. I am not sure how does the model value changes. Any help appreciated! Take a […]

Multiplication on click show into input filed with Different ID

I am designing shopping cart functionality. And Fresher in jQuery My layout is This is my design I want to when click on increment and Decrements button then increment value and decrements value multiply into input field value below is my jQuery code $(‘.increment-btn’).on(‘click’,function(){ var $counter=$(this).closest(‘td’).find(‘.counter’); var currentVal = parseInt($counter.val()); if (!isNaN(currentVal) && currentVal > 0) {$counter.val(currentVal – 1); } }); this is HTML code <table Style=”width:100%;” class=”sumtable”> <tr> <td id=”info” Style=”padding-left: 3%;width: 20%; “>Buy […]