This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes foreColor, backColor not displayed using jquery Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "foreColor, backColor not displayed using jquery" Watch "foreColor, backColor not displayed using jquery" New topic
Author

foreColor, backColor not displayed using jquery

Vishal Hegde
Ranch Hand

Joined: Aug 01, 2009
Posts: 1055

Hi,

Below is the js file which is displaying the below error message

Error:
---------------------------
$(this.css) is not a function
[Break On This Error]

'background-color':backcolor
---------------------------

jquery.highlight.js


highlight.html


Please assist where I am going wrong


http://www.lifesbizzare.blogspot.com || OCJP:81%
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60765
    
  65

$(this.css) is not a function

Is that the valid syntax?

(Hint: no.)

(And please take the time to format your code correctly. What you posted is unacceptably messy.)


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Vishal Hegde
Ranch Hand

Joined: Aug 01, 2009
Posts: 1055

Thanks , i resolved it.One more issue, what does the last line (jQuery); mean
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60765
    
  65

That whole construct is called an immediate function. The function is declared, executed and discarded all in that same statement. The (jQuery) portion of the statement is the function's argument list. It's assigned to the $ parameter of the function.

It forces the $ to equate to jQuery within the function, even if something outside of the function redefines $ to mean something else.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: foreColor, backColor not displayed using jquery
 
Similar Threads
my jquery script is not executing
ajax call in jquery
JSPF file can not be included in JSP file and gives error
JSON JQuery Grid Not getting value in JSP
Problem validating form with jQuery validation plugin