Hi,
I try to use Jquery with silverstripe, but I don't know how to access the html elements in the $Content var (in .ss).
So, in m controller class :
function init() {
Requirements::javascript('jsparty/jquery/jquery.js');
parent::init();
}
I try this successfully (of course) :) :
<script type="text/javascript">
$(document).ready(function() {
alert('hi');
});
</script>
<div id="Content" class="typography">
$Content
</div>
But I want to use the accordion jquery plugin .The html code is in the $Content variable. I think I don't use this variable and copy the html code directly in the .ss file ?.
It's the right way to do ?
Thanks,
Fabrice.