Widgets > wijlightbox > wijlightbox Tutorial > wijlightbox Step 2 of 3: Initializing the Widget |
In the previous step, you added markup to add the content that will appear in the lightbox. In this step, you'll add the jQuery script needed to initialize the widget.
Complete the following steps:
</div>
tag you added in the previous step, enter the following jQuery script to initialize the wijlightbox widget:
<script type="text/javascript">
$(function () {
$("#lightbox").wijlightbox({modal: true});
});
</script>
This script will initialize the widget.
</script>
tag you added in the previous step, add the following markup to style the wijlightbox widget:
<style type="text/css">
#wijlightbox
{
width: 750px;
}
</style>
This markup will style the widget.
You have created an application and added and initialized the wijlightbox widget. In the next step, in wijlightbox Step 3 of 3: Running the Project, you'll view the run-time interactions of the widget.