Welcome, Guest
Username: Password: Remember me

TOPIC: [FIXED] TypeError: $(...).live is not a function

TypeError: $(...).live is not a function 15 Feb 2013 02:00 #6758

  • organicwebs
  • organicwebs's Avatar
  • Offline
  • Premium Member
  • Chris
  • Posts: 133
  • Thank you received: 21
  • Karma: 4
Getting this error in the /administrator/components/com_mycomponent/js/jquery.validationEngine.js
line 28...
$(".formError").live("click", function() {
Its preventing jQuery(document).ready(function($)... scripts from running.

Has .live has been depreciated?

Workaround - replace line 28 with...
$(document).on("click",".formError", function() {

I'm using
  • Firefox (latest)
  • Jcook V2.0
  • JS Framework:Jquery
  • Embed Framework:No
  • Form Style: Condensed
  • Features: JDom Complete (so I don't get those todo graphics)
  • Todo:No
  • DB Auto: Model

Cheers
Just call me Chris :)
Last Edit: 15 Feb 2013 02:12 by organicwebs.
The administrator has disabled public write access.

Re: TypeError: $(...).live is not a function 15 Feb 2013 15:30 #6769

  • JoomGuy
  • JoomGuy's Avatar
  • Offline
  • Moderator
  • Joomla Enthusiast, Lover of Cooking
  • Posts: 1115
  • Thank you received: 195
  • Karma: 64
What version of jQuery do you have loaded? Is it > 1.9.x ?

If so, I think that the workaround is to grab the 1.8.x version instead... jQuery has recently deprecated many methods to harmonise their naming conventions across many widgets/plugins - good long-term, annoying as hell right now!

Please see: www.j-cook.pro/forum/19-new-tickets/6457...-last-jquery-version

************** ADD - I presume that you are in fact using the latest 1.9.x version as, from the jQuery docs it appears as though it was deprecated from version 1.7 and as of 1.9 it's been removed - hence the .live() is not a function error. You can get around this by changing .live() to .on(). Please see link for more details...
**************

Best wishes,

Gez
Need help with your Cook/Joomla Project? . PM me to find out what I can help with. NO time wasters please!!!
Last Edit: 15 Feb 2013 15:55 by JoomGuy. Reason: SEE *ADD*
The administrator has disabled public write access.

Re: TypeError: $(...).live is not a function 05 Aug 2013 18:45 #10690

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 987
  • Karma: 140
Fixed
Coding is now a piece of cake
The administrator has disabled public write access.

Re: TypeError: $(...).live is not a function 14 Oct 2013 10:42 #11390

  • ewajoom
  • ewajoom's Avatar
  • Offline
  • Junior Member
  • Posts: 36
  • Thank you received: 2
  • Karma: 0
Hi,

I've the same problem.
There's no line in helper
$doc->addScript('http://code.jquery.com/jquery.min.js');

I've tried to change in dom/framework/jquery/core.php :
protected $hostedSource = 'http://code.jquery.com/jquery.min.js';
by
protected $hostedSource = 'http://code.jquery.com/jquery-1.8.2.min.js';
and
$this->attachJs[] = 'jquery.min.js';
by
$this->attachJs[] = 'jquery-1.8.2.min.js';

Same error....

PS : there's a reference to 1.9.1 css : $doc->addStyleSheet('code.jquery.com/ui/1.9.1/themes/base/jquery-ui.css');
The administrator has disabled public write access.
Time to create page: 0.071 seconds

Get Started