02-10-2012, 09:19 PM
Incearca sa scri ceva mai corect pe viitor, cat despre 'spoiler' -ul asta foloseste urmatorul cod:
PHP Code:
<html>
<head>
<style>
#hide{
display:none;
}
</style>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function() {
var hide = 1;
$("#click").click(function () {
if(hide == 1)
{
$("#hide").css('display', 'block !important');
hide = 0;
}
else
{
$("#hide").css('display', 'none');
hide = 1;
}
});
});
</script>
</head>
<body>
<a href="#" id="click">Link ce declanseaza</a>
<div id="hide">Continut ascuns, fie text, fie imagini</div>
</body>
</html>

