question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Initialize for multi clases is it possible ?

See original GitHub issue
<div class="class-1 class-2"></div>
<div class="class-1 class-2"></div>
<div class="class-1 class-5555"></div>
<div class="class-2 class-88"></div>

i want just handle class-1 and class-2 divs both initialize; is it possible ?

$.initialize(“.class-1.class-2”, function() { alert(“selectect classes was initialized”); });

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
bezborodowcommented, Jul 17, 2018

Multiple classes should be treated as a normal selector, so yes, it should work.

Below are some examples of how I use initialize()… note that many complex arrangements are possible:

$.initialize('.customer-flags .alert.alert-dismissible', function() {
$.initialize('.servicetab .servicesubnav-alt.change-plan-container', function() {
$.initialize('#iorhael form[method="post"], #nuskopenav form[method="post"]', function() {
$.initialize('[data-toggle="tooltip"]', function() {
$.initialize('input[type=checkbox][data-toggle=toggle]', function() {
$.initialize('#invoices-summary-table tbody tr', function() {
$.initialize('.abn-picker .col-md-6', function() {
$.initialize('#iorhael form[method="post"], #nuskopenav form[method="post"]', function() {
$.initialize('.customer-edit-dialogue,.service-edit-dialogue,.frodo-dialogue', function() {
$.initialize('.service-generic-form,.frodo-generic-form', function() {
$.initialize('table.contracts-summary-table', function() {
0reactions
bezborodowcommented, Jul 18, 2018

No worries. I hope your project goes well.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How do I initialize this derived class that uses multiple ...
1 Answer 1 · But what if both A, B themselves inherit from AA, BB (and in my case AA = BB )?...
Read more >
Providing Multiple Constructors in Your Python Classes
In this step-by-step tutorial, you'll learn how to provide multiple constructors in your Python classes. To this end, you'll learn different ...
Read more >
Is it possible in C++ to initialize multiple variables or ...
Is it possible in C++ to initialize multiple variables or classes via a loop? I'm new to c++ and also to programming. But...
Read more >
Initializing Fields - The Java™ Tutorials
The Java compiler copies initializer blocks into every constructor. Therefore, this approach can be used to share a block of code between multiple...
Read more >
initialize() | Apple Developer Documentation
The runtime sends the initialize() message to classes in a thread-safe manner. That is, initialize() is run by the first thread to send...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found