2014-08-23, 09:19 AM
So I have the following code:
I want it so that everytime an user clicks the image the complete code to disappear (<br /> may not). I have the following in footer:
(ougc_annbars_dismiss class needs to be added to the first div)
Alright it works, but how do I keep it closed after a refresh?
I would like to use jQuery for this instead of the in-build expander code.
<div class="ougc_annbars_{$bar['style']}" id="ougc_annbars_{$key}">
<div class="float_right"><img src="{$theme['imgdir']}/dismiss_notice.png" alt="{$lang->dismiss_notice}" title="{$lang->dismiss_notice}" /></div>
<div>{$bar['content']}</div>
</div><br/>
I want it so that everytime an user clicks the image the complete code to disappear (<br /> may not). I have the following in footer:
<script type="text/javascript">
$('.ougc_annbars_dismiss').click(function () {
$(this).remove();
});
</script>
(ougc_annbars_dismiss class needs to be added to the first div)
Alright it works, but how do I keep it closed after a refresh?
I would like to use jQuery for this instead of the in-build expander code.