This function loads the dropdown activation
This function loads the dropdown activation
If you are using Lift 3 you should use the AppendJs alternative.
Snippet Param:
- Param on - The element id or class to activate dropdown on
Example
<head> : <script data-lift="FoBo.Bs3Comp.activateDropdown?on=.dropdown-toggle"></script> <script data-lift="FoBo.Bs3ScriptHelper.registerLoadEventFactory"></script> </head>
The load event factory has to be registered ones before any activation can be loaded.
Result: This example will result in the following being injected in place of the snippet invocation:
<script type="text/javascript"> // addLoadEvent(function() { $('.dropdown-toggle').dropdown(); });; // ]]> </script> <script type="text/javascript">//registerLoadEventFactory script ...
Lift 3 alternativ -- This function loads the dropdown activation
Lift 3 alternativ -- This function loads the dropdown activation
Snippet Param:
- Param on - The element id or class to activate dropdown on
Example
<head> : <script data-lift="FoBo.Bs3Comp.activateDropdownAppendJs?on=.dropdown-toggle"></script> <script data-lift="FoBo.ScriptHelper.registerLoadEventFactoryAppendGlobalJs"></script> </head>
The load event factory has to be registered ones before any activation can be loaded.
Result: This example will result in the following being appended to lift's page-script document ready function:
addLoadEvent(function() { $('.dropdown-toggle').dropdown(); });;
v1.4
This function sets a popover action on a element by inlining a script snippet on the page.
This function sets a popover action on a element by inlining a script snippet on the page.
Snippet Params:
Example
<script data-lift="FoBo.Bs3Comp.popover?id=#theId&options=placement:'left'"></script>
Result: This example will result in the following being injected in place of the snippet invocation:
<script type="text/javascript"> // $(function () { $('#theId').popover({placement:'left'}); }); ; // ]]> </script>
Lift 3 alternativ -- This function sets a popover action on a element by appending a script snippet to lift's page-script on page load function.
Lift 3 alternativ -- This function sets a popover action on a element by appending a script snippet to lift's page-script on page load function.
Snippet Params:
Example
<script data-lift="FoBo.Bs3Comp.popoverAppendJs?id=#theId&options=placement:'left'"></script>
Result: This example will result in the following being appended to lift's page-script on page load function:
$(function () { $('#theId').popover({placement:'left'}); }); ;
v1.4
This function prevents the default action on a popover element.
This function prevents the default action on a popover element.
Snippet Params:
Example
<script data-lift="FoBo.Bs3Comp.popoverPreventDefault?on=#theId"></script>
Result: This example will result in the following being injected in place of the snippet invocation:
<script type="text/javascript"> // $(function(){$('#theId').popover().click(function(e){e.preventDefault()});});; // ]]> </script>
Lift 3 alternativ -- This function prevents the default action on a popover element.
Lift 3 alternativ -- This function prevents the default action on a popover element.
Snippet Params:
Example
<script data-lift="FoBo.Bs3Comp.popoverPreventDefault?on=#theId"></script>
Result: This example will result in the following being appended to lift's page-script document ready function:
$(function(){$('#theId').popover().click(function(e){e.preventDefault()});});;
v1.4
This function inlines a tooltip action on a element in place of the snippet invocation.
This function inlines a tooltip action on a element in place of the snippet invocation.
If you are using Lift 3 you should use the AppendJs alternative.
Snippet Params:
Example Showing a example element using the tooltip and the actual snippet invocation
<a id="aId" title="The most powerful, most secure web framework available today. It simply rocks!" href="http://liftweb.net/">Lift</a> <script data-lift="FoBo.Bs3Comp.tooltip?id=#aId&options=placement:'bottom'"></script>
Result: The script tag with the snippet invocation will result in the following being injected in place of the snippet invocation:
<script type="text/javascript"> // $(function () { $('#aId').tooltip({placement:'bottom'}); }); ; // ]]> </script>
Lift 3 alternativ -- This function sets a tooltip action on a element by appending to lift's page-script on page load function.
Lift 3 alternativ -- This function sets a tooltip action on a element by appending to lift's page-script on page load function.
Snippet Params:
Example Showing a example element using the tooltip and the actual snippet invocation
<a id="aId" title="The most powerful, most secure web framework available today. It simply rocks!" href="http://liftweb.net/">Lift</a> <script data-lift="FoBo.Bs3Comp.tooltip?id=#aId&options=placement:'bottom'"></script>
Result: The script tag with the snippet invocation will result in the following being injected in the lift page script :
$(function () { $('#aId').tooltip({placement:'bottom'}); });
v1.4
Bs3Component's Snippet Bootstrap v3.x
This snippet class contains a collection of functions for common transform operations useful when working with the Bootstrap toolkit components. Example Invoke with
data-lift="FoBo.Bs3Comp.functionName?paramName=paramValue&...."
For more examples see the individual transform functions.
v1.1