Wednesday, 1 July 2015

Blink a text using CSS

Blink a text using CSS

CSS:
.blink_me {
    -webkit-animation-name: blinker;
    -webkit-animation-duration: 1s;
    -webkit-animation-timing-function: linear;
    -webkit-animation-iteration-count: infinite;

    -moz-animation-name: blinker;
    -moz-animation-duration: 1s;
    -moz-animation-timing-function: linear;
    -moz-animation-iteration-count: infinite;

    animation-name: blinker;
    animation-duration: 1s;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}

@-moz-keyframes blinker {  
    0% { opacity: 1.0; }
    50% { opacity: 0.0; }
    100% { opacity: 1.0; }
}

@-webkit-keyframes blinker {  
    0% { opacity: 1.0; }
    50% { opacity: 0.0; }
    100% { opacity: 1.0; }
}

@keyframes blinker {  
    0% { opacity: 1.0; }
    50% { opacity: 0.0; }
    100% { opacity: 1.0; }
}
 
 
HTML:
<span class="blink_me">This Will Blink</span>
 
 
 

Monday, 4 May 2015

CRUD Operations in MVC 4

CRUD Operations in MVC 4

Link: http://www.codeproject.com/Articles/695850/Complete-CRUD-Operations-in-MVC

Thursday, 16 April 2015

Disable button on click while saving/updating

Disable button on click

OnClientClick="this.disabled = true; this.value = 'Submitting...';" UseSubmitBehavior="false"

Thursday, 19 February 2015

Compare Dates in javascript, jquery

Compare Dates  in javascript, jquery   

function dateVerity() {
          var from = document.getElementById('<%=Textbox1.ClientID%>').value;
          var to = document.getElementById('<%=Textbox2.ClientID%>').value;
          var arr_From = from.split("/");
          var arr_To = to.split("/");
         
          var d1 = new Date(arr_From[2], arr_From[1]-1, arr_From[0]); // Jan 1, 2011
          var d2 = new Date(arr_To[2], arr_To[1]-1, arr_To[0]); // Jan 2, 2011
          d1.setMonth(d1.getMonth() + 3); // Adding three months
          d1.setDate(d1.getDate() -1); // Substracting 1 day
          var d11 = d1.setHours(0, 0, 0, 0); // set hours to Zero because only dates will compare
          var d22 = d2.setHours(0, 0, 0, 0); // set hours to Zero because only dates will compare
       
          if (d22 < d11) {
              alert("There should be 3 months gap between from and to date");
              return false;
          }
          else {
              return true;
          }
         
      }