-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi,
I tried to view a checkbox like Bootstrap Toggle, but I did not succeed.
I include the css and js file :
<script src="/js/bootstrap2-toggle.min.js"></script>
...
<style src="/css/bootstrap2-toggle.min.css"></style>
and declare checbox like that:
<checkbox data-toggle="toggle" value="@save(...)" disabled="@load(...)"/>
but in browser a view simple box.
How I Can view checbox like bootstrap toggle? Can I reuse bootstrap's definition or Have I to rewrite css and js file?
Hello vsansone,
Also check out the small talk by Robert Wenzel for more ideas
https://www.zkoss.org/wiki/SmallTalks/2016/April/ZK8WizardExample-Part4final#CustomCheckbox_Mold
Best Regards,
Darksu
HI Darksu,
I see your link and I tried to Custom Checkbox Mold.
I define checkbox like this:
<checkbox mold="provaMold"></checkbox>
and define the file js:
function (out) {
var uuid = this.uuid, content = this.domContent_();
out.push(
'<input type="checkbox" id="', uuid, '-real"', ' data-toggle="toggle" ', this.contentAttrs_(),'/>',
content);
}
and include file css and js:
<script type="text/javascript" src="/js/bootstrap-toggle.min.js"></script>
<style src="/css/bootstrap-toggle.min.css" ></style>
but I see checkbox always like a simple box.
Asked: 2016-08-25 08:41:47 +0800
Seen: 50 times
Last updated: Sep 07 '16
Check the zk8 datahandler out. Easy way tot integratie 3th party javascript
chillworld ( 2016-08-27 04:56:18 +0800 )edit