Tag: jquery - Page 2
jQuery Accordion Plugin
Last updated: 10.10.2025
Views: 152
An accordion is often used on websites. This element is popular and convenient at the same time. An accordion helps to structure content and save space. In my work, I often used jQuery (and sometimes use it now). And with the help of this library, I wrote an accordion plugin for use in different projects. The plugin is based on the slideToggle() method. Maybe this plugin will also be useful to som...
jQuery Tabs Plugin
Last updated: 10.10.2025
Views: 162
Tabs are a fairly common element. There are various implementations of this element on the Internet. But often the tabs are overloaded with code filled with effects that are unlikely to be needed in ordinary tasks. Therefore, it was decided to write simple tabs, so to speak, "for myself".
This plugin was written a long time ago and I used it in my work. jQuery is not considered a modern solutio...
How to Create a Custom jQuery Plugin
Last updated: 10.10.2025
Views: 172
The convenience of the jQuery plugin is that you can use the same code several times for different objects. In this case, copy-paste code is not needed. In addition, you can change the behavior of the plugin with different parameters. To write your jQuery plugin, you need to expand the $.fn object
In general, it looks like this:
[js]
$.fn.MyPlugin = function() {
//plugin code
}
[/js]...