Posts

Showing posts from November, 2014

File Uploaded Name Rename

**************************Jquery******************************** $(function () {     $(".edit").on('click', 'span', function () {         var input = $('<input />', {             'type': 'text',                 'name': 'unique',                 'value': $(this).html()         });         $(this).parent().append(input);         $(this).remove();         input.focus();     });     $(".edit").on('blur', 'input', function () {         $(this).parent().append($('<span />').html($(this).val()));         $(this).remove();     }); }); ***********************HTML************************************* <div class="edit"> <span class="">TESTING</span> </di...

Small Screen Data-table View

****************************Jquery*********************************** $ ( document ). ready ( function  () {          var   headertext  = [],      headers  =  document . querySelectorAll ( "#customDataTable th" ),      tablerows  =  document . querySelectorAll ( "#customDataTable th" ),      tablebody  =  document . querySelector ( "#customDataTable tbody" );          for  ( var   i  =  0 ;  i  <  headers . length ;  i ++) {              var   current  =  headers [ i ];              headertext . push ( current . textContent . replace ( /\r ? \n | \r/ ,  "" ));      ...

Modal + iOS virtual keyboard

***************************Jquery ************************************* // This entire section makes Bootstrap Modals work with iOS     // This entire section makes Bootstrap Modals work with iOS     if (navigator.userAgent.match(/iPhone|iPad|iPod/i)) {         $('.modal').on('show.bs.modal', function () {             setTimeout(function () {                 scrollLocation = $(window).scrollTop();                 $('.modal')                     .addClass('modal-ios')                     .height($(window).height())                     .css({ 'margin-top': scrollLocation + 'px' });             }, 0);         });     ...