Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var tmp = '<div class="nB vCenter mr10">' +
- '<span class="B w15 h15 rad5 whiteBkg blackBrdr " data-offstate="blackBrdr" data-onstate="whiteBkg blackBrdr">' +
- '<input type="checkbox" class="i_chk hide" name="teamFolder" value=""/></span>' +
- '</div>' +
- '<div class="nB vCenter">' +
- '<label class="nB w160p">Team Folder</label>' +
- '</div>' +
- '<div class="mt15">' +
- '<div class="nB vCenter mr10">' +
- '<span class="B w15 h15 rad5 whiteBkg blackBrdr " data-offstate="blackBrdr" data-onstate="whiteBkg blackBrdr">' +
- '<input type="checkbox" class="i_chk hide" name="teamFolder" value=""/></span>' +
- '</div>' +
- '<div class="nB vCenter">' +
- '<label class="nB w160p">Personal Folder</label>' +
- '</div>' ;
- // this is the code for checkbox generation
- $(document).on('click', 'span', function () {
- var chk = $(this).find('.i_chk');
- if (chk.prop('checked')) {
- chk.prop('checked', false);
- $(this).removeClass('greenTick');
- } else if (chk.prop('checked') == false) {
- chk.prop('checked', true);
- $(this).addClass('greenTick');
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement