saribe / eModal

Easy Modal for bootstrap, is a simple way to create modal dialogs using javascript.
http://saribe.github.io/eModal
271 stars 97 forks source link

Doesn't work with jQuery 3.1.1 #62

Closed DedicatedManagers closed 5 years ago

DedicatedManagers commented 7 years ago

If I use jquery 3.1.1 it doesn't work. I'm trying to use the iframe code.

eModal.iframe('/', 'My Page');

I get javascipt/jquery errors.

jQuery.Deferred exception: a.indexOf is not a function r.fn.load@https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js:4:19060 iframe@http://rawgit.com/saribe/eModal/master/dist/eModal.js:435:27 @http://localhost/tool:53:9 g/</j@https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js:2:29946 g/</k<@https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js:2:30262 undefinedjquery.min.js:2:31515 TypeError: a.indexOf is not a function [Learn More]

If I use 2.2, it works. Will this be updated for the latest version of jquery? Thanks, tc

Doesn't work: <script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>

Works: <script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script>

I'm using eModal version: SaRibe: eModal.js v1.2.65 <script src="http://rawgit.com/saribe/eModal/master/dist/eModal.js"></script>

DevStrefa commented 7 years ago

I was able to run this library with jquery 3.1.1 with some changes in emodal.js

var message = $(html) .load(iframeReady); change to var message=$(html).on('load', iframeReady);

ghost commented 7 years ago

I have added jQuery Migrate to make it work

DedicatedManagers commented 7 years ago

Thanks for the response...

So you are saying you got it to work with jQuery like this?

<script src="https://code.jquery.com/jquery-3.0.0.js"></script> <script src="https://code.jquery.com/jquery-migrate-3.0.0.js"></script>

Taken from the documentation at: https://github.com/jquery/jquery-migrate

ghost commented 7 years ago

Yes It worked for me with this.. I did not have to make any other changes

saribe commented 5 years ago

Fix on 1.2.66