Se, per un motivo o un altro, si ha bisogno di archiviare temporaneamente i dati, jQuery ha un metodo .data()
per la memorizzazione i dati nel DOM. Questo sistema è preferibile da altri come quando si vuole manipolare i valori del attributo "rel"
o "alt"
che spesso si leggono su alcuni tutorial ed esempi su diversi blog.
Valore assegnato all'id
Per esempio se si ha due elementi il primo con l’id
Valore assegnato al BODY"foo"
e il secondo con l’id "bar"
è possibile impostare i dati con il nome "frutta"
e i valore "mela"
per l’elemento con l’id #foo
e il valore "banana"
per l’elemento con l’id #bar
in questo modo:
[code lang=”javascript”]
$(‘#foo’).data(‘frutta’, ‘mela’);
$(‘#bar’).data(‘frutta’, ‘banana’);
[/code]
Per recuperare il valore in un secondo momento chiamare il metodo $(‘#bar’).data(‘frutta’, ‘banana’);
[/code]
.data()
passandogli il nome come argomento. I questo esempio per visualizzare il valore viene utilizzata una finestra di avviso con alert()
:
[code lang=”javascript”]
alert($(‘#foo’).data(‘frutta’));
[/code]
[/code]
Se, invece, non si desidera assegnare i dati a un particolare elemento si può sempre assegnare i dati nel
BODY
della pagina:
[code lang=”javascript”]
$(‘body’).data(‘frutta’, ‘mela’);
alert($(‘body’).data(‘frutta’) );
[/code]
alert($(‘body’).data(‘frutta’) );
[/code]
I’ve been browsing on-line greater than 3 hours nowadays, but I by no means
discovered any fascinating article like yours. It’s lovely price enough for me.
Personally, if all webmasters and bloggers made excellent content as you did, the internet can be much
more helpful than ever before.
I am of your same opinion. Thank you
Glad to be one of the visitors on this awful web site
:D.
As I website possessor I think the content material here is
real fantastic, appreciate it for your efforts.
I like this post, enjoyed this one thanks for posting.
Hey there! Someone in my Myspace group shared this website with
us so I came to take a look. I’m definitely enjoying the
information. I’m bookmarking and will be tweeting this to
my followers! Outstanding blog and terrific design.
For much more info use our forum!
What’s up friends, its wonderful article about tutoringand
fully explained, keep it up all the time.
Fantastic website. Lots of useful information here. I am sending it to a few friends ans additionally sharing in delicious.
And of course, thank you in your sweat!
Thanks a bunch for sharing this with all of us you actually understand what you’re speaking about!
Bookmarked. Please additionally discuss with my website =).
We could have a link alternate arrangement between us
Have you ever thought about including a little bit more than just your articles?
I mean, what you say is fundamental and all.
Nevertheless just imagine if you added some great visuals or
videos to give your posts more, “pop”! Your content is excellent but with pics
and videos, this site could certainly be one of the most beneficial in its field.
Good blog!
Excellent goods from you, man. I’ve understand your stuff previous to
and you are just extremely excellent. I really like what you
have acquired here, certainly like what you’re saying and the
way in which you say it. You make it enjoyable and you still take care of to keep it wise.
I cant wait to read much more from you. This is actually a tremendous website.
It’s going to be finish of mine day, but before finish I am reading this impressive paragraph
to improve my know-how.
Pretty! This was an incredibly wonderful article.
Thanks for providing this info.
This design is spectacular! You obviously know
how to keep a reader entertained. Between your wit and your videos,
I was almost moved to start my own blog (well, almost…HaHa!) Wonderful job.
I really enjoyed what you had to say, and more than that,
how you presented it. Too cool!
There is certainly a lot to know about this issue. I like all of the points
you’ve made.
Piece of writing writing is also a excitement, if you know then you can write if not it
is complex to write.
This post offers clear idea for the new viewers of blogging, that in fact how to do blogging and
site-building.
Piece of writing writing is also a fun, if you know then you can write if not it is complex to write.
Currently it seems like Movable Type is the preferred blogging platform available right now.
(from what I’ve read) Is that what you are using on your blog?
If you want to improve your knowledge just keep visiting this website and
be updated with the most recent news posted here.
Thanks for sharing your thoughts on https://myfrogtee.com/. Regards
As long when you share something valuable together with your subscribers, however, you’ll
carry on and impress upon them yourr nneed to add your relationship.
Thiink “news” and make sure you resemble news articles with pictures and all.
Advertising can be employed on your own website that gives the video or you are able too also embed the
advertising within the video.
We’re a bunch of volunteers and starting a brand new scheme in our community.
Your website offered us with valuable information to
work on. You’ve done a formidable process and our whole neighborhood shall be grateful to
you.
My programmer is trying to persuade me to move to
.net from PHP. I have always disliked the idea because of the
costs. But he’s tryiong none the less. I’ve been using WordPress on a number of websites for about a year and am worried about switching to another platform.
I have heard good things about blogengine.net.
Is there a way I can import all my wordpress posts into it?
Any kind of help would be greatly appreciated!
Generally I don’t read article on blogs, however I wish to
say that this write-up very pressured me to take a look at and do
it! Your writing taste has been amazed me. Thanks, very great post.
Keep on writing, great job!
First of all I would like to say wonderful blog!
I had a quick question which I’d like to ask if you don’t mind.
I was curious to find out how you center yourself and clear your mind before writing.
I’ve had a difficult time clearing my mind in getting
my thoughts out there. I truly do enjoy writing however it just seems
like the first 10 to 15 minutes are generally lost just trying
to figure out how to begin. Any ideas or hints? Appreciate it!
Especially when your website is totally new, it coyld really help to
generate intferest quickly. However, the use off the
right tools it is possible to escalate to new heights of success.
Open Command Prompt – Under the Start Menu, type CMD inside thee search bar.
However, after one donation, you can donate again only after a
couple of months once your body hhas regained the donated blood.
It’s actually tougher to correct damages inside the event
that it’s got gone on very long. Instead off haaving the problem taken care of, I self-medicated
and allowed it to get worse.
The Nkia X3 Red Mobile features a MP3, MP4, e-AAC+, WMA car
stereo files aare typically playable on the cell. This business of trading
iis actually difficult enough and we should benefit from every edgge available
iin the market that can bbe found to us. Possible complications inlcude drug reactions, infection, bleeding, oor perforation with the digestive system which could require surgery.
” These are the logic behind why it’s impossible to become a great leader instead of be compensated in equal value for your value that you simply give. This will probably be your 1st impression one of the many single males and females out there, so never post an image which will send an unacceptable message and you may regret inside end. When you live outside these countries then you get very little surveys to fill.
You can get once in year free copy of your respective report
from all these agencies. Perhaps you have started thinking of NASCAR annd tthey aree seeking some tips to get involved with it.
It’s important that you might have a truck load oof patience when you are performing information marketing using social
network sites.
Upcoming New Releases: Ging with exactly the same concept above, when you have a friend in raduo or are just eally ahead in the
curve musically, you could produce a site that lists and desxcribes the
upcoming new album releases. Readers will move towards
other blogs, that mayy elp the complete their requirements.
This is a gesture of fine will hoping that other blloggers can doo the same.
” These are the logic behind why it really is impossible to be a great leader rather than be compensated in equal value for your value that you simply give. It is very important in the event of organic SEO campaign where results trickle gradually more than a long time of time. When you live outside these countries then you definitely end up little surveys to fill.
I think eerythіng posted mаde a bunch of sense.
Вut, what about this? suppose you wrote а catchhier post title?
I am not saying your content is nott soⅼid, howewver suppose you added a powt title that grabbed people’s attention? I
mean ⋮ Utilizzarre il metodo data() dii jQuery per emorizzare i dati nell
DⲞM ⋮ Ꮲag. (1⁄1) ⊚ Cat. [JQuery] @ Rhadrix ℗ is kinda plain. You сould peek at Yahoo’s front page and sеe how
they write article titles to get people to opеn the links.
You might try adding a video or a picture oг two to grab people inteгested about what
you’ve written. In my opinion, іt could bring your posts a little livelier. http://www.zilveren-ring.net/rental-mobil-agya-pontianak-cocok-buat-yang-liburan-berdua.php
Nice post. I learn something totally new annd challenging on websites I stumbleupon on a daily basis.
It will always be interesting to read articles from other
writers and practice something from their sites.
Awesome blog! Do you have any tips for aspiring writers?
I’m planning to start my own blog soon but I’m a little lost on everything.
Would you advise starting with a free platform like
Wordpress or go for a paid option? There are so many
choices out there that I’m completely overwhelmed ..
Any ideas? Bless you!
My brother suggested I may like this blog. He
was once totally right. This submit truly made my day.
You can not consider just how a lot time I had spednt for this info!
Thanks!
Hello, Neat post. There’s an issue together with your web site in web explorer, would check this?
IE still is the market leader andd a large element of other folks will leave out your
wonderful writing due to this problem.
Hi Dear, are you really visiting this website daily, if so afterward you will absolutely take pleasant know-how.
Whats up very cool blog!! Guy .. Excellent .. Wonderful ..
I’ll bookmark your blog and take the feeds additionally?
I am glad to find numerous useful information here within the submit, we’d like work out more techniques on this regard,
thanks for sharing. . . . . .
What’s up, all is going sound here and ofcourse every one is sharing data, that’s genuinely excellent, keep up writing.
My homepage masterdomino88