farbtastic 颜色选择器的更改宽度对我不起作用
Change width of farbtastic color picker does not work for me
我非常努力地尝试更改 farbtastic 颜色选择器的宽度和高度但没有成功....JS 不是我的语言
谁能帮帮我
我在 http://liveweave.com html-online-editor
上尝试了所有可能的解决方案
<!DOCTYPE html>
<html>
<head>
<title>HTML5, CSS3 and JavaScript demo</title>
<script type='text/javascript' src='https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.js'></script>
<script type='text/javascript' src='http://gilbertsincobh.com/wp-content/plugins/revslider/js/farbtastic/farbtastic.js'></script>
<link rel='stylesheet' href='http://gilbertsincobh.com/wp-content/plugins/revslider/js/farbtastic/farbtastic.css' type='text/css' />
<script type='text/javascript'>
$(document).ready(function(){
$('#demo').hide();
$('#picker').farbtastic('#color');
$.farbtastic("#picker", {callback: pickerUpdate, width: 600, height: 600});
function pickerUpdate(color){console.log("Color Picker Wheel: " + color);
}
);
</script>
</head>
<body>
<div id="picker"></div>
</body>
</html>
宽度和高度已硬编码到插件源中。只需参考 repo 中的插件源。 https://rawgit.com/mattfarina/farbtastic/master/src/farbtastic.js
这应该有效
$(function () {
$('#colorpicker1').farbtastic('#color1');
$('#colorpicker2').farbtastic({ callback: '#color2', width: 150 });
});
我非常努力地尝试更改 farbtastic 颜色选择器的宽度和高度但没有成功....JS 不是我的语言
谁能帮帮我
我在 http://liveweave.com html-online-editor
上尝试了所有可能的解决方案<!DOCTYPE html>
<html>
<head>
<title>HTML5, CSS3 and JavaScript demo</title>
<script type='text/javascript' src='https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.js'></script>
<script type='text/javascript' src='http://gilbertsincobh.com/wp-content/plugins/revslider/js/farbtastic/farbtastic.js'></script>
<link rel='stylesheet' href='http://gilbertsincobh.com/wp-content/plugins/revslider/js/farbtastic/farbtastic.css' type='text/css' />
<script type='text/javascript'>
$(document).ready(function(){
$('#demo').hide();
$('#picker').farbtastic('#color');
$.farbtastic("#picker", {callback: pickerUpdate, width: 600, height: 600});
function pickerUpdate(color){console.log("Color Picker Wheel: " + color);
}
);
</script>
</head>
<body>
<div id="picker"></div>
</body>
</html>
宽度和高度已硬编码到插件源中。只需参考 repo 中的插件源。 https://rawgit.com/mattfarina/farbtastic/master/src/farbtastic.js
这应该有效
$(function () {
$('#colorpicker1').farbtastic('#color1');
$('#colorpicker2').farbtastic({ callback: '#color2', width: 150 });
});