Skip to content

Tag: jquery

jQuery UI sortable images

Hi I ‘d like some help please, as my skills in jQuery are not so good. What I want to achieve is to change the order of the images like this example. My database looks like this: I have also created these 2 views: index.php order_ajax.php I have also created and the order_ajax controller So what I basically w…

Create and Call a JavaScript Function in PHP

I have just started learning how to create web applications in PHP after migrating from ASP.NET. I wanted to know how to integrate JavaScript with PHP. For example, there is a Home.php page that resides in the website’s root folder. The page has an HTML button on it and a simple JavaScript function that…

How to access php session in javascript file?

Below is my code: index.php file javascript of index.php file HTML of index.php Description: I have a web page with url localhost/index.php. In index.php, I have a submit button on the click of which I call Result javascript method which sets the marks = 55 and put it into the hidden field and takes me to the…

Add attribute to wp_get_attachment_image

I’m trying to add an attribute to the result of wp_get_attachment_image. I want to use jquery lazyload to handle loading of my post thumbnails and to do that I need to add a data-original= attribute to the <img> tag wp_get_attachment_image is creating. I’ve tried: But it doesn’t add th…

AJAX function in the widget class

I created a WordPress Widget which get the recent posts, first get a specific number of posts, then there is a button to get more posts by AJAX. The full Widget code And this is the AJAX code to get ajaxloadMore function output and append to the ul tag How to get $catid and $number variables from the function…