Highlighted

jquery.reveal.js: uses jQuery.live(), which no longer exists

LEGEND ,
Aug 27, 2020

Copy link to clipboard

Copied

Hello, all,

 

I am tasked with upgrading old versions of jQuery to v3.5.1.  I've had some success, but my next attempt has me a bit baffled, so I'm here to ask for ideas.

 

One sub-section of this project, the developer (no longer here) used something called jquery.reveal.js.  It is attempting to make a call to a .live() function that has been deprecated.  Now, I've read online where .live() can be replaced with .on(), but due to .on() having different arguments, you can't just swap it out without some modification.  Well, none of the developer code contains .live() that I've found (so far); but the jquery.reveal.js file does.  I'm leery about editing the library file - I believe bad things can happen when one goes about tinkering with someone else's baby.

 

So, what do you guys think should be my next step?  Looking at the Reveal site, Reveal hasn't been updated since 2011, so there's no route, there.

 

V/r,

 

^ _ ^

No replies, so I went ahead and did what I didn't want to do.  I edited the jquery.reveal.js file.  Just changed the only .live() tag in the document from:

$('a[data-reveal-id]').live('click', function(e) {

To:

$('[data-reveal-id]').on('click', 'a', function(e) {

I loaded the page, and did not get any error messages.  Still have anxieties, though.  Keeping my fingers crossed that, somewhere down the road, this doesn't come back to bite me in the undercarriage.

 

V/r,

 

^ _ ^

TOPICS
Bootstrap, Browser, Code, Download install and licensing, Error, Extensions, How to, Import and export, Interface, Other, Performance, Preview, Product issue, Publish, Server side applications

Views

53

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

jquery.reveal.js: uses jQuery.live(), which no longer exists

LEGEND ,
Aug 27, 2020

Copy link to clipboard

Copied

Hello, all,

 

I am tasked with upgrading old versions of jQuery to v3.5.1.  I've had some success, but my next attempt has me a bit baffled, so I'm here to ask for ideas.

 

One sub-section of this project, the developer (no longer here) used something called jquery.reveal.js.  It is attempting to make a call to a .live() function that has been deprecated.  Now, I've read online where .live() can be replaced with .on(), but due to .on() having different arguments, you can't just swap it out without some modification.  Well, none of the developer code contains .live() that I've found (so far); but the jquery.reveal.js file does.  I'm leery about editing the library file - I believe bad things can happen when one goes about tinkering with someone else's baby.

 

So, what do you guys think should be my next step?  Looking at the Reveal site, Reveal hasn't been updated since 2011, so there's no route, there.

 

V/r,

 

^ _ ^

No replies, so I went ahead and did what I didn't want to do.  I edited the jquery.reveal.js file.  Just changed the only .live() tag in the document from:

$('a[data-reveal-id]').live('click', function(e) {

To:

$('[data-reveal-id]').on('click', 'a', function(e) {

I loaded the page, and did not get any error messages.  Still have anxieties, though.  Keeping my fingers crossed that, somewhere down the road, this doesn't come back to bite me in the undercarriage.

 

V/r,

 

^ _ ^

TOPICS
Bootstrap, Browser, Code, Download install and licensing, Error, Extensions, How to, Import and export, Interface, Other, Performance, Preview, Product issue, Publish, Server side applications

Views

54

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Aug 27, 2020 0
LEGEND ,
Aug 28, 2020

Copy link to clipboard

Copied

No replies, so I went ahead and did what I didn't want to do.  I edited the jquery.reveal.js file.  Just changed the only .live() tag in the document from:

$('a[data-reveal-id]').live('click', function(e) {

To:

$('[data-reveal-id]').on('click', 'a', function(e) {

I loaded the page, and did not get any error messages.  Still have anxieties, though.  Keeping my fingers crossed that, somewhere down the road, this doesn't come back to bite me in the undercarriage.

 

V/r,

 

^ _ ^

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Aug 28, 2020 0