{"id":23156542,"url":"https://github.com/thecreation/jquery-astooltip","last_synced_at":"2026-03-10T12:32:53.805Z","repository":{"id":57281988,"uuid":"8452889","full_name":"thecreation/jquery-asTooltip","owner":"thecreation","description":"A jQuery plugin for showing tooltip text when hover on a element.","archived":false,"fork":false,"pushed_at":"2017-09-19T12:00:38.000Z","size":583,"stargazers_count":3,"open_issues_count":0,"forks_count":3,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-05-09T21:42:03.553Z","etag":null,"topics":["jquery-plugin","tooltip"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thecreation.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-02-27T09:39:41.000Z","updated_at":"2017-02-16T17:10:45.000Z","dependencies_parsed_at":"2022-08-24T12:41:41.015Z","dependency_job_id":null,"html_url":"https://github.com/thecreation/jquery-asTooltip","commit_stats":null,"previous_names":["amazingsurge/jquery-astooltip"],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thecreation%2Fjquery-asTooltip","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thecreation%2Fjquery-asTooltip/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thecreation%2Fjquery-asTooltip/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thecreation%2Fjquery-asTooltip/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thecreation","download_url":"https://codeload.github.com/thecreation/jquery-asTooltip/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230181485,"owners_count":18185938,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["jquery-plugin","tooltip"],"created_at":"2024-12-17T21:13:56.143Z","updated_at":"2025-12-12T05:02:42.268Z","avatar_url":"https://github.com/thecreation.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [jQuery asTooltip](https://github.com/amazingSurge/jquery-asTooltip) ![bower][bower-image] [![NPM version][npm-image]][npm-url] [![Dependency Status][daviddm-image]][daviddm-url] [![prs-welcome]](#contributing)\n\n\u003e A jQuery plugin for showing tooltip text when hover on a element.\n\n## Table of contents\n- [Main files](#main-files)\n- [Quick start](#quick-start)\n- [Requirements](#requirements)\n- [Usage](#usage)\n- [Examples](#examples)\n- [Options](#options)\n- [Methods](#methods)\n- [Events](#events)\n- [No conflict](#no-conflict)\n- [Browser support](#browser-support)\n- [Contributing](#contributing)\n- [Development](#development)\n- [Changelog](#changelog)\n- [Copyright and license](#copyright-and-license)\n\n## Main files\n```\ndist/\n├── jquery-asTooltip.js\n├── jquery-asTooltip.es.js\n├── jquery-asTooltip.min.js\n└── css/\n    ├── asTooltip.css\n    └── asTooltip.min.css\n```\n\n## Quick start\nSeveral quick start options are available:\n#### Download the latest build\n\n * [Development](https://raw.githubusercontent.com/amazingSurge/jquery-asTooltip/master/dist/jquery-asTooltip.js) - unminified\n * [Production](https://raw.githubusercontent.com/amazingSurge/jquery-asTooltip/master/dist/jquery-asTooltip.min.js) - minified\n\n#### Install From Bower\n```sh\nbower install jquery-asTooltip --save\n```\n\n#### Install From Npm\n```sh\nnpm install jquery-asTooltip --save\n```\n\n#### Install From Yarn\n```sh\nyarn add jquery-asTooltip\n```\n\n#### Build From Source\nIf you want build from source:\n\n```sh\ngit clone git@github.com:amazingSurge/jquery-asTooltip.git\ncd jquery-asTooltip\nnpm install\nnpm install -g gulp-cli babel-cli\ngulp build\n```\n\nDone!\n\n## Requirements\n`jquery-asTooltip` requires the latest version of [`jQuery`](https://jquery.com/download/).\n\n## Usage\n#### Including files:\n\n```html\n\u003clink rel=\"stylesheet\" href=\"/path/to/asTooltip.css\"\u003e\n\u003cscript src=\"/path/to/jquery.js\"\u003e\u003c/script\u003e\n\u003cscript src=\"/path/to/jquery-asTooltip.js\"\u003e\u003c/script\u003e\n```\n\n#### Required HTML structure\n\n```html\n\u003cspan class=\"example\" data-asTooltip-position=\"n\" title=\"This is tip content\"\u003etrigger\u003c/span\u003e\n```\n\n#### Initialization\nAll you need to do is call the plugin on the element:\n\n```javascript\njQuery(function($) {\n  $('.example').asTooltip(); \n});\n```\n\n## Examples\nThere are some example usages that you can look at to get started. They can be found in the\n[examples folder](https://github.com/amazingSurge/jquery-asTooltip/tree/master/examples).\n\n## Options\n`jquery-asTooltip` can accept an options object to alter the way it behaves. You can see the default options by call `$.asTooltip.setDefaults()`. The structure of an options object is as follows:\n\n```\n{\n  namespace: 'asTooltip',\n  skin: '',\n  closeBtn: false,\n\n  position: {\n    value: 'right middle',\n    target: false, //mouse || jqueryObj\n    container: false,\n    auto: false, //if true, judge by positionContainer\n    adjust: {\n      mouse: true, //Work when positionTarget is mouse\n      resize: true,\n      scroll: true\n    }\n  },\n\n  show: {\n    target: false,\n    event: 'mouseenter',\n    delay: 0\n  },\n\n  hide: {\n    target: false,\n    event: 'mouseleave',\n    delay: 0,\n    container: false, // only hideEvent is click, it can be body or obj\n    inactive: false //if true, it is always show when tip hovering\n  },\n\n  content: null,\n  contentAttr: 'title',\n\n  ajax: false,\n  tpl: '\u003cdiv class=\"{{namespace}}\"\u003e' +\n    '\u003cdiv class=\"{{namespace}}-inner\"\u003e' +\n    '\u003cdiv class=\"{{namespace}}-loading\"\u003e\u003c/div\u003e' +\n    '\u003cdiv class=\"{{namespace}}-content\"\u003e\u003c/div\u003e' +\n    '\u003c/div\u003e' +\n    '\u003c/div\u003e',\n\n  onInit: null,\n  onShow: null,\n  onHide: null,\n  onFocus: null,\n  onBlur: null\n}\n```\n\n## Methods\nMethods are called on asTooltip instances through the asTooltip method itself.\nYou can also save the instances to variable for further use.\n\n```javascript\n// call directly\n$().asTooltip('destroy');\n\n// or\nvar api = $().data('asTooltip');\napi.destroy();\n```\n\n#### show()\nShow the tooltip.\n```javascript\n$().asTooltip('show');\n```\n\n#### hide()\nHide the tooltip.\n```javascript\n$().asTooltip('enable');\n```\n\n#### enable()\nEnable the tooltip function.\n```javascript\n$().asTooltip('enable');\n```\n\n#### disable()\nDisable the tooltip functions.\n```javascript\n$().asTooltip('disable');\n```\n\n#### destroy()\nDestroy the tooltip instance.\n```javascript\n$().asTooltip('destroy');\n```\n\n## Events\n`jquery-asTooltip` provides custom events for the plugin’s unique actions. \n\n```javascript\n$('.the-element').on('asTooltip::ready', function (e) {\n  // on instance ready\n});\n\n```\n\nEvent   | Description\n------- | -----------\ninit    | Fires when the instance is setup for the first time.\nready   | Fires when the instance is ready for API use.\nshow    | Fired when the `show` instance method has been called.\nhide    | Fired when the `hide` instance method has been called.\nenable  | Fired when the `enable` instance method has been called.\ndisable | Fired when the `enable` instance method has been called.\ndestroy | Fires when an instance is destroyed. \n\n## No conflict\nIf you have to use other plugin with the same namespace, just call the `$.asTooltip.noConflict` method to revert to it.\n\n```html\n\u003cscript src=\"other-plugin.js\"\u003e\u003c/script\u003e\n\u003cscript src=\"jquery-asTooltip.js\"\u003e\u003c/script\u003e\n\u003cscript\u003e\n  $.asTooltip.noConflict();\n  // Code that uses other plugin's \"$().asTooltip\" can follow here.\n\u003c/script\u003e\n```\n\n## Browser support\n\nTested on all major browsers.\n\n| \u003cimg src=\"https://raw.githubusercontent.com/alrra/browser-logos/master/safari/safari_32x32.png\" alt=\"Safari\"\u003e | \u003cimg src=\"https://raw.githubusercontent.com/alrra/browser-logos/master/chrome/chrome_32x32.png\" alt=\"Chrome\"\u003e | \u003cimg src=\"https://raw.githubusercontent.com/alrra/browser-logos/master/firefox/firefox_32x32.png\" alt=\"Firefox\"\u003e | \u003cimg src=\"https://raw.githubusercontent.com/alrra/browser-logos/master/edge/edge_32x32.png\" alt=\"Edge\"\u003e | \u003cimg src=\"https://raw.githubusercontent.com/alrra/browser-logos/master/internet-explorer/internet-explorer_32x32.png\" alt=\"IE\"\u003e | \u003cimg src=\"https://raw.githubusercontent.com/alrra/browser-logos/master/opera/opera_32x32.png\" alt=\"Opera\"\u003e |\n|:--:|:--:|:--:|:--:|:--:|:--:|\n| Latest ✓ | Latest ✓ | Latest ✓ | Latest ✓ | 9-11 ✓ | Latest ✓ |\n\nAs a jQuery plugin, you also need to see the [jQuery Browser Support](http://jquery.com/browser-support/).\n\n## Contributing\nAnyone and everyone is welcome to contribute. Please take a moment to\nreview the [guidelines for contributing](CONTRIBUTING.md). Make sure you're using the latest version of `jquery-asTooltip` before submitting an issue. There are several ways to help out:\n\n* [Bug reports](CONTRIBUTING.md#bug-reports)\n* [Feature requests](CONTRIBUTING.md#feature-requests)\n* [Pull requests](CONTRIBUTING.md#pull-requests)\n* Write test cases for open bug issues\n* Contribute to the documentation\n\n## Development\n`jquery-asTooltip` is built modularly and uses Gulp as a build system to build its distributable files. To install the necessary dependencies for the build system, please run:\n\n```sh\nnpm install -g gulp\nnpm install -g babel-cli\nnpm install\n```\n\nThen you can generate new distributable files from the sources, using:\n```\ngulp build\n```\n\nMore gulp tasks can be found [here](CONTRIBUTING.md#available-tasks).\n\n## Changelog\nTo see the list of recent changes, see [Releases section](https://github.com/amazingSurge/jquery-asTooltip/releases).\n\n## Copyright and license\nCopyright (C) 2016 amazingSurge.\n\nLicensed under [the LGPL license](LICENSE).\n\n[⬆ back to top](#table-of-contents)\n\n[bower-image]: https://img.shields.io/bower/v/jquery-asTooltip.svg?style=flat\n[bower-link]: https://david-dm.org/amazingSurge/jquery-asTooltip/dev-status.svg\n[npm-image]: https://badge.fury.io/js/jquery-asTooltip.svg?style=flat\n[npm-url]: https://npmjs.org/package/jquery-asTooltip\n[license]: https://img.shields.io/npm/l/jquery-asTooltip.svg?style=flat\n[prs-welcome]: https://img.shields.io/badge/PRs-welcome-brightgreen.svg\n[daviddm-image]: https://david-dm.org/amazingSurge/jquery-asTooltip.svg?style=flat\n[daviddm-url]: https://david-dm.org/amazingSurge/jquery-asTooltip","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthecreation%2Fjquery-astooltip","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthecreation%2Fjquery-astooltip","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthecreation%2Fjquery-astooltip/lists"}