jQuery dummy question

Stefek

Quote from: Waldschwein on July 07, 2010, 12:32:28 AMjQuery is more performant with classes then with IDs...
That's wrong info, Michael.

Quote
Use ID as Selector whenever possible

Selecting DOM elements using the class attribute is simpler than ever using jQuery. Even though it is simple it should be avoided whenever possible as as selecting using ID is much faster

source:
http://www.tripwiremagazine.com/2010/04/24-irresistible-jquery-tips-to-power-up-your-javascript-skills.html


Regards,
Stefek
[i]"Gemeinsam schafft man mehr."[/i]

[b][url=http://duden.de/rechtschreibung/gemeinsam#Bedeutung1]gemeinsam[/url][/b]
1. mehreren Personen oder Dingen in gleicher Weise gehörend, eigen
2. in Gemeinschaft [unternommen, zu bewältigen]; zusammen, miteinander
#Duden

Argos

Thanks Michael, I chose to use a class instead of the 2 ID's. Works great!
Jurgen Nijhuis
Argos Media
Heiloo, The Netherlands
----------------------------------------------------------------
Please don't request personal support, use the forums!

Waldschwein

Hello!

<script type="text/javascript">
$(function() {
$("#tabs*").tabs({
});
});
</script>

That could do it. The other would be setting a "for" loop ( for i=1, i++, ...).
Perhaps the better solution would be using in HTML/CSS a class "tabs" and not an id, then you won't have the problem with the different names - jQuery is more performant with classes then with IDs...

Yours Michael

Argos

I have searched and searched the web, but couldn't find an answer. As a non-coder I don't know how to combine these two jquery calls:

<script type="text/javascript">
$(function() {
$("#tabs1").tabs({
});
});
$(function() {
$("#tabs2").tabs({
});
});
</script>


Can anyone help me out?  :roll:
Jurgen Nijhuis
Argos Media
Heiloo, The Netherlands
----------------------------------------------------------------
Please don't request personal support, use the forums!