thedigicraft / Atom.CMS

Atom.CMS
56 stars 52 forks source link

creating debug window #40

Open faygh2013 opened 10 years ago

faygh2013 commented 10 years ago

hello alan.i using jquery offline in localhost.but these are the codes index.php


<?php include('config/setup.php');?>

<!DOCTYPE html>
<html>
<head>
<title><?php echo $page['title'].' | '.$site_title; ?></title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<?php include('config/css.php');?>
<?php include('config/js.php');?>

</head>
<body>
<div id="wrap">
<?php include(D_TEMPLATE.'/navigation.php');//main navigation?>

<div class="container">

<h1><?php echo $page['header']; ?></h1>

<?php echo $page['body_formatted']; ?>

<?php if(isset($_GET['debug'])==1){?>
<pre>
<?php print_r($page); ?>
</pre>
<?php }?>
</div>

</div><!-- End wrap -->
<?php include(D_TEMPLATE.'/footer.php');//footer page?>

<div id="console-debug">
test debug window   
</div>

</body>
</html>

and js.php


<?php
//javascript:

?>

<!-- jquery -->

<script src="jquery-1.11.1.min.js"></script>
<script src="//code.jquery.com/jquery-1.11.1.min.js"></script>

<!-- jquery ui -->
<script src="jquery-ui.min.js"></script>
<script src="//code.jquery.com/ui/1.10.4/jquery-ui.js"></script>

<!--Latest compiled and minified javascript ->
<script src="bootstrap-3.0.0/js/bootstrap.min.js"></script>
<script src="//netdna.bootstrapcdn.com/bootstrap/3.0.3/js/bootstrap.min.js"></script>

<script>
$(document).ready(function() {

$("#console-debug").hide();

$("#btn-debug").click(function(){

$("console-debug").toggle();

});

});

</script>

have i made any mistakes? but these codes dont run. can you please helpe me?

thedigicraft commented 10 years ago

Hello, look at this block of code:

<!--Latest compiled and minified javascript ->
<script src="bootstrap-3.0.0/js/bootstrap.min.js"></script>
<script src="//netdna.bootstrapcdn.com/bootstrap/3.0.3/js/bootstrap.min.js"></script>

You are missing a - at the end of the comment:

<!--Latest compiled and minified javascript ->

should be:

<!--Latest compiled and minified javascript -->

you are turning some of the Javascript in to comments... you can see how they are "grey" in your code but below they are not grey anymore:

<!--Latest compiled and minified javascript -->
<script src="bootstrap-3.0.0/js/bootstrap.min.js"></script>
<script src="//netdna.bootstrapcdn.com/bootstrap/3.0.3/js/bootstrap.min.js"></script>