%PDF- %PDF-
Direktori : /var/www/html/shaban/laviva/wp-content/themes/levelup/admin/assets/js/vc_extend/ |
Current File : /var/www/html/shaban/laviva/wp-content/themes/levelup/admin/assets/js/vc_extend/br_taxonomy.js |
jQuery(function($) { "use strict"; $('.wpb_el_type_br_posttype .br_posttype').click(function(e){ var $this = $(this), $input = $this.parents('.wpb_el_type_br_posttype').find('.br_posttype_field'), arr = $input.val().split(','); if ( $this.is(':checked') ) { arr.push($this.val()); var emptyKey = arr.indexOf(""); if ( emptyKey > -1 ) { arr.splice(emptyKey, 1); } } else { var foundKey = arr.indexOf($this.val()); if ( foundKey > -1 ) { arr.splice(foundKey, 1); } } $input.val(arr.join(',')); }); $('.wpb_el_type_br_taxonomy .br_taxonomy').click(function(e){ var $this = $(this), $input = $this.parents('.wpb_el_type_br_taxonomy').find('.br_taxonomy_field'), arr = $input.val().split(','); if ( $this.is(':checked') ) { arr.push($this.val()); var emptyKey = arr.indexOf(""); if ( emptyKey > -1 ) { arr.splice(emptyKey, 1); } } else { var foundKey = arr.indexOf($this.val()); if ( foundKey > -1 ) { arr.splice(foundKey, 1); } } $input.val(arr.join(',')); }); $('.wpb_vc_param_value.wpb-textinput.content.textfield').on('change', function(e){ e.preventDefault(); var $input = $(this), $valCont = $('<div></div>').html($input.val()), $val = $valCont.children(); if ( $val.length > 0 && $val.is('iframe') ) { $input.val($val.attr('src')); } }); // only for pie charts });