Advertisement
Guest User

Untitled

a guest
Apr 20th, 2014
40
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. $(document).ready(function(){
  2. var url = a.link_imagelibrary
  3. if ("url:contains ('#hidden')") {
  4. $("url").click(function(){
  5. alert("yes!");
  6. });
  7. }
  8. });
  9.  
  10. $('a.link_imagelibrary[href*=#hidden]').click(function () {
  11. alert('yes!');
  12. })
  13.  
  14. $("a.link_imagelibrary").filter(function(){
  15. return this.href.indexOf("#hidden") > -1;
  16. }).click(function(){
  17. alert("yes!");
  18. });
  19.  
  20. if(url.indexOf('#hidden') > -1) alert('yes !')
  21.  
  22. var url = 'http://s.codepen.io'; // will look for a link pointing to this url
  23. $(document).ready(function(){
  24.  
  25. $('a[href="'+url+'"]').click(function(e) { // when clicked it will load the page
  26.  
  27. $.get(url, function(data) {
  28. var doc = $(data);
  29. if (doc.has("#icon-heart").length) { // and check to see if there are any
  30. alert('yes!'); // elements with id icon-heart in it
  31. }
  32. });
  33. e.preventDefault();
  34. });
  35. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement