Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 uid=33(www-data) gid=33(www-data) groups=33(www-data) Safe-mode: OFF (not secure) /var/www/html/dokan/assets/seller/product/ drwxr-xr-x | |
| Viewing file: Select action/file-type: (function ($) {
"use strict";
$('.add_attr').on('click',function(){
var html=$('.attrs_row').html();
var num=Math.floor(Math.random() * 99) + 1;
$('#data-body').append('<tr class="attr_'+num+'"><td><select data-id="'+num+'" class="form-control parent_attr"><option value="" disabled selected>Select Varient</option>'+html+'</select></td><td><select name="child[]" class="multi-select form-control child'+num+'" width="100%"></select></td><td><a data-id="'+num+'" class="btn btn-danger remove_attr text-white"><i class="fa fa-trash"></i></a></td></tr>');
});
$(document).on('change','.parent_attr',function(){
var variations=$('option:selected', this).attr('data-parentattribute');
var variations=JSON.parse(variations);
var id= $(this).attr('data-id');
var value= $(this).val();
$('.attr'+id).remove();
$('.child'+id).attr('multiple','');
$('.child'+id).attr('name','child['+value+'][]');
$.each(variations, function (key, item)
{
var html="<option value="+item.id+" class='attr"+id+"'>"+item.name+"</option>";
$('.child'+id).append(html);
});
$('.child'+id).val('');
$('.multi-select').select2()
});
$(document).on('click','.remove_attr',function(){
var id= $(this).data('id');
$('.attr_'+id).remove();
});
})(jQuery);
|
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0048 ]-- |