Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Events inside Jquery Modal not working when call modal('show') method #308

Open
vikingcodes opened this issue Jan 20, 2023 · 0 comments
Open

Comments

@vikingcodes
Copy link

vikingcodes commented Jan 20, 2023

I am using the following approach

import $ from 'jquery';
import 'jquery-modal';

When opening jquery-modal using data target , methods inside modal working fine.

<p data-toggle="modal" data-target="#my-profile">My Profile</p>

But when opening jquery-modal using modal method.

($('#my-profile') as any).modal('show');

Events inside modal not working.

Following is modal code

<div id="my-profile" className="modal" > <div className="" style={{ paddingTop: 120, paddingLeft: 450, paddingRight: 450 }}> <h1 className="modal-title">My <span className="txtBold">Address</span></h1> <div className="modal-bg-white pt4 pb4"> <div className="modal-tab"> <button className="tab active" onClick={(e) => { openTab(e, 'Info') }}>Info Details</button> <button className = "tab" onClick={(e) => {openTab(e, 'Address')}}>Address</button> </div> <div id="Info" className="tab-content" > Info </div> <div id="Address" className="tab-content" > Address </div> </div> </div> </div>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant