Solved

what's the meaning of this

Posted on 2013-02-04
4
178 Views
Last Modified: 2013-02-04
var theme =  $.data(document.body, 'theme');

Thanks in advance
0
Comment
Question by:gamjaradio
4 Comments
 
LVL 17

Assisted Solution

by:sonawanekiran
sonawanekiran earned 125 total points
Comment Utility
Go through this link you will get an idea about .data()

http://api.jquery.com/data/
0
 
LVL 12

Assisted Solution

by:HugoHiasl
HugoHiasl earned 125 total points
Comment Utility
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
 
LVL 11

Assisted Solution

by:netballi
netballi earned 125 total points
Comment Utility
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
 
LVL 5

Accepted Solution

by:
Php_expert earned 125 total points
Comment Utility
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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Introduction HyperText Transfer Protocol (http://www.ietf.org/rfc/rfc2616.txt) or "HTTP" is the underpinning of internet communication.  As a teacher of web development I have heard many questions, mostly from my younger students who have come to t…
Introduction A frequently asked question goes something like this:  "I am running a long process in the background and I want to alert my client when the process finishes.  How can I send a message to the browser?"  Unfortunately, the short answer …
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now