I’m new to WordPress and I’m trying to convert a pure HTML Theme to a WordPress theme. But I have a problem that I can’t find a solution for. In the nav menu, I can’t find a way to selectively add classes to the ul and li elements that WordPress generates as a menu. Basically, I need t…
Tag: javascript
So I’m making an Editor website, and I want to have a save button that will only save the code written in the box, and not the entire editor code
So, as I mentioned I am making an HTML, CSS and JavaScript editor and I need a save button, but I’m not sure of the code for it. I know a code that will make it save the entire code (script) for the editor, but I don’t want that, I want to make a Save button that will only save
CloudFlare cached pages – country detection
I’m working on a purchase page for a new product that the inventor is expecting to receive significant media coverage for (time will tell…). We’re building a simple 1-page product page using HTML, CSS and using Stripe’s (hosted) checkout pages. We’re trying to minimise the amount…
Submitting an HTML form to a PHP file with JS validation
I’m sending data via an HTML form to a PHP file for it to be inserted into a DB with SQL script, The same form is validated with JavaScript functions. Each of the two works as expected separately, but when used together – <form method=”POST” action=”myPHPFile.php” onsubm…
multi buttons on one javascript function
foreach fetch songs from database each audio have button to pause and play all buttons of all songs works with first song only… when i press button of second or third song the first run … any solution ? blade.php js.file Answer With var player=document.getElementById(“player”); you sel…
How to use Javascript or CSS files installed by Composer?
How do I actually use the frontend files that Composer installs? Specifically JavaScript. I’ve been able to use a PHP file previously, but JavaScript files are breaking my brain… I’ve installed Composer and used it to install a package (Handlebars, specifically). Everything looks like it sho…
jQuery AJAX – Not receiving JSON data when on localhost using XAMPP
I’m using this code: inside do_getmemes.php the post parameters are received successfully and the json is getting generated but I don’t get it on success?? Console isn’t showing anything. It works fine on the website but not when on localhost using XAMPP It all works inside the php file, thi…
Upload, resize and send images to server with javascript
After struggling with this issue for 2 days, reading a lot of material online, here I am begging for your help. I’m trying to resize some images uploaded via FileReader, resize with canvas and send to my server with php. Everything works as expected, except when I try to upload multiple files. The scrip…
Destructuring in php
Is it possible to use javascript like destructuring to create an associative array from variables with variable names as keys in PHP… in javascript I can do Currently I am stick to repetitive way Can anyone help, it will save me a whole lot of typing? Answer There’s no need to create your own func…
ajax get data request url not found but already exist, Laravel 8
hello guys i have a problem with my ajax data json, i have a project about scan a barcode with a webcam but it just views the code of the barcode, the data in the database not call in my ajax, this is the code of blade, i’m using a modal this is the modal this is the jquery code