Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script type="text/javascript">
- {literal}
- //<![CDATA[
- var time_start;
- var time_end;
- $(document).ready(function() {
- $(".q").live('click', function() {
- var id = $(this).attr("id");
- $("#a"+id).fadeIn();
- $("#arrow"+id).html("<img src=\"images/arrow_open.png\"/>");
- $(this).removeClass("q").addClass("q2");
- });
- $(".q2").live('click', function() {
- var id = $(this).attr("id");
- $("#a"+id).fadeOut();
- $("#arrow"+id).html("<img src=\"images/arrow_closed.png\"/>");
- $(this).removeClass("q2").addClass("q");
- });
- $("a").click(function(){
- exit_page();
- });
- var d_s = new Date();
- time_start = d_s.getTime();
- });
- function exit_page(){
- var d_e = new Date();
- time_end = d_e.getTime();
- alert("boo!");
- $.ajax({
- type: "POST",
- url: "db_code/insert_faq.php",
- data: "location=Boston",
- success: function(msg){
- alert(msg);
- },
- error: function(xhr, textStatus, errorThrown){
- alert("fail: " + xhr+" "+textStatus + " " + errorThrown);
- }
- });
- }
- //]]>
- {/literal}
Add Comment
Please, Sign In to add comment