-
Notifications
You must be signed in to change notification settings - Fork 578
Open
Description
Hi
JQuery version: 3.5.1
I have a simple problem: I cannot put var and conditional functions in the function of this library
My code:
` $("#change-color-04").spectrum({
type:"color",
showButtons: false,
showAlpha: false,
allowEmpty: false,
showInput: true,
palette: [ ],
showSelectionPalette: false,
selectionPalette: ["#d8dee3", "#232830","#363e45","#739921"],
///////////////////////////////////
checkOptionSelect = $("p").filter("#theme-manager-theme-list-result").text()
checkOption01 = $("p").find("#option-change-themes-01").text()
checkOption02 = $("p").find("#option-change-themes-02").text()
if( checkOptionSelect === checkOption01 )
{
move: function(color) {
$("div").filter("#change-color-04").css("background-color",color.toHexString())
$("p,h2").filter("#texts-fontcolor").css("color",color.toHexString())
$("span").filter(".data-theme-manager-theme-01-texts-color").text( color.toHexString() )
}
return
}
if( checkOptionSelect === checkOption02 )
{
move: function(color) {
$("div").filter("#change-color-04").css("background-color",color.toHexString())
$("p,h2").filter("#texts-fontcolor").css("color",color.toHexString())
$("span").filter(".data-theme-manager-theme-02-texts-color").text( color.toHexString() )
}
return
}
});`
what's the problem ?
Metadata
Metadata
Assignees
Labels
No labels