Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <title>Page Title</title>
- <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
- <script type="text/javascript">
- $(document).ready(function(){
- loadstation();
- });
- function loadstation(){
- $("#station_data").load("test.php");
- setTimeout(loadstation, 5000);
- }
- </script>
- <script type="text/javascript">
- $( document ).ready(function() {
- $this = $('h1');
- $this.css('color','#3498db');
- $this.css('text-align','center');
- $this.css('border','1px solid #ededed');
- });
- </script>
- <script type="text/javascript">
- $(document).ready(function(){
- var score = $('#station_data').text();
- console.log(score);
- if (score > 0.00 )
- {
- //$('#station_data').css('background-color','gren');
- $('#station_data').css('color','green');
- }else
- {
- //$('#station_data').css('background-color','green');
- $('#station_data').css('color','red');
- }
- });
- </script>
- </head>
- <body>
- <div id="station_data"></div>
- <h1>Title</h1>
- </body>
- </html>
Add Comment
Please, Sign In to add comment