I was hoping that the jQuery module would make it easy to add things like a dialog or date picker to my template. But I can’t figure out how to use them. Can anyone point me in the right direction?
Just to show you where I’m at, here is what I thought might work—but didn’t—for a test modal dialog:
1) put the necessary jQuery tags in the html header, like so:
{exp:jquery:script_tag}
{exp:jquery:script_tag ui='core'}
{exp:jquery:script_tag ui='widget'}
{exp:jquery:script_tag ui='position'}
{exp:jquery:script_tag ui='dialog'}2) copy and paste the source code from the jQuery UI page (http://jqueryui.com/demos/dialog/)
<div class="demo">
<div id="dialog-form" title="Create new user">
All form fields are required.
<form>
<fieldset>
<label for="name">Name</label>
<input type="text" name="name" id="name" class="text ui-widget-content ui-corner-all" />
<label for="email">Email</label>
<input type="text" name="email" id="email" value="" class="text ui-widget-content ui-corner-all" />
<label for="password">Password</label>
<input type="password" name="password" id="password" value="" class="text ui-widget-content ui-corner-all" />
</fieldset>
</form>
</div>
<div id="users-contain" class="ui-widget">
<h1>Existing Users:</h1>
<table id="users" class="ui-widget ui-widget-content">
<thead>
<tr class="ui-widget-header ">
<th>Name</th>
<th>Email</th>
<th>Password</th>
</tr>
</thead>
<tbody>
<tr>
<td>John Doe</td>
<td>[email protected]</td>
<td>johndoe1</td>
</tr>
</tbody>
</table>
</div>
<button id="create-user">Create new user</button>
</div><!-- End demo -->
<div class="demo-description">
Use a modal dialog to require that the user enter data during a multi-step process. Embed form markup in the content area, set the <code>modalbuttons option.
</div><!-- End demo-description --></code>
Like I said, this did not work. Does this example reveal that I am beyond help? Or is there some hope for me?