## Check if the checkbox is checked or not. Here, checkbox is the id of checkbox. $(‘#checkbox’).on(‘click’, function(){ if ($(this).is(‘:checked’)== true) { console.log(‘Checked’); } else …
Read MoreJQuery
Preg match in Jquery
CHECK EXPRESSION LIKE:: 11112233-1234 <input type=”text” value=”” name=”preg” id=”preg” placeholder=”11112233-1234″ form-control”> <script type=”text/javascript”> $(‘#preg’).on(‘keyup’, function(){ var dis = $(this); var _preg = “[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][-][0-9][0-9][0-9][0-9]”; if(dis.val().match(/[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][-][0-9][0-9][0-9][0-9]/)){ console.log(‘Matched’); …
Read MoreCheckbox property
[the_ad id=”527″]## disabled checkbox add class $(“#updt-usr-editcat-btn”).prop(“disabled”, true).addClass(“.btn-disable”); ## Disabled checkbox add css style $(“#updt-usr-editcat-btn”).prop(“disabled”, true).css(“cursor”,”not-allowed”); $(“#updt-usr-editcat-btn”).prop(“disabled”, true).css(“cursor”,”pointer”);
Read MoreSelect Checkbox value in Jquery
## we can check by using this $(“input.checkbxclass[type=checkbox]”).click(function(e){ console.log(“Selected”); }); ## we can check by using this also $(“input:checkbox.checkbxclass”).click(function(e){ console.log(“Selected”); }); Note: here, checkbxclass is …
Read MoreRead each checkbox if it is checked in jquery
## Read each check box $(“input:checkbox[class=checkbx]:checked”).each(function () { console.log(“check-box checked”); });
Read MoreConvert string to uppercase
## get ucfirst in jquery ## get first letter uppercase in jquery var str = “hello world”; var newstr = str.toLowerCase().replace(/\b[a-z]/g, function(letter) { …
Read MoreMake string uppercase in jquery
## get ucfirst in jquery ## get first letter uppercase in jquery <!– Html Input box : starts –> <p><input type=”text” id=”test” name=”test”/></p> <p><input …
Read MoreFacebook share using third party
## Share page in social site. Just add the block where you want it will work as you want. It show all social Link <!– …
Read MoreCalling a swal function in php
#calling the swal function:: <script> function notify() { swal({ title: “Are you sure?”, text: “Login Required.You will redirect for login.”, type: “warning”, …
Read MoreEmail Validation check in javascript
## Used To Validate Email In Javascript <script > function validateEmail(email) { var emailReg = /^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/; return emailReg.test( email ); …
Read More