Component invocation

Components can be called in two ways, you can choose one way to use TopJUI components
1, by calling HTML tags

In most scenarios, you can use HTML tags invoke the components, this method does not require write JS code that increase the property data-toggle = "component name" approach called HTML elements, attributes parameters through data-options = " parameter name 1: 1 parameter value, the parameter name 2: parameter value embodiment 2 "can be transmitted.

Modal dialog components such as calling, HTML code:

1
< div  data-toggle = "topjui-dialog"  data-options = "width:400,height:300" ></ div >

 

2, by JS API calls

For scenes with special functional requirements, you can also through JS API calls, calls way $ ( 'ID or style'). Component name (parameter object).

Modal dialog components such as calling, HTML code:

1
< div  id = "dialog" ></ div >

 

JS code is:

1
<script>$( '#dialog' ).iDialog({width:400,height:300});</script>

Guess you like

Origin www.cnblogs.com/Jeely/p/11269736.html