[Solved] Change all prices (numbers) with 20% on webpage [closed]

Does the following help: var currentMode = 1; var discount = 0.20; var reverseDiscount = 1/(1-discount); function togglePrices() { var prices = document.getElementsByClassName(“price”); for (var i = 0; i < prices.length; i++) { var individualPrice = prices[i].innerHTML.substring(1); if(currentMode == 1) { individualPrice = parseFloat(individualPrice) * (1-discount); } else { individualPrice = parseFloat(individualPrice) * reverseDiscount; } … Read more

[Solved] Making an input icon (search icon) responsive [closed]

Try this: .input_with_icon { position: relative; } .input_with_icon .form-control { padding-left: 40px; height: 21px; } .input_with_icon img { position: absolute; top: 5px; bottom: 0; left: 10px; margin: auto; } <div class=”input_with_icon”> <input type=”text” class=”form-control” placeholder=”Search here…”> <img src=”https://stackoverflow.com/questions/59323509/images/search.png”> </div> solved Making an input icon (search icon) responsive [closed]

[Solved] How to change the element of another div by clicking and hovering on an element of a different div

Like people have said there are many ways to do this. One way would be to use JavaScript event listeners. Here’s a quick little demo: let change = document.getElementById(“change”); let hover = document.getElementById(“hover”); hover.addEventListener(“mouseover”, changeColor); hover.addEventListener(“mouseout”, changeColor); function changeColor() { change.classList.toggle(“red”); } div { width: 100px; height: 100px; margin: 2rem; background-color: green; } .red { … Read more

[Solved] WordPress plugin Responsive Slick Slider

Slick slider supports responsive breakpoints. This example below is taken directly from their documentation: $(‘.yoursliderclass’).slick({ centerMode: true, centerPadding: ’60px’, slidesToShow: 3, responsive: [ { breakpoint: 768, settings: { arrows: false, centerMode: true, centerPadding: ’40px’, slidesToShow: 3 } }, { breakpoint: 480, settings: { arrows: false, centerMode: true, centerPadding: ’40px’, slidesToShow: 1 } } ] }); … Read more

[Solved] HTML Button that opens a panel [closed]

I dont know how familiar you are with CSS and JS, but you can do 2 things: 1. Use a div in the root of the body element, with position:absolute or position:fixed(Depending on your design and layout) and z-index:-100 or whatever is needed to hide it, and then use JS or jQuery to change z-index … Read more

[Solved] How can I get a solution for this?

HTML <input type=”radio” id=”radio1″ name=”radio” value=”Yes” /><label for=”radio1″>Yes</label> <input type=”radio” id=”radio2″ name=”radio” value=”No”/><label for=”radio2″>No</label> JS $(function () { $(“input[name=”radio”]”).on(“change”, function () { if($(“input[name=”radio”]:checked”).val() == “Yes”){ alert(“Enter your requirements”); } }); }); JSFiddle try this solved How can I get a solution for this?

[Solved] Space not working in my form? [closed]

I think I found the problem but not sure if it is yours. If you disable JavaScript, then you can add spaces so definitely a .js file causing this issue! You have so many JavaScript files all the time that makes it very difficult to track a specific problem but in your jquery.galleriffic.min.js there are … Read more

[Solved] A button who submits a form and redirect to another page

Using PHP, you can redirect the user after handling the submitted data: // After handling submitted data, redirect: header(“Location: new-page-here.php”); This is actually recommended, as it stops the user re-submitting the data if they refresh the page. As per the instructions for header(), do not echo any HTML before it. This includes whitespace before your … Read more

[Solved] switching between pictures randomally [closed]

I made you a page that switches between two images in a random manner. You can easily expand this, by adding image urls to the images array <!DOCTYPE html> <html> <head> <script type=”text/javascript”> var p = { onload: function() { setInterval(p.switchImage, 10000); }, switchImage: function() { document.getElementById(“image”).src = p.images[Math.floor(Math.random() * p.images.length)]; }, images: [“http://www.schoolplaten.com/afbeelding-hond-tt20990.jpg”, “http://www.schoolplaten.com/afbeelding-hond-tt19753.jpg”] … Read more

[Solved] Drop down list in java script [closed]

HTML Markup <select id=”dropdown”> <option>First</option> <option>Second</option> <option>Third</option> </select> <textarea id=”textarea”> </textarea> Javascript document.getElementById(‘dropdown’) .addEventListener(‘change’, function () { console.log(this.value); document.getElementById(‘textarea’).innerHTML += this.value; }, false); Working fiddle here. Hope this helps. Answer 2: After you updated your question, var list1 = document.createElement(“select”); for(var u=0; u<=20; u++) { var w= document.createElement(“option”); var e = document.createTextNode(u); w.appendChild(e); list1 .appendChild(w); … Read more

[Solved] Sendmail as HTML output [closed]

Add Content-type:text/html;charset=UTF-8 to you header and remove * from html tags like this $headers = “MIME-Version: 1.0” . “\r\n”; $headers .= “Content-type:text/html;charset=UTF-8” . “\r\n”; $headers .= “From: <****@example.com>’ . “\r\n”; $headers .= “Cc: ****@example.com’ . “\r\n”; $message =” <html> <head> <title>HTML email</title> </head> <body> <div>Hello ” . $row[‘first_name’] . ” ” . $row[‘last_name’] . “</div> … Read more