Advertisement
Guest User

Untitled

a guest
Jul 31st, 2014
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. $(function(){
  2. // Link handling.
  3. $('a[rel != "noAJAX"]').live('click', function(event){
  4. if ($(this).attr('name') != ""){
  5. var currentDiv = $(this).attr('name');
  6. }else{
  7. var currentDiv = divID;
  8. }
  9. $(currentDiv).html(loadingHTML);
  10. $(currentDiv).load($(this).attr('href'));
  11. event.preventDefault();
  12. });
  13. $('form[rel != "noAJAX"]').live('submit', function(event){
  14. if ($(this).attr('name') != ""){
  15. var currentDiv = $(this).attr('name');
  16. }else{
  17. var currentDiv = divID;
  18. }
  19. $(currentDiv).html(loadingHTML);
  20. $.post($(this).attr('action'), $(this).serialize(), function(html){
  21. $(currentDiv).html(html);
  22. });
  23. return false;
  24. });
  25.  
  26. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement