[Solved] How to list array names in json [closed]

You are misunderstanding usage of data types. Array is an anonymous type, you don’t name it’s elements. If you want to know name of an array, then you must change this structure to a dictionary (map). var arrayMapping = { ‘arr1’: […], ‘arr2’: […] }; But by doing so remember that every array will have … Read more

[Solved] Display issues on website after selecting language [closed]

You should probably mention what technology you are using for the translations. Also the issue seems to be that you are using a sub-folder for each language. Ex: https://www.hollandmarineparts.nl works but https://www.hollandmarineparts.nl/nl doesn’t. It seems that the routes are broken for when you have a language other than default. (determined from the errors in the … Read more

[Solved] How to get the list elements using jquery? [closed]

$(document).ready(function() { $(“#btn”).click(function() { let url = $(“#url”).val(); $(“#result”).text(`Looking for [${url}]`); let link = $(`a[href=”https://stackoverflow.com/questions/62111716/${url}”]`); if (link.length>0) { let li = link.parents(“li”).last(); $(“#result”).text(`${li.text()}`); } else { $(“#result”).text(`no item found for ${url}`); } }); }); <script src=”https://cdnjs.cloudflare.com/ajax/libs/jquery/1.12.4/jquery.min.js”></script> <div class=”paragraph”> <ol> <li>I want a <a href=”https://www.111.com” target=”_blank”>Chocolate</a><span style=”color:rgb(80, 141, 36)”> Cookie</span></li> <li>I want a <a href=”https://www.222.com” target=”_blank”>Strawberry</a><span … Read more

[Solved] How to make new array or arrays with contents from other arrays?

If you do not care about destroying arr2, neither about having a deep copy of arr1[0], a simple unshift() can do that: const arr1 = [[1, 2, 3, 4], [5, 6, 7, 8]]; const arr2 = [[‘some1’, ‘some2’], [‘some3’, ‘some4’]]; arr2.unshift(arr1[0]); console.log(JSON.stringify(arr2)); Of course those are really some conditions which may not fit your case. … Read more

[Solved] sum of column using jquery [closed]

This is when the “context” of the input that matters: you want to update the sum that is in the same column where the input element was updated. What you can do is: Get the index of the <td> element the input belongs to Calculate the sum of all expenses belonging to the same column. … Read more

[Solved] filling a form with jquery [closed]

Try this HTML <input type=”text” name=”” id=”voornaam” value=”” class=”full” /> <input type=”text” name=”” id=”achternaam” value=”” class=”full” /> <span class=”data-name”>Dhr. name lastname</span> jQuery $(‘#voornaam’).on(‘keyup’, function () { var name = this.value; var lastname = $(‘#achternaam’).val(); $(‘.data-name’).text(name + ” ” + lastname); }); $(‘#achternaam’).on(‘keyup’, function () { var lastname = this.value; var name = $(‘#voornaam’).val(); $(‘.data-name’).text(name + … Read more

[Solved] How do I make two images fade in/out repeatedly? [closed]

CSS Animation Wrap both images in a block element that has: position:relative Set both images to position:absolute Make 2 @keyframes and animation: 10s infinite alternate Assign a @keyframe animation to each image. The 2 properties being animated is opacity and z-index (z-index is only on 2 frames because there’s only 2 states really lower or … Read more