hypejunction / elgg_tooltip
Tooltip for Elgg
Installs: 66
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 0
Open Issues: 0
Language:JavaScript
Type:elgg-plugin
Requires
- bower-asset/tooltipster: ^3.3.0
Requires (Dev)
- composer/installers: 1.*
README
Tooltip component for Elgg
Features
- Integrates Tooltipster (http://iamceege.github.io/tooltipster)
- Developer-friendly API
Usage
To add a tooltip to a string or an html element, use components/tooltip
view:
$tooltip = elgg_view('components/tooltip', array( 'text' => elgg_view('output/img', array( 'src' => '/some/image.jpg', )), 'content' => elgg_view_entity($entity, array( 'full_view' => false, )), ));
Alternatively, you can just add .elgg-tooltip
class and a title="Some text"
attribute to any html element:
echo elgg_view('output/url', array( 'text' => 'Click me', 'href' => '/take/me/away', 'class' => 'elgg-tooltip', 'title' => 'This will show in a tooltip', ));