One day, I came across a problem for unwrapping anchor tag from its contents. Jquery provides us a unWrap function to unwrap the tag by removing it’s parent tag from the DOM. So there are lot of ways to unwrap a html tag itself using jQuery, overall it depends on your html structure.
Author » K K Agrawal
Removing unused shortcodes from the post content
In WordPress, we use plenty of plugins, Some of these plugins require us to place a shortcode in the post, like [favourite_posts]. Shortcode may be a good way to add functionality on our site, but when we deactivate the plugin, the shortcode in the post content donβt get removed.
Removing shortcodes from the post content
Wordpress users use shortcodes in the post content for integrating PHP or other type of code between the content and may be a good way to add functionality to the site. But sometimes we need for removing shortcodes from the post content from a specific page or specific post.
Detect orientation change on mobile devices
Let’s check out how we can detect orientation change on mobile devices. Mobile devices have two type of layout view, one is portrait and other one is landscape view.
jQuery slideUp(), slideDown() and slideToggle()
The jQuery slide methods slides elements up and down. jQuery comes with three handy methods to create the sliding effect easily :
iPad/iPhone detection using JavaScript
every website is designed as a responsive so that it can be visited on any resolution window. But browser does not behave same on all the devices. For that, In CSS, we use media query. But using css, we can’t generate html fully compatible with all the devices.
I wanted to post another useful snippet of code for iPad/iPhone detection using javascript
find last position of a substring into a string
Sometimes we need to find last position of a substring into a string. Substring may be a character or a part of a string. Javascript provide us a method
check a substring into a string
Sometimes we need to check the existence of a character or sub-string into a string or find the position of a character or sub-string into a string. Javascript provide us a very simple method :
IE 8 CSS3 border radius hack in wp site
I am looking for a “working” IE 8 CSS3 border radius hack in wp site. I am using htc file also, I have created a css file in wp theme’s css folder and placed border radious styles there with IE8 hack
How to resize colorbox
Sometimes we need to resize colorbox after clicking on sumbit button and we want to show some error or success messages on the same popup window by using javascript or ajax