Numeric IDs are invalid in Jquery.
For more info Goto this post
ID and NAME tokens must begin with a letter ([A-Za-z]) and may be followed by any number of letters, digits ([0-9]), hyphens ("-"), underscores ("_"), colons (":"), and periods (".").
So try to use $('.slide').trigger("click");
instead of $('#3').trigger("click");
or put some valid id and select using that.
Using this code will solve your problem
<html>
<head>
<title>Click </title>
</head>
<body>
<div class="slide">Show Target</div>
<div style="display: none;" class="target">Target</div>
<div class="hide-target">Hide Target</div>
<?php
$_GET['settings'] = "some value";
if(isset($_GET['settings'])){
?> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
$('.slide').click(function(){
alert("hi");
$(".target").show();
});
$('.hide-target').click(function(){
$(".target").hide();
});
$('.slide').trigger("click");
});
</script>
<?php
}
?>
</body>