官术网_书友最值得收藏!

Designer, meet plugins

We've already talked about how programmers solve the same problems over and over again. It's these common tasks that jQuery simplifies so that we can accomplish these tasks with a minimum amount of code. What about the tasks that are only somewhat common, like the ability to customize the appearance of tooltips?

That's where the jQuery community becomes important. Developers in the jQuery community write code that extends the functionality of jQuery to simplify tasks that are only somewhat common. These bits of code are called plugins, and they are used in conjunction with the jQuery library to make coding complex interactions, widgets, and effects as simple as using the features already built into jQuery.

You'll find a library of hundreds of jQuery plugins on the official jQuery site at this, there are literally thousands more available from sites across the Web for just about any task you want to accomplish.

To create custom-designed tooltips, we'll be using Steven Benner's jQuery PowerTip plugin. You'll learn how to install the plugin on your page and how to configure the CSS code and options to make your tooltips look and work the way you want.

Choosing a plugin

Recently, the jQuery team has started supporting a small number of official jQuery plugins, and you can use them confidently, knowing that they have the same level of expertise, documentation, and support behind them that jQuery itself has. All other jQuery plugins are provided by various members of the jQuery community, and those authors are solely responsible for the documentation and for their own plugins. Writing and providing jQuery plugins is a bit of a free-for-all, and sadly, you will come across a fair number of jQuery plugins that are poorly documented, poorly supported, and even worse, poorly written. What kinds of things should you, as a newcomer to jQuery, look for when choosing a plugin?

  • A recent update to the plugin: Frequent updates mean that a plugin is well supported and that the author is keeping the plugin up to date as jQuery and browsers evolve. You'll even sometimes find other community members making contributions and updates to a plugin, as is the case with the jQuery PowerTip plugin.
  • Thorough and easy-to-understand documentation: Before attempting to download and use a plugin, take a look through the plugin's documentation and make sure that you understand how to implement the plugin and how to use the options that the plugin makes available to you.
  • Browser support: Great plugins generally have the same browser support as the jQuery library.
  • Working demo: Most plugins will offer one or more working demos of their plugin in action. Check out the demo(s) in as many different browsers as possible to make sure that the plugin works as advertised.
  • Reviews and ratings: You won't find reviews and ratings for all plugins, but if you can find some, they can be helpful indicators of the quality and reliability of the plugin.
主站蜘蛛池模板: 金秀| 毕节市| 黄冈市| 凤凰县| 岳池县| 洛隆县| 资阳市| 海阳市| 当雄县| 襄城县| 拉萨市| 天镇县| 潮安县| 东港市| 翁牛特旗| 策勒县| 南京市| 上栗县| 大余县| 兴隆县| 曲松县| 静海县| 衡阳县| 甘泉县| 福建省| 鄂伦春自治旗| 岳阳市| 永和县| 永靖县| 清丰县| 湄潭县| 肃宁县| 惠来县| 呼和浩特市| 怀仁县| 太康县| 河津市| 铅山县| 迭部县| 大余县| 正安县|