The jQuery AJAX load() method is a very simple and powerful jQuery AJAX method. It loads data from the server and place the returned HTML into the matched element.
jQuery Ajax
Nowadays IT developers is fan of using Ajax due to requirement of time and rendering HTML without page refreshing. Mainly It works on asynchronous mode but we can use it in synchronous mode also.
Using PHP to extract img src alt and title from HTML
Using PHP to extract img src alt and title from HTML is quite easy and this can be done in two ways. Either using PHP regular expression matching or using the Document Object Model (DOM).
Here is a DOMDocument/DOMXPath based example to extract img src alt and title from HTML using PHP.
jQuery Expand Collapse with Plus Minus
Here is a simple jQuery Expand Collapse plug-in available to download. We have used plus/minus sign to expand/collapse content in this example and you can change them easily.
Moreover You can use nesting at any level. Clicking on anchor text to the left will take you to linked page/section. The final output will look like shown in image:
Getting top parent category
Someday before I got a query for getting top parent category of a post.
Query was as following: I have a post, the post is in 3 categories. The category hierarchy is like so: Fashion => Men => Shoes
WordPress – Shortcodes in custom widget
Few days before, I developed a custom widget as per requirement and in that I was using textbox and textarea for inputting data. I was using HTML tags and Shortcodes in custom widget but Problem was that short-codes rendering out as text.
Show content on mouseover using CSS
With powerful features of CSS we can show content on mouseover using CSS and we don’t need javascript. Here I have provided two examples, first contains no transition and second has CSS transition effect while hovering. You can see these examples in demo.
Display Data in Multiple Columns from Database using PHP
In some scenario we need to display data in multiple columns in a HTML table where each row from database keeps data for a single column. The data can be text, image or mixture of both. This article will guide you display data in multiple columns from database using PHP.
Responsive CSS framework or Bootstrap – navbar breaks on two line – fix
Bootstrap is popular HTML, CSS, and JS framework for developing responsive, mobile first projects on the web. I faced issue of Bootstrap navbar breaks on two line while designing interactive navbar header as you can see in picture below.
Removing whitespace between HTML elements
Sometimes we get undesirable gap between HTML element that create unwanted behaviour of element as a result. Fortunately, removing whitespace between HTML elements is not so hard. In this article we will discuss about some solutions to remove the space.
The top three solutions are dedicated as answer of the particular issue I have specified in this article. Later I have provided some general solutions that fit with other tags and elements like inline-blocked elements.