Switch Case in PHP

php

Here is example of PHP switch-case Statements. in this example you will get output as day wise. <?php $today = date(“D”); switch($today){ case “Mon”: echo “Today is Monday. Clean your house.”; break; case “Tue”: echo “Today is Tuesday. Buy some…

Read MoreSwitch Case in PHP

AngularJS Animations

<!DOCTYPE html> <html> <style> div { transition: all linear 0.5s; background-color: pink; height: 100px; width: 100px; position: relative; top: 0; left: 0; } .ng-hide { height: 0; width: 0; background-color: transparent; top:200px; left: 3px; } </style> <script src=””></script> <script src=””></script>…

Read MoreAngularJS Animations

Laravel Session

Sessions provide a way to store information across multiple requests. In laravel, the session configuration file is stored in ‘app You can pass session value across the different pages within same domain or website. You do not need to handle $_COOKIE…

Read MoreLaravel Session

jQuery Date formate

Add this function to your <script></script> and call from where ever you want in that <script></script> <script> window.alert(Getnow()); function GetNow(){ var currentdate = new Date(); var datetime = currentdate.getDate() + “-” + (currentdate.getMonth()+1) + “-” + currentdate.getFullYear() + ” “…

Read MorejQuery Date formate

Tabs using jQuery

let lean how to create tabs using a Jquery and CSS. How To Create Tabs <div id=”example-tabs”> <h3>Keyboard</h3> <section> <p>What is needed to transform it to a tabs component? Not much. Just override some properties and done.</p> </section> <h3>demos</h3> <section>…

Read MoreTabs using jQuery

jQuery Events

Click() Events: $(‘li’).click(function(event){ alert(“Hello World”); }); $(‘li’).on(‘click’, function(event){ alert(“Hello World”); }); 2) Hover() Event: $(‘img’).on(‘hover’, function(event){ alert(“Hello World”); }); Document Loading ready() Event: $(document).ready(function(){ $(“button”).click(function(){ alert(“thanks for clicking”); }); }); Browser Events resize() Events: $(window).resize(function(){ alert(“Your Windows Resizing”); }); 2.…

Read MorejQuery Events

CSS – Media Queries

@media at-rules, used to target styles at specific media, such as screen or print.A page can then be optimized and laid out completely differently for mobile phones, tablets, and varying browser window sizes. @media screen { body { font: 12px arial, sans-serif } #nav { display: block…

Read MoreCSS – Media Queries

Upload File Using AngularJS

<html> <head> <script src = “”></script> </head> <body ng-app = “myApp”> <div ng-controller = “myCtrl”> <input type = “file” file-model = “myFile”/> <button ng-click = “uploadFile()”>upload</button> </div> <script> var myApp = angular.module(‘myApp’, []); myApp.directive(‘fileModel’, [‘$parse’, function ($parse) { return {…

Read MoreUpload File Using AngularJS