EE 2.0 PB and the jQuery Module
Tonight, with Greg’s help I implemented ExpressionEngine 2.0 PB’s new jQuery Module You can see it there:
———==========>
in the sidebar. It needs some CSS refinement, but it works beautifully.
Have I mentioned today how much I love ExpressionEngine 2.0 (PB)?
For those of you wondering how this magic was wrought, in my sidebar Snippet I have this code:
<div class="basic" id="myaccordion">
<h3>Recent News</h3>
<div>
{exp:channel:entries limit="10" channel="dem" dynamic="no" limit="10"
disable="categories|category_fields|custom_fields|member_data|pagination"}
{if count == "1"}<ul>{/if}
<li><a href="{comment_url_title_auto_path}">{title}</a></li>
{if count == total_results}</ul>{/if}
{/exp:channel:entries}
</div>
<h3>Recent Recipes</h3>
<div>
{exp:channel:entries limit="10" channel="cb" dynamic="no" limit="10"
disable="categories|category_fields|custom_fields|member_data|pagination"}
{if count == "1"}<ul>{/if}
<li><a href="{comment_url_title_auto_path}">{title}</a></li>
{if count == total_results}</ul>{/if}
{/exp:channel:entries}
</div>
<h3>Recent Poems and Stories</h3>
<div>
{exp:channel:entries limit="10" channel="writing" dynamic="no" limit="10"
disable="categories|category_fields|custom_fields|member_data|pagination"}
{if count == "1"}<ul>{/if}
<li><a href="{comment_url_title_auto_path}">{title}</a></li>
{if count == total_results}</ul>{/if}
{/exp:channel:entries}
</div>
</div> <!-- end the accordion wrapper -->
Then in my footer Snippet I have:
<!-- jQuery UI -->
{exp:jquery:script_tag}
{exp:jquery:script_tag ui='core'}
{exp:jquery:script_tag ui='accordion'}
<script type="text/javascript">
/* <![CDATA[ */
$('#myaccordion').accordion();
/* ]]> */
</script>
Simple, eh? KISS!
-Lisa, on December 13, 2009 at 6:48 pm .::. Comment (0)








