Advertisement
DrupalCustom

dfg

Jan 31st, 2012
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $(document).ready(function () {
  2.   $("#edit-status-list").change(function() {
  3.   var selectedStatus = $(this).find(":selected").text();
  4.   var charExists = ((window.location.href).indexOf('?') >= 0) ? true : false;
  5.  
  6.  if(charExists){
  7.  var split = (window.location.href).split('?');
  8.  var loc = split[0];
  9.  
  10.  loc = loc+"?status="+selectedStatus;  
  11.  self.location.href= loc;
  12.  
  13.  }
  14.  
  15.  else{
  16.   var locf = window.location.href+"?status="+selectedStatus;   
  17.   self.location.href= locf;
  18.  
  19.   }
  20.  
  21.   });
  22. });
  23.  
  24.  
  25.  
  26. $(document).ready(function () {
  27.   $("#create-freeway-project").submit(function() {
  28.     $(":submit", this).attr("disabled", "disabled");
  29.    
  30.   });
  31.  
  32.  
  33. });
  34.  
  35.  
  36.  
  37.  $(".common_link_class").click(function() {
  38.     alert("Hello");
  39.       // Set a click counter.
  40.       var count = ($(this).data("clicks") || 0) + 1;
  41.       $(this).data("clicks", count);
  42.      
  43.       // When someone clicks once just let them go on.
  44.       if ($(this).data("clicks") >= 1) {
  45.         // We could do some cleverness here but i dont feel like it at the moment...
  46.       }
  47.      
  48.       // More than one click and we dont do anything.
  49.       if ($(this).data("clicks") >= 2) {
  50.         // You could also leave a rude message here like ... actually i won't say :D
  51.         return false;
  52.       }
  53.     });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement