I’m building a website with WordPress and I’m using a child theme I created. I would like to add a class to all my images depending on their orientation. (.portrait or .landscape) I did it with javascript but I have no idea how to do it with php. (I don’t know very well yet how to use filter…
Tag: javascript
How can I make a div scroll to the top of the page on click?
I have a set of buttons on a page and when someone’s clicks I want the button to expand and scroll to the top of the page (viewport height, not the actual top). This is my code – <div class="team-…
Modifying SQL entries with PHP hreferences
So I’m having trouble understanding how to go about modifying SQL entries individually while at the same time printing out all the results to a screen. I have root_user.php print out all of the users …
pass parameters in url via php
i am tying to pass some parameters in my URL via php. Below is my code i have tried. <button onclick="window.location.href='process2.php?name=' .$fname. '&Usrname=' .$name " style="…
Pull the headings and display it in a div in a list format
I have a dynamic container .product_section and I need to display the headings inside to div.toc in a UL list format. Hoping to have a script that checks every .product_section and creates a list …
Hyperlinks is not working right for search result titles
I am trying to show search results from two tables. I have used union to put them together. Right now they work, when I search for something and matches, it shows up from both of the tables but I am …
Displaying table data in modal with PHP and JavaScript
I’m still somewhat new to PHP and JavaScript. I’m working on a web application that involves me displaying some data in a table using PHP and MySQL. I would like to be able to click on a row of the …
JS files doesn’t work correctly in wordpress
As I’ve mentioned in the title, I’m having some problems with my js files. I’ve tested the scripts in the HTML template and works fine, but when I put them into the functions.php file there are some …
is there a way to update a div with new content only using ajax
This is the div that i am updating but i want to add a active class to the (li) item every time the div refreshes the active class goes away so i don`t want to refresh all the data in the (ul) but …
How can i make if else condition inside sweetalert2 swal.fire?
My table has relationship with other field table(Constraint foreign key), so when this delete button click. it will show sweet alert that the data cannot be delete if they connected. Here my code &…