Add equation selector
This commit is contained in:
@@ -64,12 +64,16 @@ jQuery(document).ready(function($){
|
||||
}
|
||||
|
||||
// Equation selector
|
||||
$('.sp-equation-selector select').change(function() {
|
||||
$('.sp-equation-selector select:last').change(function() {
|
||||
$(this).siblings().change(function() {
|
||||
if($(this).val() == '') $(this).remove();
|
||||
}).find('option:first').text($(this).attr('data-remove-text'));
|
||||
if($(this).val() != '') {
|
||||
$(this).before($(this).clone().val($(this).val())).val('').siblings().change(function() {
|
||||
if($(this).val() == '') $(this).remove();
|
||||
}).find('option:first').text($(this).attr('data-remove-text'));
|
||||
$(this).before($(this).clone().val($(this).val())).val('');
|
||||
}
|
||||
});
|
||||
|
||||
// Trigger equation selector
|
||||
$('.sp-equation-selector select:last').change();
|
||||
|
||||
});
|
||||
Reference in New Issue
Block a user