this jquery script not work when im insert php tag into this,.. can i know what is the problem..
<script language="javascript">
$("#openmsg_<?php echo $id; ?>").click(function(){
$("#toggleText_<?php echo $id; ?>").toggle(800);
})
</script>
this is my jquery code to toggle
<form action="my_messages.php" method="POST" name="<?php echo $msg_title; ?>">
<input type="button" name="openmsg" id="openmsg_<?php echo $id; ?>" value="<?php echo $msg_title; ?>" onClick="javascript:toggle<?php echo $id; ?>();" />
<input type="submit" name="setopened_<?php echo $id; ?>" value="I have read this" />
</form>
<div id="toggleText_<?php echo $id; ?>" style="display:none;">
<?php echo $msg_body; ?>
</div>