Attributes

2 minutes
Share the link to this page
Copied
  Completed
You need to have access to the item to view this lesson.
One-time Fee
$99.99
List Price:  $139.99
You save:  $40
€84.63
List Price:  €118.49
You save:  €33.85
£72.93
List Price:  £102.11
You save:  £29.17
CA$136.45
List Price:  CA$191.04
You save:  CA$54.58
A$142.42
List Price:  A$199.40
You save:  A$56.97
S$127.13
List Price:  S$177.99
You save:  S$50.86
HK$781.32
List Price:  HK$1,093.88
You save:  HK$312.56
CHF 77.61
List Price:  CHF 108.66
You save:  CHF 31.04
NOK kr964.91
List Price:  NOK kr1,350.91
You save:  NOK kr386
DKK kr632.09
List Price:  DKK kr884.95
You save:  DKK kr252.86
NZ$165.98
List Price:  NZ$232.38
You save:  NZ$66.40
د.إ367.21
List Price:  د.إ514.11
You save:  د.إ146.90
৳12,173.23
List Price:  ৳17,043.01
You save:  ৳4,869.78
₹9,039.06
List Price:  ₹12,655.05
You save:  ₹3,615.98
RM393.16
List Price:  RM550.44
You save:  RM157.28
₦138,058.19
List Price:  ₦193,286.99
You save:  ₦55,228.80
₨27,858.39
List Price:  ₨39,002.86
You save:  ₨11,144.47
฿3,163.53
List Price:  ฿4,429.07
You save:  ฿1,265.54
₺4,350.09
List Price:  ₺6,090.30
You save:  ₺1,740.21
B$524.86
List Price:  B$734.83
You save:  B$209.96
R1,599.04
List Price:  R2,238.72
You save:  R639.68
Лв165.50
List Price:  Лв231.71
You save:  Лв66.21
₩145,561.48
List Price:  ₩203,791.89
You save:  ₩58,230.41
₪308.94
List Price:  ₪432.54
You save:  ₪123.59
₱5,898.01
List Price:  ₱8,257.45
You save:  ₱2,359.44
¥15,663.03
List Price:  ¥21,928.87
You save:  ¥6,265.84
MX$1,725.89
List Price:  MX$2,416.32
You save:  MX$690.42
QR362.19
List Price:  QR507.09
You save:  QR144.89
P1,375.86
List Price:  P1,926.26
You save:  P550.40
KSh12,898.71
List Price:  KSh18,058.71
You save:  KSh5,160
E£4,692.93
List Price:  E£6,570.29
You save:  E£1,877.36
ብር15,451.02
List Price:  ብር21,632.05
You save:  ብር6,181.03
Kz91,204.18
List Price:  Kz127,689.51
You save:  Kz36,485.32
CLP$85,991.40
List Price:  CLP$120,391.40
You save:  CLP$34,400
CN¥694.15
List Price:  CN¥971.83
You save:  CN¥277.68
RD$6,273.88
List Price:  RD$8,783.69
You save:  RD$2,509.80
DA12,985.47
List Price:  DA18,180.18
You save:  DA5,194.70
FJ$219.95
List Price:  FJ$307.95
You save:  FJ$87.99
Q764.01
List Price:  Q1,069.64
You save:  Q305.63
GY$20,839
List Price:  GY$29,175.44
You save:  GY$8,336.43
ISK kr12,271.77
List Price:  ISK kr17,180.97
You save:  ISK kr4,909.20
DH913.69
List Price:  DH1,279.21
You save:  DH365.51
L1,686.85
List Price:  L2,361.66
You save:  L674.80
ден5,215.40
List Price:  ден7,301.78
You save:  ден2,086.37
MOP$801.58
List Price:  MOP$1,122.25
You save:  MOP$320.66
N$1,595.44
List Price:  N$2,233.69
You save:  N$638.24
C$3,665.93
List Price:  C$5,132.44
You save:  C$1,466.51
रु14,399.55
List Price:  रु20,159.95
You save:  रु5,760.39
S/335.33
List Price:  S/469.47
You save:  S/134.14
K426.76
List Price:  K597.48
You save:  K170.72
SAR374.96
List Price:  SAR524.96
You save:  SAR150
ZK1,954.82
List Price:  ZK2,736.83
You save:  ZK782
L431.12
List Price:  L603.59
You save:  L172.46
Kč2,061.28
List Price:  Kč2,885.88
You save:  Kč824.59
Ft32,245.45
List Price:  Ft45,144.92
You save:  Ft12,899.47
SEK kr895.18
List Price:  SEK kr1,253.28
You save:  SEK kr358.10
ARS$144,485.55
List Price:  ARS$202,285.56
You save:  ARS$57,800
Bs688.29
List Price:  Bs963.64
You save:  Bs275.34
COP$362,010.64
List Price:  COP$506,829.38
You save:  COP$144,818.73
₡49,470.64
List Price:  ₡69,260.87
You save:  ₡19,790.23
L2,631.72
List Price:  L3,684.52
You save:  L1,052.79
₲660,853.14
List Price:  ₲925,220.84
You save:  ₲264,367.69
$U3,853.07
List Price:  $U5,394.46
You save:  $U1,541.38
zł357.47
List Price:  zł500.48
You save:  zł143
Already have an account? Log In

Transcript

Hello in this jQuery video we are going to select elements based on a attribute. So let's just create a few elements. So I know operate just because can be very simple. And I'm gonna say element one and I'm going to add a attribute to this. So I am going to add an attribute or do maybe we add a target attributes from the from the school and our second one blank put this hello and we'll remove the target from the We are going to check if this particular attribute could actually be any attribute and then just the number, but we're just gonna stick with target blank. Once you understand this, you'll be good to go.

When we're going to detect if a element is clicked, or more specifically, a div is clicked, that has a attribute called target, and it has the value of blank and we can do this so really simple. div. Now we put square brackets indicate we are checking for an attribute. The target is the name of the attribute equals single quotation marks, not double could do conflict with this. Otherwise you can slip them around if you want double inside, and then here was going to put underscore blank click so click function We're just going to do a console log console dot log. And I'm gonna say target is blank, save that reload.

And if we go back, only the first two should trigger it, that trigger that triggers it. That triggers that. Third one does not trigger it, even though you're the target, it is not. The value is different, and the final one shouldn't trigger it. So that's how you selected based on attributes or to set the target attribute could be any attribute and any value. So that's it.

Thanks for watching. If you have any questions, feel free to call me message and as usual, I look forward to seeing you in the next video.

Sign Up

Share

Share with friends, get 20% off
Invite your friends to LearnDesk learning marketplace. For each purchase they make, you get 20% off (upto $10) on your next purchase.