Bit of a Pickle :/

Let me start off by trying to explain what I am trying to do:
| I am trying to create a button(at this current point of time it is a link) of which may be clicked by a user visiting my website, and once the button is clicked it disappears(well the division disappears) using .hide() in JQuery. |
I also want to use localStorage in Javascript to keep the element(button) hidden after it is clicked, even if they reload the page, can anybody give me some examples on that one also please?
Here are my script/s:
root/index.php:
<!DOCTYPE html>
<html lang="en">
<head>
<?php include 'includes/functions.php'; ?>
<script type="text/javascript" src="scripts/jquery.js"></script>
<script type="text/javascript" src="scripts/javascript.js"></script>
</head>
<body>
<div id="button">
<a href="join.php?click=1" onclick="hideButton()">JOIN HERE</a><br>
<?php echo $get_count;?> people have joined simply by clicking the link above!
</a>
</body>
</html> <?php
$click = $_REQUEST['click'];
$file_location = 'clicks.ini';
$update_hits = file($file_location);
$update_count = ($update_hits[0] + 1);
$get_file = $file_location;
$handle_file = fopen($get_file, 'w');
$return_data = "$update_count";
fwrite($handle_file, $return_data);
fclose($handle_file);
echo '<meta http-equiv="refresh" content="0; url=index.php">';
?> root/includes/functions.php:
<?php //Click Data $file_location = 'clicks.ini'; $get_hits = file($file_location); $get_count = ($get_hits[0]); ?>
//Hide Button
function hideButton() {
$('#button').hide();
}
HTML/CSS/jQuery/ZURB Foundation/Twitter Bootstrap/Wordpress/Frontend Performance Optimizing
---
Need HTML/CSS help? Skype: microcosmic - Test Your Responsive Design - InternetCookies.eu