Skip to content

Using data-toggle attribute to initiliase and trigger any popover. - #453

Merged
vyruss merged 1 commit into
DMPRoadmap:developmentfrom
DigitalCurationCentre:issue431
Jun 23, 2017
Merged

Using data-toggle attribute to initiliase and trigger any popover.#453
vyruss merged 1 commit into
DMPRoadmap:developmentfrom
DigitalCurationCentre:issue431

Conversation

@jollopre

Copy link
Copy Markdown
Contributor
});
$('.has-tooltip').tooltip({ placement: "right", trigger: "focus" });
$(".help").popover();
//Initiliases all popovers on a page

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good @jollopre we'll have to remember to choose this one and remove mine when we merge over the CDL-MVP branch. I solved it in a similar way but used $("a[rel='popover']). Yours is better since it doesn't force the use of an anchor

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noticed today when refactoring admin.js that there were multiple classes to trigger the same behaviour. That's the example provided in bootstrap website. Your example is good too but using data-* does not tight to a specific html tag.

@vyruss
vyruss merged commit 8365bf8 into DMPRoadmap:development Jun 23, 2017
@jollopre
jollopre deleted the issue431 branch June 27, 2017 09:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants