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

  • Home
  • SEARCH
  • 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 9204073
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T23:37:13+00:00 2026-06-17T23:37:13+00:00

I have created a map using LeafletJS and added a button which serve as

  • 0

I have created a map using LeafletJS and added a button which serve as a trigger powered via jQuery. However using .click() event listener didn’t work. So I looked at source of the page and did some experimenting.

I have discovered that almost all of the code generated via JavaScript was invisible to jQuery I could not use almost any of the map’s elements as triggers or influence them in any way (for example using .css()).

I’d like to know two things:

  • Why is HTML generated via JavaScript is invisible to jQuery? And is it library(LeafletJS) specific
  • Is there a way to reach HTML generated via JavaScript library using jQuery without modifying the library it self?
  • 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-17T23:37:14+00:00Added an answer on June 17, 2026 at 11:37 pm

    The reason you can’t touch anything in there with your jQuery is because the code in LeafletJS runs asynchronously. When you run your jQuery code, the elements in question have not yet been created.

    You have to run your jQuery code in the whenReady callback.


    If you’re just trying to listen to click events, you could use event delegation:

    $(document).on('click', 'The CSS selector', function () {
        // Your code here...
    });
    

    This’ll work, but for performance reasons you should bind the event listener to the element on which you are calling LeafletJS.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using the jquery-ui-map plugin (http://code.google.com/p/jquery-ui-map/). I have successfully created a map using
I am trying to display the map i have created using the Iterator. The
We have created a js file for displaying JVectorMap Africa map using Converter.py. Now
I have created a google map displaying markers and the weather layer using Google
So I have created a nested template (a map of vectors) using stanford's CS106
I have created a map which allows the user to plot multiple markers with
I have created a div with a image I'm using with Image Map. <div
I have created a C++/CLI mixed DLL which I am using from C# Winforms
I have created a 3d map using rgl.surface(), mainly following Shane's answer in this
I have created a simple app which shows a Google Map. I am testing

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.