Skip to content

Instantly share code, notes, and snippets.

View abhishek-9ithub's full-sized avatar

Abhishek Mishra abhishek-9ithub

  • India
View GitHub Profile
@abhishek-9ithub
abhishek-9ithub / removefakepath.js
Created November 25, 2017 09:22
remove fake path of file upload value
fileValueAfterChange = fileValueAfterChange.substring(fileValueAfterChange.lastIndexOf("\\") + 1, fileValueAfterChange.length);
@abhishek-9ithub
abhishek-9ithub / checkone.js
Created November 25, 2017 09:17
checkbox check one at a time
$(function(){
$(':checkbox').on('change',function(){
var th = $(this), name = th.prop('name');
if(th.is(':checked')){
$(':checkbox[name="' + name + '"]').not($(this)).prop('checked',false);
}
});
});
@abhishek-9ithub
abhishek-9ithub / horizontalTableStickyScroller.js
Created November 25, 2017 09:13
horizontal-sticky-table-scrollbar
$(document).ready(function() {
$('input').attr('maxlength', '50');
var scrollbar = $('<div id="fixed-scrollbar"><div></div></div>').appendTo($(document.body));
scrollbar.hide().css({
overflowX: 'auto',
position: 'fixed',
width: '100%',
bottom: 0
});
var fakecontent = scrollbar.find('div');