Friday 15 May 2015

javascript - Addressing multiple DOM elements for bootstrap tooltip and popover -



javascript - Addressing multiple DOM elements for bootstrap tooltip and popover -

i trying address 2 attributes trigger popover , tooltip activation bootstrap. right way it? don't want repeat code twice unless there no other way. if can advise.

// activate tooltips $("[rel=tooltip], [data-rel=tooltip]").tooltip(); // activate popovers $("[rel=popover], [data-rel=tooltip]").popover();

i tried following:

// activate tooltips $("[rel=tooltip]" , "[data-rel=tooltip]").tooltip(); // activate popovers $("[rel=popover]" , "[data-rel=tooltip]").popover();

javascript twitter-bootstrap

No comments:

Post a Comment