Created
March 19, 2015 03:34
-
-
Save okuden-labo/e59095a88395d3d9dac1 to your computer and use it in GitHub Desktop.
jQueryでDIVをクリック可能に
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* クリック要素を大きくできます */ | |
$(document).ready(function() { | |
$("div").click(function(){ | |
//aタグから遷移先を自動取得します。 | |
window.location=$(this).find("a").attr("href"); | |
return false; | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment