increase input box numbers by clicking plus sign:: <script> $(document).ready(function() { $(".input a").click(function() { var inputEl = $(this).parent().parent().children().next().children(); var qty = inputEl.val(); if ($(this).parent().hasClass("plus")) qty++; else qty--; if (qty < 0) qty = 0; inputEl.val(qty); }) }); </script> <div class="input-qty-box"> <div class="input"> <ul class="range"> <li class="item minus"><a style=" cursor:pointer">-</a></li> <li> <input type="text" maxlength="3" size="2" value="1" … Continue reading increase input box numbers by clicking plus sign
Category: Article
What is difference between datetime and timestamp?
Datetime is a datatype. Timestamp is a method for row versioning. In fact, in sql server 2008 this column type was renamed (i.e. timestamp is deprecated) to rowversion. It basically means that every time a row is changed, this value is increased. This is done with a database counter which automatically increase for every inserted … Continue reading What is difference between datetime and timestamp?
Checking if string contains “HTTP://”
How To Remove html tags from validation_errors() in Codeigniter
How To Remove html tags from validation_errors() in Codeigniter Remove html tags from validation_errors() in Codeigniter Set the Opening tag and Closing Tags for error validation blank or anything you want to use. //Forn Validation Error Html Tags removing. $this->form_validation->set_error_delimiters('',''); Or $this->form_validation->set_error_delimiters('<span>','</span>');
Check if Image Exists or Not corrupted in Php
Check if Image Exists or Not corrupted in Php $full_path = Full Image path; (Like: ../dd/tmp.jpg) if(!file_exists($full_path)){ //Image Not Available or Not Exists }else{ //Image File Exists //Check if image not damaged. $ext = strtolower(pathinfo($full_path, PATHINFO_EXTENSION)); if ($ext === 'jpg') { $ext = 'jpeg'; } $function = 'imagecreatefrom' . $ext; if (function_exists($function) && @$function($full_path) === … Continue reading Check if Image Exists or Not corrupted in Php
How to Align A image Center of Div (top,bottom,left,right) using CSS ??
How to Align A image Center of Div (top,bottom,left,right) using CSS ?? Example: <div class="image"> <img alt="" src="Path" /> </div> CSS:: .image { width: 100%; height: 230px; position: relative; } .image img { position: absolute; top: 0; bottom: 0; margin: auto; … Continue reading How to Align A image Center of Div (top,bottom,left,right) using CSS ??
Align a image in the center of the Div using CSS
Align a image in the center of the Div using CSS Stack of Codes HTML: <div class="frame"> <img src="foo"/> </div> CSS: .frame { height: 160px; /*can be anything*/ width: 160px; /*can be anything*/ position: relative; } img { max-height: 100%; max-width: 100%; … Continue reading Align a image in the center of the Div using CSS