views:

30

answers:

2

Ahh i'm stuck again. helpp

why do i encounter this "can't find variable: $j" when i use this method

function myMethod(htmlObject) { var buttonTags = $j("button",htmlObject); ... }

Sorry for askin silly questions again. running outta time =\ THANKS FOR THEHELP!

A: 

what kind of langage you use? I think JS, but do you use a framework?

Brice Favre
+3  A: 

My psychic powers tell me you're trying to use jQuery. In which case the name of the function is just $ (or jQuery) not $j.

Dean Harding
erm sorry i forgot to mention in a hurry, yes i'm using JQuery. I've use $j and it works in other pages.what the difference btw $j and $
orangebrainer
`$j` is non-standard name. It's sometimes used when you're using jQuery with another library that also overrides the '$' variable. Sometimes you'll see `var $j = jQuery.noConflict();` at the top of the page which is why it may have worked for you on other pages.
Dean Harding
oh yes i think its that cause.Anyways i've used another method without using jquery.thank you for the clarification anyway!have a great day ahead!
orangebrainer
@orangebrainer: if this answers your question, it would be much appreciated if you click the outline of a "tick" next to this answer to mark it as "correct".
Dean Harding