icheck

icheck-bootstrap的应用

自作多情 提交于 2020-01-08 02:15:09
icheck-bootstrap 效果演示,地址:http://www.htmleaf.com/Demo/201805245139.html //获取复选框的内容值 $ ( ".yw input[type='checkbox']" ) . on ( 'click' , function ( ) { $ ( '.ggbtn' ) . trigger ( 'click' ) } ) $ ( '.ggbtn' ) . on ( 'click' , function ( ) { //弹出结果 var arr_v = new Array ( ) ; $ ( "input[type='checkbox']:checked" ) . each ( function ( ) { arr_v . push ( $ ( this ) . val ( ) ) ; } ) ; arr_v . join ( ',' ) ; console . log ( arr_v ) ; } ) 来源: CSDN 作者: 做块泥 链接: https://blog.csdn.net/weixin_37787674/article/details/103880012

Limit number of checked checkboxes using iCheck

狂风中的少年 提交于 2020-01-06 15:18:11
问题 I'm using iCheck to style checkboxes and I'm having trouble using this along side validation. Basically I need to allow 3 checkboxes to be checked at a time and prevent further boxes from being checked. I've tried using this: $("#modal1").on("change", function() { var limit = 3, checkboxes = $(this).find("input:checkbox"), valid = checkboxes.filter(":checked").length >= limit; checkboxes.not(":checked").attr("disabled", valid); $('input').iCheck('update'); }); It works without iCheck as seen

提升用户体验的最佳免费 jQuery 表单插件

一世执手 提交于 2019-12-27 00:47:35
网页表单是一个老生常谈的话题。出于这样或那样的目的,一些示例中都会包括用户注册,电子商务结算,用户设置甚至联系人表格。而输入栏是非常容易用现代的CSS3技术来应用样式。但是到底什么决定整体用户体验? 在这篇文章中,我想展示一些免费的开源jQuery插件来帮助开发者创建更简易的web表单。访问者不用太多的犹豫就能完成表单的填写。你也许不想太过华丽页面元素,它会干扰手头的任务。考虑这些附加的特性,它就像一个用户指南,能帮助用户填写表单,而它们又涉及到唯一的或者不熟悉的内容。 jQuery Autotab 自动挑格是个很棒的功能,这个功能我们完全可以从头开发。但是如果你想节省时间的话,可以选择 jQuery AutoTab 这个强大的插件去简化这个功能。当一个字段达到最大长度时,jQuery AutoTab将会检测到,并自动跳到form表单的下一个元素中。 所有的input标签都是由以逗号间隔的字段组成的长字符串作为jQuery选择器来创建的。我喜欢这样的方式——使用这个插件,基于每个字段的tabindex属性,动态的,而不是手动地定义每个元素。它还有非常酷的过滤功能,以供你输入不同的内容,例如,数字的电话号码,或数字字母组合的街道地址。你可以从 Github官网 获得一个副本,来看一下这个插件是如何工作的。 Pickadate.js 不久之前

Spring项目结构

Deadly 提交于 2019-12-26 17:18:18
package com.layne.my.shop.common.context; import org.apache.commons.lang3.Validate; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.BeansException; import org.springframework.beans.factory.DisposableBean; import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationContextAware; public class SpringContext implements ApplicationContextAware, DisposableBean { private static final Logger logger = LoggerFactory.getLogger(SpringContext.class); private static ApplicationContext applicationContext; /** * 获取存储在静态变量中的

Angularjs directive: Icheck doesn't capture the first switch from true to false

时光怂恿深爱的人放手 提交于 2019-12-25 11:56:53
问题 Hi' I'm using Icheck with angularjs and I have a problem with the first switch from true to false, the $watch on ngModel isn't called and so it keeps value true in my angular variable. Where is the error? This is the code app.directive('icheck2', function ($timeout, $parse) { return { require: 'ngModel', link: function ($scope, element, $attrs, ngModel) { return $timeout(function () { $scope.$watch($attrs['ngModel'], function (newValue) { $(element).iCheck('update'); }); //Initialize first

icheck.js radio button automatically gets checked when tabbing (32) through form

放肆的年华 提交于 2019-12-25 11:53:05
问题 I am using icheck http://icheck.fronteed.com/ to have fancy radio buttons and check boxes. I am running into an issue though. When I am tabbing through my form and tabbing past the radio button it automatically checks one of the radio buttons. http://jsfiddle.net/75qmj037/7/ This is an example just tab through the form and see how it automatically checks the radio button. Does anyone know how I can change icheck.js so that this does not happen? I am trying to still be able to tab through the

jquery change attribute of icheck plugin

有些话、适合烂在心里 提交于 2019-12-08 08:43:29
问题 I have this code to style a checkbox using the iCheck plugin for jquery, is there a way to change the 'insert' attribute later?. I tried recreating the iCheck but the callback function is deleted if I do it that way. $(this).iCheck({ checkboxClass: checkboxClass, insert: '<div class="icheck_line-icon"></div>' + $(this).attr("data-label") }); $(this).on({ifChecked: function(){ iCheckChange(this, yes); },ifUnchecked: function(){ iCheckChange(this, no); } }); 回答1: Lets say you have checkboxes in

Check/Uncheck - ifChecked not working

心不动则不痛 提交于 2019-12-08 03:40:28
问题 UPDATE: I'm using the following plugin I'm trying to check if the checkbox is checked when the user refresh the page or reload the page and here is what I have used but I have done the debugging and it never execute the second IF condition $('input').on('ifChecked', function (event) { if ($("input#CreatePart").is(':checked')) { alert('checked'); } }); $('input').on('ifUnchecked', function (event) { if ($("input#CreatePart").is(':checked')) { alert('un-checked'); } }); <input checked="checked"

iCheck jQuery blocks custom script

北城以北 提交于 2019-12-06 21:47:27
问题 I used "iCheck jQuery" to modificate the style of the checkbox. But when i add a iCheck script - my onlick metod stops working. Why it happening? <input id="my_cb" type="checkbox" value="yes_n" onclick="hide_row_metod()"/> <script> $(document).ready(function(){ $('#my_cb').iCheck({ checkboxClass: 'icheckbox_square-blue', radioClass: 'iradio_square-blue', increaseArea: '20%' // optional }); }); </script> My script: <script> function hide_row_metod() { if(document.getElementById('my_cb')

jquery change attribute of icheck plugin

纵饮孤独 提交于 2019-12-06 15:00:00
I have this code to style a checkbox using the iCheck plugin for jquery, is there a way to change the 'insert' attribute later?. I tried recreating the iCheck but the callback function is deleted if I do it that way. $(this).iCheck({ checkboxClass: checkboxClass, insert: '<div class="icheck_line-icon"></div>' + $(this).attr("data-label") }); $(this).on({ifChecked: function(){ iCheckChange(this, yes); },ifUnchecked: function(){ iCheckChange(this, no); } }); Lets say you have checkboxes in this format: <input type="checkbox" class="my_checkbox" data-label="Check me" /> Than you can change your