Data Function

4 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
€85.49
List Price:  €119.70
You save:  €34.20
£74.12
List Price:  £103.78
You save:  £29.65
CA$136.71
List Price:  CA$191.41
You save:  CA$54.69
A$152.23
List Price:  A$213.13
You save:  A$60.89
S$128.04
List Price:  S$179.26
You save:  S$51.22
HK$784.91
List Price:  HK$1,098.91
You save:  HK$313.99
CHF 79.62
List Price:  CHF 111.47
You save:  CHF 31.85
NOK kr1,010.40
List Price:  NOK kr1,414.60
You save:  NOK kr404.20
DKK kr638.01
List Price:  DKK kr893.25
You save:  DKK kr255.23
NZ$166.83
List Price:  NZ$233.57
You save:  NZ$66.74
د.إ367.26
List Price:  د.إ514.18
You save:  د.إ146.92
৳12,155.75
List Price:  ৳17,018.53
You save:  ৳4,862.78
₹8,596.36
List Price:  ₹12,035.26
You save:  ₹3,438.89
RM425.20
List Price:  RM595.30
You save:  RM170.10
₦153,097.68
List Price:  ₦214,342.88
You save:  ₦61,245.20
₨28,434.65
List Price:  ₨39,809.65
You save:  ₨11,375
฿3,238.52
List Price:  ฿4,534.06
You save:  ฿1,295.54
₺4,019.29
List Price:  ₺5,627.17
You save:  ₺1,607.88
B$555.95
List Price:  B$778.35
You save:  B$222.40
R1,785.64
List Price:  R2,499.97
You save:  R714.33
Лв167.37
List Price:  Лв234.32
You save:  Лв66.95
₩138,035.24
List Price:  ₩193,254.86
You save:  ₩55,219.61
₪336.32
List Price:  ₪470.86
You save:  ₪134.54
₱5,662.23
List Price:  ₱7,927.35
You save:  ₱2,265.11
¥14,719.04
List Price:  ¥20,607.25
You save:  ¥5,888.20
MX$1,867.78
List Price:  MX$2,614.97
You save:  MX$747.18
QR364.02
List Price:  QR509.64
You save:  QR145.62
P1,334.67
List Price:  P1,868.59
You save:  P533.92
KSh12,918.70
List Price:  KSh18,086.70
You save:  KSh5,168
E£4,944.50
List Price:  E£6,922.50
You save:  E£1,977.99
ብር13,688.63
List Price:  ብር19,164.63
You save:  ብር5,476
Kz91,186.38
List Price:  Kz127,664.58
You save:  Kz36,478.20
CLP$95,820.41
List Price:  CLP$134,152.41
You save:  CLP$38,332
CN¥716.71
List Price:  CN¥1,003.43
You save:  CN¥286.71
RD$6,029.39
List Price:  RD$8,441.39
You save:  RD$2,412
DA13,004.72
List Price:  DA18,207.13
You save:  DA5,202.41
FJ$224.44
List Price:  FJ$314.23
You save:  FJ$89.78
Q767.92
List Price:  Q1,075.11
You save:  Q307.19
GY$20,914.76
List Price:  GY$29,281.51
You save:  GY$8,366.74
ISK kr12,176.78
List Price:  ISK kr17,047.98
You save:  ISK kr4,871.20
DH900.15
List Price:  DH1,260.25
You save:  DH360.10
L1,693.89
List Price:  L2,371.51
You save:  L677.62
ден5,262.76
List Price:  ден7,368.08
You save:  ден2,105.31
MOP$808.30
List Price:  MOP$1,131.65
You save:  MOP$323.35
N$1,772.82
List Price:  N$2,482.02
You save:  N$709.20
C$3,674.63
List Price:  C$5,144.63
You save:  C$1,470
रु13,711.85
List Price:  रु19,197.15
You save:  रु5,485.29
S/354.61
List Price:  S/496.47
You save:  S/141.86
K412.45
List Price:  K577.45
You save:  K165
SAR374.98
List Price:  SAR524.99
You save:  SAR150
ZK2,314.16
List Price:  ZK3,239.92
You save:  ZK925.75
L434.44
List Price:  L608.23
You save:  L173.79
Kč2,108.91
List Price:  Kč2,952.57
You save:  Kč843.65
Ft34,214.75
List Price:  Ft47,902.02
You save:  Ft13,687.27
SEK kr958.89
List Price:  SEK kr1,342.49
You save:  SEK kr383.59
ARS$126,065.09
List Price:  ARS$176,496.17
You save:  ARS$50,431.08
Bs692.26
List Price:  Bs969.19
You save:  Bs276.93
COP$401,329.80
List Price:  COP$561,877.77
You save:  COP$160,547.97
₡50,416.70
List Price:  ₡70,585.39
You save:  ₡20,168.69
L2,634.73
List Price:  L3,688.73
You save:  L1,054
₲774,763.12
List Price:  ₲1,084,699.36
You save:  ₲309,936.24
$U4,064.43
List Price:  $U5,690.36
You save:  $U1,625.93
zł364.14
List Price:  zł509.81
You save:  zł145.67
Already have an account? Log In

Transcript

Hello, in this jQuery video, we are going to look at the data method. The data method is used to give information about well data. So if we create a simple div and this div, we're going to say if we're going to DVR and I'm going to play span here, so this is an inline elements of this won't ruin any of the styling that we may have applied div has some natural styling in any way, interfere with that. And I know X amount of years old band, this is where the information is going to go. So instead of you know, Princess supplies or printing our idea here, the multiple sort of selected like, guaranteed concept spans where you know, you can see something, you can dynamically change it within jQuery. So totally change it within jQuery.

So the first thing you should do is do Vol. I would call it dollar 20 to select the elements in this case, this can be the first part and so the first part of the div, then I am going to do dollar data. Data. And now what we are going to do is essentially assign a name to what we're doing here so we can refer to this later on. It's also epic. Come on you long curly braces and go long.

And now we are going to say this was name and a song's name Okay, so now what we need to do is do dollar span one we are going to be Gtech here we go to the donor data give selected appeal. Inside we are going to get it from Epic and we're going to say.net pretty much the exact same thing for last stat. The only difference is the name Save that, reload it with my mask on the live feed. My name is Ron and I am 27 years old. So to prove that it is working, I am going to create the cotton epic proportions. I have no idea when the button is clicked, Darla to pick it up.

So epic. Don't click. We're gonna call this function when it happens. And when it's clicked, we're going to do all this we could fill it to just do this part we're going to do but we're going to do all of it just encapsulated just to separate it out. Just like to see exactly why be triggered when the button is clicked. So fully loaded up Say Miami the letter or click that it puts in.

So that is a great way of sort of, you know, giving information about or their data or their information, providing more context, especially if you're using something like Ajax to you know, get this information from a database is a pretty cool and elegant way of adding it to your dump. That's it simple stuff. If you have any questions, feel free to pop me a 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.