LoginSignup
0
0

More than 5 years have passed since last update.

baserJSでリンク可能エリアを先祖要素まで拡張する

Posted at

コーポレートサイトにちょうどいいJavaScriptライブラリ baserJS の解説記事です。

Webサイトと詳しいAPIリファレンスはこちら baserJS Webサイト

ボックス自体にリンクを適応する

HTML4/XHTML1.0などのaタグがブロック要素を内包できないケースなどで、aタグの外側の要素までリンクを反応させるようにします。

HTML

<div class="box-link"><a href="xxx.yyy.com">リンク</a></div>

JavaScript

$('.box-link').bcBoxLink();

上記のJavaScriptを実行すると.box-linkの領域までリンクエリアが広がります。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0