1
I searched hard and I couldn’t find the answer.
I need to assign a value to a variable in Jquery, I don’t have much knowledge. What I need is:
By clicking on a link:
<a href="?sts=Pendente" title="Avisos Pendentes" id="Pendente" data-statusTipo="Pendente">
A variable called sts1 has the id value above:
var sts1 = $('a').on(click (function() {
$('a:hover', this).data('statusTipo');
}));
That’s it... I’ve tried everything and I couldn’t...
Thank you for your attention
worked thanks for the return
– Tiago Buzatto
I only had a question, for me to use this variable in another function I have to use without the "var"... that’s it?
– Tiago Buzatto
@Exact thiagobuzatto. If you use the
var
you will re-start the variable and it loses the old value.– Sergio