Jquery. If a url in certain div contains something, then something -


trying set alert window pop links via jquery. code

$(document).ready(function(){ var url = a.link_imagelibrary  if ("url:contains ('#hidden')") {     $("url").click(function(){   alert("yes!"); }); } }); 

what mistake?

it seems trying find links class of "link_imagelibrary" , if href property contains string "#hidden", bind click handler them.

if correct, following code that:

$('a.link_imagelibrary[href*=#hidden]').click(function () {     alert('yes!'); }) 

Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -