jak dodać efekt 'hide (“slow”) ”do div wewnątrz PHP
Mam formularz, który jest powtarzany kilka razy w div o nazwie „formscontainer” w PHP, podczas gdy chcę złożyć formularz z ich odpowiednim div znika efekt ukryć („slow”)
tutaj przykładowy kod
<script type="text/javascript">
$(function() {
$("form").each(function() {
$(this).validate( {
submitHandler: function(formbeingsubmitted) {
$.post('process.php', $(formbeingsubmitted).serialize(), function(data) {
$('#results').html(data);
$ (formbeingsubmitted).hide("slow");
});
}
});
});
});
</script>
</head>
<body>
<?php do { ?>
<div id="formscontainer">
<form method="post" id="form1">
<label for="name" id="name_label">form </label>
<input type="text" name="name" id="name" size="30" value=""/>
<br>
<input type="submit" name="submit" value="SEND">
</form>
</div>
<div id="formscontainer">
<form method="post" id="form1">
<label for="name" id="name_label">form </label>
<input type="text" name="name" id="name" size="30" value=""/>
<br>
<input type="submit" name="submit" value="SEND">
</form>
</div>
<div id="formscontainer">
<form method="post" id="form1">
<label for="name" id="name_label">form </label>
<input type="text" name="name" id="name" size="30" value=""/>
<br>
<input type="submit" name="submit" value="SEND">
</form>
</div>
<?php } while ($row_var = mysql_fetch_assoc($var)); ?>
<div id="results"></div>
</body>
</html>