Hoping somebody can help me with an issue im having. I cant run my slide function on a drop down form when calling it from another page.
I have an admin.php page which includes a isAdmin.php file to check if the user is an admin user. If not it redirects them to the index.php page. I would then like to call my slide function so that the login form slides down into view but the command isnt working.
Code is..
isAdmin:
if(!isAdmin())
{
header('Location: ../index.php?status=3');
//Login page should slide down for user to see the status message but function is not working correctly
echo '<script> $(document).ready(function (){ $("div#panel").slideDown("slow"); });</script> ';
}
When the login form tab is clicked this is the function that runs (this works fine):
$(function() {
$("#login").click(function(e) {
//e.preventDefault(); - Stops the page scrolling to the top
$("div#panel").slideDown("slow");
$("#toggle a").toggle();
});
});