looking for some solutions? You are welcome.

SOLVED: javascript and jquery is not working my php page?

Karuppasamy:

if i have insert script events or function code within my index php file. that is not working.

My files:

1.header php file(this file contain only css and header html)

            <!DOCTYPE html>
            <html lang="en">
            <head>
                <meta charset="utf-8">
                <meta http-equiv="X-UA-Compatible" content="IE=edge">
                <meta name="viewport" content="width=device-width, initial-scale=1.0">
                <link type="image/png" rel="shortcut icon" href="images/favicon.png">
                <title>Administrator</title>
                <!-- CSS -->
                <link href="css/main.css" rel="stylesheet">
            </head>
            <div class="main-wrapper" id="main-wrapper">
                <header class="topbar">
                    .....
                </header>

2.index.php(include header and footer)

                <?php include "templates/header.php" ?>
                <script>
                    $(document).ready(function(){
                        $("p").click(function(){
                            alert("The paragraph was clicked.");
                        });
                    });
                </script>
                <p>Click on this paragraph.</p>
                <?php include "templates/footer.php" ?>

3.footer php file(script loading and end tagcontainer,body,html)

</div>
 <footer class="center-align"><p>All Rights Reserved.</footer>
</div>
</div>

i have insert script file insert this place

</body>
</html>



Posted in S.E.F
via StackOverflow & StackExchange Atomic Web Robots
Share:

No comments:

Recent