jquery-keep in mind

Never keep 2 ids with the same name on the same page. You can keep 2 classes with the same name but not 2 ids. I was working on a header-script where 2 files were included.Both mobile_header.php and desktop_header.php included a javascript file. As the same file was included twice it was causing problem in showing […]

Read More

Dropdown arrow change on click

Code for changing the dropdown arrow on click. You can change the arrow from + to – You can change the symbols you want.[up-down,plus-minus etc]. Javascript code: function changeText(idElement) { var element = document.getElementById(‘element’ + idElement); if (idElement === 1 || idElement === 2 ) { if (element.innerHTML === ‘+’) element.innerHTML = ‘ -‘; else […]

Read More

Form Validation Using JavaScript

How to Validate HTML Form Using Javascript? I had a form where I needed to put a condition “Either email or phone number should be inserted”. A name was compulsory to add, so  I have added ‘required’ keyword in name field. But for Email and phone number validation I used javascript code. Following is the […]

Read More

Dynamic Charts Using PHP

Some people say that in PHP we cannot create charts. Others say that for creating chart we need to use plugins. But, I have found an easy solution of creating dynamic charts , without using any plugins in PHP. I have written this code to display the number of inquiries received by a college and […]

Read More

Create a simple widget|On image click pop-up window

To create pop-up window on image click following code should be used: Here I have used css to animate the image. If animation is not required “.element{” style should be removed DEMO:http://nkworlds.com/ [click on the smiley at the left hand side corner of the page]  ======================================================= <!DOCTYPE html> <html> <head> <style> /* The Modal (background) […]

Read More

Attractive Free Plugins For Any Website

Attractive Plugins For Website:Free Following are the URL’s of the websites which provides amazing widgets and plugins for the website. http://tutorialzine.com/2013/04/50-amazing-jquery-plugins/ https://www.sitepoint.com/10-attractive-jquery-widgets/ https://getsitecontrol.com/ https://webengage.com/ http://www.addthis.com/ http://100widgets.com/ https://www.revolvermaps.com/ http://www.coolwidgetsgadgets.com/ https://musefree.com/muse-widgets/animation/

Read More

Date Picker:Javascript,Jquery,PHP

<!–  jquery For datepicker –>     <link rel=”stylesheet” href=”jquery.ui.all.css” type=”text/css” />     <link rel=”stylesheet” href=”demos.css” type=”text/css” />     <link href=”jquery.ui.datepicker.css” rel=”stylesheet” type=”text/css”>     <script language=”JavaScript” src=”jquery.ui.datepicker.js”></script>     <script type=”text/javascript” src=”jquery.ui.core.js”></script> <!–  jquery For datepicker –> <script type=”text/javascript”> $(function() { $( “#p1startdate” ).datepicker({ yearRange: “-73:+0”, changeMonth: true, changeYear: true }); }); […]

Read More