Laptop Insurance 1
Differences between jQuery 1.2.x and 1.3.x - html() function not taking a number
Facts - HTML and Javascript
Tuesday, 31 March 2009 13:32
Article Index
Differences between jQuery 1.2.x and 1.3.x
html() function not taking a number
jQuery UI
Accessing jQuery UI Tabs
All Pages

html() function not taking a number

If a function foo() returns a number than you can not use the result in the html() function. Before the following worked:

 
  foo() { return new Number(123); }
  $('#displayFooResult').html(foo());
 

With jQuery 1.3.x I have to use the following:

 
  foo() { return new Number(123); }
  $('#displayFooResult').html("<span>" +foo() +"</span>");
 


 
Electric Bikes & Scooters
power systems kettlebells