Если люди собираются посетить больше чем одну страницу в Вашем сайте, вероятно, лучше поместить их всех в один файл, таким образом, они могут кэшироваться. Они получат один удар впереди, но это будет им в течение всего времени, которое они проводят на Вашем сайте.
No. Every jQuery function returns a jQuery object, and that is how it works. This is a crucial part of jQuery's magic.
If you want to access the underlying element, you have three options...
[0]
to reference itExtend jQuery to do what you want...
$.fn.child = function(s) {
return $(this).children(s)[0];
}
I think what you want to do is this:
$(this).children('img').eq(0);
this will give you a jquery object containing the first img element, whereas
$(this).children('img')[0];
will give you the img element itself.