jQuery Navigation/ Promotional Banner- Cookie

Following is the code for a  Promotional banner which is supposed to be seen on all the pages of the website. The banner would have the following functionalities: It should be displayed above the header. It has a close button. If anyone closes the banner it should not be displayed again on any page for […]

Read More

jQuery Navigation/ Promotional Banner- Session

Following is the code for a  Promotional banner which is supposed to be seen on all the pages of the website. The banner would have the following functionalities: It should be displayed above the header. It has a close button. If anyone closes the banner it should not be displayed again on any page for […]

Read More

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

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