Like
var mything = $('#mything').val(); // Is get the value for later
But I saw sometimes have set a var just for an id
var mything = $('#mything');
mything.on('mouseenter', function() {
$('#text').css('font-weight', '700');
});
vs
$('#mything').on('mouseenter', function() {
$('#text').css('font-weight', '700');
});
What is the purpose to set a var just for an id? Is mean something like on count scripts?
Thanks!