Skip to content

Commit 684efe8

Browse files
committed
support "title" attribute for images
1 parent 64a8542 commit 684efe8

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

build/jquery.localize.js

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/jquery.localize.coffee

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ $.localize = (pkg, options = {}) ->
7474
else if elem.is('img')
7575
value = valueForKey("#{key}.alt", data)
7676
elem.attr("alt", value) if value?
77+
value = valueForKey("#{key}.title", data)
78+
elem.attr("title", value) if value?
7779
value = valueForKey("#{key}.src", data)
7880
elem.attr("src", value) if value?
7981
else

0 commit comments

Comments
 (0)