While working with fancybox, you might have noticed that any button or link or input inside fancybox popup just behaves like previous/next item slider, making that coming item to appear in popup rather of doing it’s assigned code on click. All the reason is the width specified for `fancybox-nav` class with higher `z-index` for it.
Author » Amit Sonkhiya
MySQL insert row if not exists else update record
Sometimes we create MySQL tables which don’t contain auto increment primary key column instead they may have unique key or combination of unique indexes. In such tables we wish to insert a new row if primary/unique key or keys combination doesn’t exists and update record if exists.
Get query string parameters values from URL in JavaScript
Sometimes we need to retrieve URL parameters values from browser address bar in our client side script to process some functioning like click to a button or show/hide some elements. Here I have created a function in JavaScript to get query string parameters from URL and displayed uses example.
Htaccess redirect www to non www. http & https
This article will provide you htaccess rules to redirect a www website to non www. I prefer to make rule regardless of using name of specific domain so no-where in this article I have used domain name. The general sort of solution to make www to non www apache htaccess redirect
RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC] RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
Non-www to www redirect. http & https in apache htaccess
For a better site optimization and accessibility we might wish to redirect a non-www site to www. For this we have to write a few rules in htaccess file at our apache server. I’m mentioning here code of just 3 lines to achieve non-www to www redirect.
Organizing Codeigniter Controllers into Sub-Directories or Subfolders
While developing large applications, we might wish to organize Controllers into Sub-Directories or Subfolders for our convenient. This article will guide you to smoothly organize the controllers in sub-directory or folder. I’m using Codeigniter version 3.0 here.
Display Data in Responsive Columns from Database using PHP
As responsive design has come into trends, I decided to write this post to display Data in Responsive Columns from Database using PHP. Like the image below, a product catalog would be good example of this where columns adjust them automatically to maintain responsiveness with different screen sizes.
20 jQuery Interview Questions – I
This post is first article in the series of Interview Questions about jQuery. This post is comprehensive collection of 20 jQuery Interview Questions from beginner level to experience level. Let’s start reading with first simple question, what is jQuery?
Getting Class or Id of element that fired an event
In jQuery we sometimes need to find class or Id of element that fires an event in a web page. This simple code below will do the job for getting Class or Id of element that fired an event in jQuery.
First of all we need jQuery so you need to add self hosted jQuery or one from available CDNs. I’m getting it from Google here.
Bootstrap Popover and Tooltip not working with AJAX content
With already present elements in HTML these Bootstrap JavaScript Plugins work fine but not with dynamically loading AJAX content. This article here explains the reason behind Bootstrap Popover and Tooltip not working with AJAX content and the way to let them work.