I am working on the cms part of an app. In the view I have <a></a>
elements:
<div id="addressbook" class="ez-box admin">
<a href="{{=URL('addressbook','admin')}}">
<img src="{{=URL('static','init/images/icons/ABIcon.png')}}"
alt="some_text" width="78px" height="78px"/>
<h4>Adresboek</h4>
<p class="fs12">Uw adresboek card beheren.</p>
</a>
</div> <!-- ez-box -->
When the user isn't logged in I want the <a></a> elements to be
disabled, i.e not click able and set their opacity to .50
This is what I tried:
{{if not auth.is_logged_in():}}
<script type="text/javascript">
$(document).ready(function(){
$('#addressbook a').attr('disabled','');
$('#calendar a').attr('disabled','');
$('#hub a').attr('disabled','');
});
</script>
<style type="text/css">
.admin {opacity: 0.5; filter:Alpha(opacity=50);}
</style>
{{pass}}
The opacity bit works, the jQuery bit doesn't work, I hope one of you
could provide me with the correct code to make this work.
Kind regards,
Annet