Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/82.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 如何调用FarbStatic(颜色选择器)_Php_Jquery - Fatal编程技术网

Php 如何调用FarbStatic(颜色选择器)

Php 如何调用FarbStatic(颜色选择器),php,jquery,Php,Jquery,我使用farbtastic颜色选择器,我包含了所有的文件,但是当我双击时,我怎么能调用这个颜色选择器呢 更多信息: 这是我在.tpl文件中的占位符。我叫它如下 // color picker selecteren. $(function(){ $("#color").dbclick(function(){ $('#colorpicker').farbtastic('#color'); }); }); <!-- new color form --> &

我使用farbtastic颜色选择器,我包含了所有的文件,但是当我双击时,我怎么能调用这个颜色选择器呢

更多信息: 这是我在.tpl文件中的占位符。我叫它如下

// color picker selecteren.
$(function(){
    $("#color").dbclick(function(){
        $('#colorpicker').farbtastic('#color');
    });
});

<!-- new color form -->
<form action="controller.php" method="post" class="popupform" id="form_changecolor">
    <div id="colorpicker"></div>
    <table>
    <tr><th>huidige:</th><th>nieuwe:</th></tr>
    <tr><td><input type="text" name="oldcolor" disabled="disabled" id="oldcolor" /></td><td><input type="text" name="newcolor" id="newcolor" /></td></tr>
    </table>
    <div class="buttonrow">
    <input type="hidden" name="page" value="{$PAGE}" />
    <input type="hidden" name="module" value="changecolor" />
    <input type="hidden" name="id" id="parameter_key" value="" />
    <input type="submit" class="btnOk" value="Aanpassen" />
    <input type="button" class="btnCancel" value="Annuleren" />
    </div>
</form>
// color picker selecteren.
$(function(){
    $("#color").dbclick(function(){
        $('#colorpicker').farbtastic('#color');
    });
});

<!-- new color form -->
<form action="controller.php" method="post" class="popupform" id="form_changecolor">
    <div id="colorpicker"></div>
    <table>
    <tr><th>huidige:</th><th>nieuwe:</th></tr>
    <tr><td><input type="text" name="oldcolor" disabled="disabled" id="oldcolor" /></td><td><input type="text" name="newcolor" id="newcolor" /></td></tr>
    </table>
    <div class="buttonrow">
    <input type="hidden" name="page" value="{$PAGE}" />
    <input type="hidden" name="module" value="changecolor" />
    <input type="hidden" name="id" id="parameter_key" value="" />
    <input type="submit" class="btnOk" value="Aanpassen" />
    <input type="button" class="btnCancel" value="Annuleren" />
    </div>
</form>
//颜色选择器选择器。
$(函数(){
$(“#颜色”).dbclick(函数(){
$('colorpicker')。farbtastic('color');
});
});
胡迪格:聂维:

@Nexexeus,我已经尝试过了(太大了,无法发表评论,在这个问题的上下文中很有用):

这是我在.tpl文件中的占位符。我叫它如下

// color picker selecteren.
$(function(){
    $("#color").dbclick(function(){
        $('#colorpicker').farbtastic('#color');
    });
});

<!-- new color form -->
<form action="controller.php" method="post" class="popupform" id="form_changecolor">
    <div id="colorpicker"></div>
    <table>
    <tr><th>huidige:</th><th>nieuwe:</th></tr>
    <tr><td><input type="text" name="oldcolor" disabled="disabled" id="oldcolor" /></td><td><input type="text" name="newcolor" id="newcolor" /></td></tr>
    </table>
    <div class="buttonrow">
    <input type="hidden" name="page" value="{$PAGE}" />
    <input type="hidden" name="module" value="changecolor" />
    <input type="hidden" name="id" id="parameter_key" value="" />
    <input type="submit" class="btnOk" value="Aanpassen" />
    <input type="button" class="btnCancel" value="Annuleren" />
    </div>
</form>
// color picker selecteren.
$(function(){
    $("#color").dbclick(function(){
        $('#colorpicker').farbtastic('#color');
    });
});

<!-- new color form -->
<form action="controller.php" method="post" class="popupform" id="form_changecolor">
    <div id="colorpicker"></div>
    <table>
    <tr><th>huidige:</th><th>nieuwe:</th></tr>
    <tr><td><input type="text" name="oldcolor" disabled="disabled" id="oldcolor" /></td><td><input type="text" name="newcolor" id="newcolor" /></td></tr>
    </table>
    <div class="buttonrow">
    <input type="hidden" name="page" value="{$PAGE}" />
    <input type="hidden" name="module" value="changecolor" />
    <input type="hidden" name="id" id="parameter_key" value="" />
    <input type="submit" class="btnOk" value="Aanpassen" />
    <input type="button" class="btnCancel" value="Annuleren" />
    </div>
</form>
//颜色选择器选择器。
$(函数(){
$(“#颜色”).dbclick(函数(){
$('colorpicker')。farbtastic('color');
});
});
胡迪格:聂维:

您的问题不是很清楚,本页对设置有很好的描述:

根据这里的示例,如果您只想在双击它时使其成为颜色选择器

$("#color").dblclick(function(){
    $('#colorpicker').farbtastic('#color');
});

双击什么,在哪里?你有没有让颜色选择器在不双击的情况下工作?问题是,“我如何”调用颜色选择器。