net.liftmodules.FoBo.snippet.FoBo
This function loads the dropdown activation
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.Bootstrap.activateDropdown?on=.dropdown-toggle"></script> <script data-lift="FoBo.ScriptHelper.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 ...
This function sets a popover action on a element.
This function sets a popover action on a element.
Snippet Params:
Example
<script data-lift="FoBo.Bootstrap.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>
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.Bootstrap.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>
This function sets a tooltip action on a element.
This function sets a tooltip action on a element.
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.Bootstrap.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>
Bootstrap Snippet
This snippet class contains functions for common transform operations useful when working with the Bootstrap toolkit. Example Invoke with
data-lift="FoBo.Bootstrap.functionName?paramName=paramValue&...."
For more examples see the individual transform functions.