Tag jquery

[Solved] Need help linking 2k files into html [closed]

Given your specific situation as explained in the chat, you have no access to the ‘back end’ you DO have access and permission to change the directory-structure and file-names of the course-materials (pdf-files) current path & filenaming conventions are a…

[Solved] how to remove excess data in javascript array [closed]

Your selector is considering all the checkboxes on the page which are checked so the extra values are of some other checkboxes, instead use .map on input:checkbox:checked[name=”lecture”] $(‘#separate_course_list’).on(“change”, “:checkbox”, function () { var values = $(‘input:checkbox:checked[name=”lecture”]’).map(function () { return this.value;…

[Solved] jQuery multiple getElementByID

I think this will help you to achieve your goal. I have removed some unwanted details from your example, and try to keep it as simple as possible. <div class=”action” > <span class=”MyBtn” rel=”myModal1″ style=”color:orange”>Title 1</span> </div> <!– The Modal…

[Solved] how i can sum qty by grouping name of goods? [closed]

You can use each tr and filter to implement your requirement: $(“button”).click(function(){ var group = []; $(“tr”).each(function(index,item){ if(index > 0){ let id = $(item).find(‘td’).eq(0).text(); let name = $(item).find(‘td’).eq(1).text(); let count = parseInt($(item).find(‘td’).eq(2).text()); let exist = group.filter(c=>c.name == name)[0]; if(exist !=…

[Solved] Get one JSON value with another?

Parse it and Iterate over it var data = JSON.parse(‘{“XXX”:{“x”:”1″,”y”:”2″},”XXX”:{“x”:”3″,”y”:”3″}}’); var y = 0; $.each(data, function(i, item) { alert(‘With Jquery X = ‘+item.x); alert(‘With Jquery Y = ‘+item.y); //if you want to get the value of y based on x…

[Solved] React jQuery(this) selector is not working

this points to React component instance and not the input element. You can achieve this using event.target class LoginReg extends Component { render() { function minimizeLabel(event){ $(event.target).closest(“.Reg-fields”).css(“border-bottom”, “2px solid #f99”); $(event.target).closest(“label”).css(“top”, “-15px”).css(“font-size”, “.7em”).css(“transition”, “.3s ease-out”); } return ( <div> <div…

[Solved] Convert from JavaScript function to jQuery

This is my solution, in the future post your HTML code for helping us to solve the problem: $(function(){ $(‘.thumbnail’).click(function(){ $(‘#mainVideo’).replaceWith(‘<video id=”mainVideo” width=320 height=240 autoplay></video>’); $(‘#mainVideo’).html($(this).html()); }); }); Here is the fiddle 4 solved Convert from JavaScript function to jQuery

[Solved] Jquery Multiple Select Show values in [closed]

Try it like, var ul = $(‘<ul>’).appendTo(‘body’); function createList() { ul.empty(); $(‘select option:selected’).each(function() { li = $(‘<li/>’).text($(this).text()).attr(‘value’, this.value); li.appendTo(ul); }); } $(‘select’).on(‘change’, function() { createList() }).trigger(‘change’); <script src=””></script> <select name=”is_format” id=”is_format”> <option value=”A4″>{l s=”A4″}</option> <option value=”A3″>{l s=”A3″}</option> </select> <select name=”is_color”…

[Solved] Refresh table after seconds

You need to use $.ajax like $(function(){ function getdata(){ $.ajax({ url:’getdata.php’, success:function(response){ $(‘#dataTables-example tbody’).html(response); } }); } setInterval(function(){getdata()},5000); }); getdata.php <?php $req = mysqli_query($con, ‘select user_id, user_name from users’); while ($dnn = mysqli_fetch_array($req)) { echo “<tr> <td>” . $dnn[‘user_id’] .…