What do you want to save?
Add Code snippet
New code examples
-
Javascript 2022-03-17 01:15:38
pakistan contact js validation
/** * @author: Mr. Waseem * @notice: Below script will validate the Pakistani contact number * e.g. (3333333333). excluding the +92 or 0 from start */ let regx_cell = /^\d{3}\d{7}$|^\d{11}$|^\d{4}-\d{7}$/; $('.other_respondent_contact').on('keypr... Add solution -
Javascript 2022-01-30 23:55:43
url(image loacation) give a class
var basePath = 'mysite/images/'; $('a').each(function() { var className = $(this).attr('class'); className = className.replace(/[^f][^0-9]*/, '').replace(' ', ''); $(this).css('background-image', basePath + className + '.png'); }); Add solution -
Javascript 2021-11-16 10:12:21
add color to attribute using jquery
$(this).css('color', 'red'); Add solution -
Javascript 2021-11-11 01:22:09
change color of input if submit clicked and input is empty
HTML : Text <input type="text"> <button>Click Me</button> -------------------------- JQuery : $("button").on("click",function(){ if($("[type='text']").val() == null){ $(this).css("... Add solution -
Javascript 2021-11-06 19:11:07
jquery change font size
$(this).css({ 'font-size': '15px' }); Add solution -
Javascript 2021-10-14 08:04:15
customize function (doc) datatable printable
Plain text12345678910111213141516{ extend: 'print',text: '<i class="fa fa-plus" aria-hidden="true"><span class="{{ App::isLocale('ar')? 'font-ar' : '' }}">@lang('master.print')</span></i>', ... Add solution -
Other 2021-10-12 12:33:13
bootstrap table striped hidden rows
// For Bootstrap 4 $("tr:visible").each(function (index) { $(this).css("background-color", !!(index & 1)? "rgba(0,0,0,.05)" : "rgba(0,0,0,0)"); }); // For previous versions $("tr:not(.hidden)").ea... Add solution -
Javascript 2021-10-11 04:17:04
backdrop issue with multiple modal
$(document).on('show.bs.modal', '.modal', function (event) { var zIndex = 1040 + (10 * $('.modal:visible').length); $(this).css('z-index', zIndex); setTimeout(function() { $('.modal-backdrop').not('.modal-stack').css('z-index', zIndex - 1).addCl... Add solution