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

[ad_1] 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 … Read more

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

[ad_1] $(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” … Read more

[Solved] filling a form with jquery [closed]

[ad_1] 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]

[ad_1] 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 … Read more

[Solved] How to put HTML, CSS and JS in one single file

[ad_1] you cannot save all the file extension into one single file. Css is .css, Javascript is .js. but you can link all those files into your html <link rel=”stylesheet” type=”text/css” href=”https://stackoverflow.com/questions/47306539/yourcssfile.css”> for javascript <script src=”https://stackoverflow.com/questions/47306539/yourjsfile.js”></script> [ad_2] solved How to put HTML, CSS and JS in one single file

[Solved] Click outside of div and more [duplicate]

[ad_1] $(function() { $(‘#loginBtn, #loginArea’).on(‘click’, function(e) { $(‘#loginArea’).show(); e.stopPropagation(); }); $(‘body’).on(‘click’, function() { $(‘#loginArea’).hide(); }); }); If the click is within the login area or on the button, then the event will not make it to the second handler to hide the login area. [ad_2] solved Click outside of div and more [duplicate]

[Solved] format a 12 digit number in XXXX XXXX XXXX format using javascript

[ad_1] You can use selectionEnd to control the position of cursor var target = document.querySelector(‘.creditCardText’); target.addEventListener(“keyup”, function() { var position = target.selectionStart; var prevVal = target.value; var newVal = prevVal.split(” “).join(“”); // remove spaces if (newVal.length > 0) { newVal = newVal.match(new RegExp(‘.{1,4}’, ‘g’)).join(” “); } target.value = newVal; for (var i = 0; i … Read more

[Solved] jQuery and javascript – conceptual

[ad_1] You are importing jQuery script file before your test.js and because of that, the browser knows how to handle $ calls. If you remove jQuery script, you will get an error “$ is undefined“ [ad_2] solved jQuery and javascript – conceptual

[Solved] Find piece of string inside array and do something if I can find it

[ad_1] Your question still isn’t explained very well, but I think I have it. You’re asking why this returns true: if($(this).html().indexOf(“Title A”) != -1) { //should get here } But this doesn’t: var titles = [“Title A”]; var realTitle = $(this).html(); if (titles.indexOf(realTitle) > -1) { //should get here } The difference has to do … Read more

[Solved] Using jQuery deferred and promise inside loop

[ad_1] I think you can do something as simple as this: var sortedArray = [AList, BList, CList, DList]; Promise.all(sortedArray.map(function(value) { var url = …; return getListItems(url); })).then(function(results) { // results is an array of results from AList, BList, CList, DList in order let allJsonData = []; results.forEach(function(approvedListItems) { allJsonData.push.apply(allJsonData, approvedListItems.d.results); }); // process allJsonData here … Read more