drgullin / icheck

Highly customizable checkboxes and radio buttons (jQuery & Zepto)
http://fronteed.com/iCheck
7.38k stars 1.62k forks source link

Inherit title #191

Closed thekrotek closed 9 years ago

thekrotek commented 10 years ago

Not sure, if it's an issue or feature request, but input title is not inherited right now. Would be nice to have it copied to wrapping div to preserve hints.

thekrotek commented 10 years ago

Actually, found the solution myself. Just needs 2 lines of code to be added.

Find: id = node.id, Add below: title = node.title,

Find: !!settings.inheritID && id && parent.attr('id', _iCheck + '-' + id); Add below: !!settings.inheritTitle && title && parent.attr('title', title);

Usage: add a new inheritTitle option, when inialized:

inheritTitle: true

drgullin commented 9 years ago

Use 2.x version.

There's an option for this:

$('input').icheck({
  inherit: 'title class'
});