Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9114367
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T04:11:05+00:00 2026-06-17T04:11:05+00:00

General Problem Problems can arise, when one trys to integrate DOM Manipulating 3rd Party

  • 0

General Problem
Problems can arise, when one trys to integrate DOM Manipulating 3rd Party libraries. In this particular case, a jQuery Lightbox plugin caused problems.

Original Question
Currently i am trying to integrate the following Lightboxplugin into an Ember View: http://codecanyon.net/item/jquery-lightbox-evolution/115655

This is my current code for the View:

App.LightboxView = Ember.View.extend({
    templateName : 'whatever',
    isVisible : false,
    willInsertElement : function(){
        var that = this;
        $.lightbox(this.$(),{
            width   : 600,
            height  : 850,
            onOpen : function(){
                that.$().fadeIn(400);
                that.set("isVisible", true);
            },
        });
    },
});

This approach is working quite fine as it is starting the plugin in the moment the View is inserted into the DOM and everything is displayed fine. Ember seems to insert the resulting html of the View into the DOM and the lightbox plugin fetches the DOM Element and places it into the place where it is needed for the lightbox to work.
But this is where the problems start. Actions do not work anymore in my view. I have some {{action}} helpers in my view and none of them works (they are working when i don’t use the lightbox). I assume this is because the plugin makes manipulations to the DOM, but Ember wants to be the only one to manipulate the DOM.

Can anyone offer some guidance here? This is the first time i am developing/utilizing a lightbox, so this could cause additional problems 🙂

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T04:11:07+00:00Added an answer on June 17, 2026 at 4:11 am

    This is the solution i found with help of sly7_7:

    What caused the problem?
    As outlined in my question i wrote a new View that should get displayed as a Lightbox with the the help opf a Lightbox plugin. That meant the DOMElement hat was inserted by EmberJS would be moved inside of the DOM by the plugin. The problem was that my Application was declared this way:

    App = Ember.Application.create({
        rootElement : "#ember-application-root",
    });
    

    And the corresponding HTML was:

    <html>
       <body>
         <div id="ember-application-root" />
       </body>
    </html>
    

    The root of the application just referred to a part of the DOM. The Lightbox plugin inserted its content at the end of the DOM, which meant that the Ember View was pulled outside of div for the Ember App and therefore lost its event listeners.

    The solution:
    Make the body element the root of the Ember Application. As sly7_7 outlined in his comment, this is the default case for the Ember Application.

    App = Ember.Application.create({
        // rootElement : "#ember-application-root", - defaults to body now
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am looking for a general and complete solution to this common problem! I
Update: After some more reading I see that this problem is totally general, you
I have this general problem in design, refactoring or triage: I have an existing
I'm testing my app, and found a GREF exceeds 2001 problem. For this particular
I wonder if the objective function of a general dynamic programming problem can always
Is makefile an advanced problem or a general problem for a programmer? For a
I'm new to Android programming, so I'm facing some general problems about choosing the
Don't be scared of the extensive code. The problem is general. I just provided
The main problem I'm having is pulling data from tables, but any other general
I'm currently having problems to execute a command from a shell variable. In general

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.