Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $(document).ready(function(){
- var url = a.link_imagelibrary
- if ("url:contains ('#hidden')") {
- $("url").click(function(){
- alert("yes!");
- });
- }
- });
- $('a.link_imagelibrary[href*=#hidden]').click(function () {
- alert('yes!');
- })
- $("a.link_imagelibrary").filter(function(){
- return this.href.indexOf("#hidden") > -1;
- }).click(function(){
- alert("yes!");
- });
- if(url.indexOf('#hidden') > -1) alert('yes !')
- var url = 'http://s.codepen.io'; // will look for a link pointing to this url
- $(document).ready(function(){
- $('a[href="'+url+'"]').click(function(e) { // when clicked it will load the page
- $.get(url, function(data) {
- var doc = $(data);
- if (doc.has("#icon-heart").length) { // and check to see if there are any
- alert('yes!'); // elements with id icon-heart in it
- }
- });
- e.preventDefault();
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement