• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 203
  • Last Modified:

what's the meaning of this

var theme =  $.data(document.body, 'theme');

Thanks in advance
0
gamjaradio
Asked:
gamjaradio
4 Solutions
 
sonawanekiranCommented:
Go through this link you will get an idea about .data()

http://api.jquery.com/data/
0
 
HugoHiaslCommented:
It reads an attached stored data-value from the document.body that has the name "theme".

Take a look in the source for an attribute data-theme="value" in the body tag.
0
 
netballiCommented:
The Variable "theme" is being assigned a data attribute for theme,  the  $.data()  stores a reference to a variable, which could even be a global variable in a DOM element for the HTML page.
0
 
Php_expertCommented:
Refer this link for more information about data storage using jQuery:

http://www.ibm.com/developerworks/web/library/wa-domjquery/index.html
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now