I'm trying out this code, it's on WordPress in a loop:
<script type="text/javascript">
var ID = <?php the_ID(); ?>;
jQuery('#'document.write(ID);' a').click(function () {
jQuery('#info-'document.write(ID);'').slideToggle('fast', function () {});
});
</script>
It's inside a HTML and it just keeps throwing errors, any idea what I'm doing wrong?
Example:
<script type="text/javascript">
var ID = 1;
jQuery('#1 a').click(function () {
jQuery('#info-1').slideToggle('fast', function () {});
});
</script>