Jquery script goes here >>
$(document).ready(function(){
$('#norp-togle').click(function(){
$('#togle-div').slideToggle();
if($('#norp-togle').hasClass('ui-icon-circle-minus')){
$('div.ui-icon-circle-minus').removeClass('ui-icon-circle-minus').addClass('ui-icon-circle-plus');
}
else{
$('div.ui-icon-circle-plus').removeClass('ui-icon-circle-plus').addClass('ui-icon-circle-minus');
}
});
Html Goes here
<div id="norp-tog" class="ui-state-default ui-corner-all ui-icon ui-icon-minus"></div>
<div class="light_bg" id="tog-div">
<p>This snippet generates five anchor elements and appends them to the container element with the id "rating". Afterwards, for every anchor inside the container, a click handler is added. When the anchor is clicked, a post request is send to rate.php with the content of the anchor as a parameter. The result returned as a XML is then added to the container, replacing the anchors. </p>
</div>
<div id="norp-togle" class="ui-state-default ui-corner-all ui-icon ui-icon-circle-minus"></div>
<div class="light_bg" id="togle-div">
<p>This snippet generates five anchor elements and appends them to the container element with the id "rating". Afterwards, for every anchor inside the container, a click handler is added. When the anchor is clicked, a post request is send to rate.php with the content of the anchor as a parameter. The result returned as a XML is then added to the container, replacing the anchors. </p>
</div>
No comments:
Post a Comment