SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Jun 2014
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    toggle-show and hide

    hello freinds.i using jquery offline in localhost.but these are the codes
    index.php
    Code:
    <?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

    Code:
    <?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 js.php.
    can you please helpe me?
    Last edited by Pullo; Jun 22, 2014 at 13:13.

  2. #2
    Gre aus'm Pott gold trophysilver trophybronze trophy
    Pullo's Avatar
    Join Date
    Jun 2007
    Location
    Germany
    Posts
    5,938
    Mentioned
    214 Post(s)
    Tagged
    12 Thread(s)
    Hi,

    Welcome to the forums

    When you say "don't run" what exactly is the problem you are having?

  3. #3
    SitePoint Mentor bronze trophy
    John_Betong's Avatar
    Join Date
    Aug 2005
    Location
    City of Angels
    Posts
    1,833
    Mentioned
    73 Post(s)
    Tagged
    6 Thread(s)
    Hi,

    Try viewing opening with Firefox and viewing the source. Click on the javascript files and you should be able to see the javasript source.

    The script is also trying to load the jquery files twice? Only one occurrence is required.
    Learn how to be ready for The New Move to Discourse

    How to make Make Money Now with a *NEW* look

    Be sure to congratulate Patche on earning Member of the Month for July 2014


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •