skip to Main Content

How to remove undefined from a list of items? – Jquery

How to prevent appearing undefined in the output? var item1 = $(result).find('.item:nth-child(2) a').html(), item2 = $(result).find('.item:nth-child(3) a').html(), item3 = $(result).find('.item:nth-child(4) a').html(), item4 = $(result).find('.item:nth-child(5) a').html(); $('div').html(item1+item2+item3+item4);

VIEW QUESTION

Ajax call from click event issue – Jquery

Look at the HTML code below: <div class="user-avatar-wrapper"> <img class="profile-pic" src="/placeholder.png" alt="" /> <div class="upload-button"></div> <input class="file-upload" type="file" accept="image/*"/> </div> Now I want to trigger the file upload and call to ajax on the click by .upload-button. This is how…

VIEW QUESTION
Back To Top
Search