what's the meaning of this

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

Thanks in advance
Question by:gamjaradio
LVL 17

Assisted Solution

sonawanekiran earned 125 total points
ID: 38850639
Go through this link you will get an idea about .data()
LVL 12

Assisted Solution

HugoHiasl earned 125 total points
ID: 38850646
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.
LVL 11

Assisted Solution

netballi earned 125 total points
ID: 38850659
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.

Accepted Solution

Php_expert earned 125 total points
ID: 38850854
Refer this link for more information about data storage using jQuery:

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction Got endorsements from your clients?  Great!  There is almost nothing better than word-of-mouth advertising.  But how can you do that on the internet?  Sure you can make a page for endorsement quotations and list them all, but who is …
I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
The viewer will learn how to dynamically set the form action using jQuery.
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)

770 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