jQuery Question
-
I am trying to learn the library jQuery which is used in JavaScript. Please consider the following line of code which I got from the book "Pro jQuery":
var jq = $( 'img[src*=daffod[i]' );
I do not understand the meaning of:
src*=daddod[i]
Please tell me what *= means. Thanks Bob
-
I am trying to learn the library jQuery which is used in JavaScript. Please consider the following line of code which I got from the book "Pro jQuery":
var jq = $( 'img[src*=daffod[i]' );
I do not understand the meaning of:
src*=daddod[i]
Please tell me what *= means. Thanks Bob
src *= daffod[i]
is shorthand way of using this..
src = src * daffod[i];
it's a multiply combined with an assignment
"It's true that hard work never killed anyone. But I figure, why take the chance." - Ronald Reagan That's what machines are for. Got a problem? Sleep on it.
-
I am trying to learn the library jQuery which is used in JavaScript. Please consider the following line of code which I got from the book "Pro jQuery":
var jq = $( 'img[src*=daffod[i]' );
I do not understand the meaning of:
src*=daddod[i]
Please tell me what *= means. Thanks Bob
-
I am trying to learn the library jQuery which is used in JavaScript. Please consider the following line of code which I got from the book "Pro jQuery":
var jq = $( 'img[src*=daffod[i]' );
I do not understand the meaning of:
src*=daddod[i]
Please tell me what *= means. Thanks Bob
That is the attribute contains selector[^]
-
src *= daffod[i]
is shorthand way of using this..
src = src * daffod[i];
it's a multiply combined with an assignment
"It's true that hard work never killed anyone. But I figure, why take the chance." - Ronald Reagan That's what machines are for. Got a problem? Sleep on it.
dusty_dex wrote:
it's a multiply combined with an assignment
Not in a jQuery selector it isn't! ;P
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
-
dusty_dex wrote:
it's a multiply combined with an assignment
Not in a jQuery selector it isn't! ;P
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
Yep, I know this now. :mad: Why on Earth do they have to pick operators that are in common use already? Operator abuse it just ain't healthy. :thumbsdown:
"It's true that hard work never killed anyone. But I figure, why take the chance." - Ronald Reagan That's what machines are for. Got a problem? Sleep on it.
-
Yep, I know this now. :mad: Why on Earth do they have to pick operators that are in common use already? Operator abuse it just ain't healthy. :thumbsdown:
"It's true that hard work never killed anyone. But I figure, why take the chance." - Ronald Reagan That's what machines are for. Got a problem? Sleep on it.
There's only 30 symbols easy to type on a normal keyboard. We have to share those between different languages. It's confusing at first but over time you'll learn to interpret the various languages without too much thinking about it.
-
I am trying to learn the library jQuery which is used in JavaScript. Please consider the following line of code which I got from the book "Pro jQuery":
var jq = $( 'img[src*=daffod[i]' );
I do not understand the meaning of:
src*=daddod[i]
Please tell me what *= means. Thanks Bob
You can infer from this example:- $(“a[href*=jquery.com]”) This selector matches all elements that reference the jQuery site. That means: it selects all elements that has a value 'jquery.com' in it's attribute 'href'. (* means anywhere in the string, ^ means begins with, $ means ends with)