All Projects → pie6k → Jquery.initialize

pie6k / Jquery.initialize

Licence: mit
jQuery plugin for dynamically created elements initialization (it was nice few years ago, in 2019+ consider react or sth instead of jQuery)

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Jquery.initialize

Jquery Feyenoord
Asynchronous JS requests for Feyenoord supporters.
Stars: ✭ 52 (-65.33%)
Mutual labels:  ajax, jquery
Formchimp
A customizable MailChimp ajax plugin for jQuery
Stars: ✭ 98 (-34.67%)
Mutual labels:  ajax, jquery
Mydailylearn
🚀 Important commands, Code Snippets, Basics on different topics learning daily 🎉!
Stars: ✭ 87 (-42%)
Mutual labels:  ajax, jquery
Spring Web Rss Channels
A Full Stack RSS Reader web application built with Spring MVC and JSP. It uses libraries like Spring, JPA, Bootstrap, Apache Tiles, JSP etc. There is also a static code analysis tool called Checkstyle.
Stars: ✭ 40 (-73.33%)
Mutual labels:  ajax, jquery
Klik Socialmediawebsite
Complete PHP-based Login/Registration system, Profile system, Chat room, Forum system and Blog/Polls/Event Management System.
Stars: ✭ 129 (-14%)
Mutual labels:  ajax, jquery
Uploader
A lightweight and very configurable jQuery plugin for file uploading using ajax(a sync); includes support for queues, progress tracking and drag and drop.
Stars: ✭ 1,042 (+594.67%)
Mutual labels:  ajax, jquery
Bpage
Based on bootstrap style, static page jump can also be asynchronous page processing pagination plugin
Stars: ✭ 96 (-36%)
Mutual labels:  ajax, jquery
Web
适合java新手入门练习的java web个人网站项目,目前主要维护web-mysql和web-psql两个分支。前台包括博客、代码库、文件下载、留言、登录注册、站内搜索、分类目录等功能,后台包括上传文件、博客、代码,编辑、删除文章,修改个人资料等功能,目前暂停开发新功能。网址:https://demo.hemingsheng.cn ,觉得不错的欢迎 star。 手机版网址:
Stars: ✭ 414 (+176%)
Mutual labels:  ajax, jquery
Django Crud Ajax Login Register Fileupload
Django Crud, Django Crud Application, Django ajax CRUD,Django Boilerplate application, Django Register, Django Login,Django fileupload, CRUD, Bootstrap, AJAX, sample App
Stars: ✭ 118 (-21.33%)
Mutual labels:  ajax, jquery
Nukeviet
NukeViet CMS is multi Content Management System. NukeViet CMS is the 1st open source content management system in Vietnam. NukeViet was awarded the Vietnam Talent 2011, the Ministry of Education and Training Vietnam officially encouraged to use.
Stars: ✭ 113 (-24.67%)
Mutual labels:  ajax, jquery
Ecommerce
We're going to take you step-by-step to build a modern, fully open-source, eCommerce web application using Python, Django, Bootstrap, Javascript, and more.
Stars: ✭ 980 (+553.33%)
Mutual labels:  ajax, jquery
Dotnetdesk
Asp.Net Example web application showing the capabilities of ASP.NET Core 2 MVC, EF (Entity Framework), Web API, Bootstrap, jQuery, datatables, adminlte template and many more. Web app created as helpdesk or ticket support portal.
Stars: ✭ 136 (-9.33%)
Mutual labels:  ajax, jquery
Push State
Turn static web sites into dynamic web apps.
Stars: ✭ 16 (-89.33%)
Mutual labels:  ajax, jquery
Springboot Beginner
🔰 📝 这可能是流程最清晰、代码最干净、注释最详细的 SpringBoot 入门项目咯,对于初学 SpringBoot 的同学非常具有参考与学习价值哟 ~
Stars: ✭ 51 (-66%)
Mutual labels:  ajax, jquery
Form
jQuery Form Plugin
Stars: ✭ 5,122 (+3314.67%)
Mutual labels:  ajax, jquery
Jeeplatform
一款企业信息化开发基础平台,拟集成OA(办公自动化)、CMS(内容管理系统)等企业系统的通用业务功能 JeePlatform项目是一款以SpringBoot为核心框架,集ORM框架Mybatis,Web层框架SpringMVC和多种开源组件框架而成的一款通用基础平台,代码已经捐赠给开源中国社区
Stars: ✭ 1,285 (+756.67%)
Mutual labels:  ajax, jquery
Sms Ssm
🏫 🎓 一个基于 SSM 的简单学生管理系统 : 项目概述全面,代码注释详细,逻辑结构清晰,并提供待优化方案,非常具有参考与学习价值哟 !
Stars: ✭ 351 (+134%)
Mutual labels:  ajax, jquery
Tabulator
Interactive Tables and Data Grids for JavaScript
Stars: ✭ 4,329 (+2786%)
Mutual labels:  ajax, jquery
Fileuploader
Beautiful and powerful HTML file uploading tool. A jQuery, PHP and Node.js plugin that transforms the standard input into a revolutionary and fancy field on your page.
Stars: ✭ 111 (-26%)
Mutual labels:  ajax, jquery
Webapiclientgen
Strongly Typed Client API Generators generate strongly typed client APIs in C# .NET and in TypeScript for jQuery and Angular 2+ from ASP.NET Web API and .NET Core Web API
Stars: ✭ 134 (-10.67%)
Mutual labels:  ajax, jquery

Note from author (pie6k). I've created this lib few years ago and it was nice back then. Now you should propably not be using jQuery for things like that and go with React or something similar. Thank you.

jQuery.initialize

Version: 1.3.0, Last updated: 2018-06-20

jQuery.initialize plugin is created to help maintain dynamically created elements on the page.

Synopsis

jQuery.initialize will iterate over each element that matches the selector and apply the callback function. It will then listen for any changes to the Document Object Model (DOM) and apply the callback function to any new elements inserted into to the document that match the original selector.

$.initialize([selector], [callback]);

This allows developers to define an initialization callback that is applied whenever a new element matching the selector is inserted into the DOM. It works for elements loaded via AJAX also.

Simple demo - click here

Example of use

$.initialize(".some-element", function() {
    $(this).css("color", "blue");
});

But now if new element matching .some-element selector will appear on page, it will be instantly initialized. The way new item is added is not important, you dont need to care about any callbacks etc.

$("<div/>").addClass("some-element").appendTo("body"); //new element will have blue color!

Unobserving

To cease observation of the document, you may disconnect the observer by calling disconnect() on the returned MutationObserver instance which stops it from receiving further notifications until and unless observe() is called again. . E.g.,

var obs = $.initialize([selector], [callback]); // Returns MutationObserver
obs.disconnect();

Options

target

By default, the entire docment is observed for changes. This may result in poor performance. A specific node in the DOM can be observed by specifying a target:

$.initialize(".some-element", function() {
    $(this).css("color", "blue");
}, { target: document.getElementById('observe-this-element') });

Otherwise, target will default to document.documentElement.

observer

A custom MutationObserverInit may be provided. If not provided, it will default to internal configuration.

Browser Compatibility

Plugin is based on MutationObserver. It will works on IE9+ (read note below) and every modern browser.

Note: To make it work on IE9 and IE10 you'll need to add MutationObserver polyfill - like ones here: https://github.com/webcomponents/webcomponentsjs


Performance test (thanks to @dbezborodovrp and @liuhongbo)

Todo

  • make it bower and npm compatible, add advanced performance test.

Contributors

  • Adam Pietrasiak
  • Damien Bezborodov
  • Michael Hulse
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].