inherit
100824
0
May 13, 2012 5:37:49 GMT -8
Michael
14,585
March 2007
wrighty
|
Post by Michael on Jul 19, 2010 5:05:10 GMT -8
Ok.
I got bored, and thought to increase my jQuery knowledge, I'd do some of the ProBoards codes in jQuery.
And well, it's fun & seems to be pretty quick loading. Although haven't benchmarked any comparisons.
Things such as the forum resize: $('table[width=92%]').each(function(){ $(this).attr("width", "[red]842px[/red]"); });
And the center mini profile: $('td.windowbg[width=20%], td.windowbg2[width=20%]').each(function(){ $(this).attr("align", "center"); });
Can be done in less code....
Of course, you then have the problem with the loading of the jQuery library - however, I'm wondering whether it's worth it or not. Obviously if every code on the forum is done through the jQuery library, then it's ok... and so long as you use lots of the library.
Anyway, anyone else looking to use jQuery? ;D
|
|
inherit
130228
0
Jul 11, 2024 19:19:59 GMT -8
Charles Stover
1,731
August 2008
gamechief
|
Post by Charles Stover on Jul 20, 2010 10:20:27 GMT -8
I really need to start using it. How cross-browser is the $('table[width=93%]')? If very, I'll definitely get into it. Otherwise, you can just do it in CSS.
Secondly, jQuery offers a minimum-bandwidth library. I think it's called jquery.min.js. Look for it. As for adding the whole library for public codes, I'd say no. For personal use, yes. Public users wouldn't understand the library (namely whether or not to add it every time you add a code that uses jQuery).
|
|
inherit
100824
0
May 13, 2012 5:37:49 GMT -8
Michael
14,585
March 2007
wrighty
|
Post by Michael on Jul 20, 2010 10:50:33 GMT -8
Yea, it would be more for personal use. They don't minifiy the current release as far as I remember reading, I'll have a look. The idea of jQuery is that it's 100% cross browser... So yea, as far as I saw, the remodel was 100% CB.
|
|
inherit
97216
0
Nov 26, 2024 13:53:14 GMT -8
Bennett 🚀
Formerly iPokemon.
3,622
January 2007
catattack
iPokemon's Mini-Profile
|
Post by Bennett 🚀 on Jul 20, 2010 11:03:50 GMT -8
Does Proboards even allow jQuery?
|
|
inherit
100824
0
May 13, 2012 5:37:49 GMT -8
Michael
14,585
March 2007
wrighty
|
Post by Michael on Jul 20, 2010 12:28:27 GMT -8
Why wouldn't it? jQuery doesn't just mean that you're using the AJAX features - those parts are what you can't use. However, as I showed above a quick example is that jQuery has a much more refined selector function $(....), which saves much looping.
|
|
inherit
fishgomoo
85493
0
Nov 19, 2012 13:59:58 GMT -8
dude
cows go glug
2,539
July 2006
dudelicious
|
Post by dude on Jul 20, 2010 13:09:34 GMT -8
Yea, it would be more for personal use. They don't minifiy the current release as far as I remember reading, I'll have a look. The idea of jQuery is that it's 100% cross browser... So yea, as far as I saw, the remodel was 100% CB. As far as I'm aware they've always provided the minified version along with the complete - the former to include in your code and the latter to understand what's going on. It's also standard practice to load the library from where it's stored on google code so that if another website has recently used jquery then there will be a copy cached to save on loading times.
|
|
inherit
100824
0
May 13, 2012 5:37:49 GMT -8
Michael
14,585
March 2007
wrighty
|
Post by Michael on Jul 20, 2010 15:35:44 GMT -8
Yea, it would be more for personal use. They don't minifiy the current release as far as I remember reading, I'll have a look. The idea of jQuery is that it's 100% cross browser... So yea, as far as I saw, the remodel was 100% CB. As far as I'm aware they've always provided the minified version along with the complete - the former to include in your code and the latter to understand what's going on. It's also standard practice to load the library from where it's stored on google code so that if another website has recently used jquery then there will be a copy cached to save on loading times. Thats not the only reason. Its also down to Google running a CDN, but yes it's the best thing to do. --- Random Code: $(window).load(function() { $('img[alt="[image] "]').each(function(){ var w = [red]600[/red]; if($(this).width() > w) $(this).replaceWith($('<a>').attr("href", $(this).attr("src")).text("This image has been resized. Click to see original size.").append($('<br>')).append($(this).clone().attr("border", "0").attr("width", w))); }); });;D Resizes large images!
|
|
#e61919
2
0
1
Oct 2, 2024 14:45:32 GMT -8
Martyn Dale
$[user.personal_text]
20,088
February 2003
martyn
|
Post by Martyn Dale on Jul 21, 2010 9:33:46 GMT -8
V5 already includes, and makes use of jQuery. If people learn to how to make good use of it now, it certainly wouldnt be the worst thing in the world
|
|
inherit
*this CT deserves an achievement*
136400
0
Jun 25, 2021 18:23:00 GMT -8
Trill
hola
6,232
January 2009
ghbraingle
|
Post by Trill on Jul 21, 2010 9:45:50 GMT -8
Yay! ;D I'm working on modifying a news slider, kind on like the one of the homepage of the AOL Mail page when logged in. It uses jQuery, so that's a plus. It's kind of like a very advanced news fader.
|
|
inherit
100824
0
May 13, 2012 5:37:49 GMT -8
Michael
14,585
March 2007
wrighty
|
Post by Michael on Jul 21, 2010 10:10:30 GMT -8
So it has the jQuery library included? Awesome! ;D Martyn - any ideas what the limits in terms of the AJAX ability that we're allowed to execute then/
|
|
#e61919
2
0
1
Oct 2, 2024 14:45:32 GMT -8
Martyn Dale
$[user.personal_text]
20,088
February 2003
martyn
|
Post by Martyn Dale on Jul 21, 2010 11:51:15 GMT -8
Yes, but it's not something we are ready to disclose at this point as it is still subject to change.
The use of jquery however is not going to be changed so it's safe for me to say it
|
|
inherit
100824
0
May 13, 2012 5:37:49 GMT -8
Michael
14,585
March 2007
wrighty
|
Post by Michael on Jul 21, 2010 11:56:47 GMT -8
jQuery ForumThat uses the jQuery category splitter I just coded, and the speed at which it loads is rediculous fast!
|
|
#e61919
2
0
1
Oct 2, 2024 14:45:32 GMT -8
Martyn Dale
$[user.personal_text]
20,088
February 2003
martyn
|
Post by Martyn Dale on Jul 21, 2010 16:15:22 GMT -8
Cat solitudes won't be needed in v5 because of the nature of the template engine
|
|
Aaron
Junior Member
And what is Fonzie like?
Posts: 265
inherit
25673
0
Mar 10, 2013 19:53:10 GMT -8
Aaron
And what is Fonzie like?
265
June 2004
derfleurer
|
Post by Aaron on Jul 21, 2010 16:19:13 GMT -8
Another virtual copy? I was more flattered by the createElement one, to be honest. Anywho $('tr', $('table:eq(1)', $('a.nav').parent())) That has got to be the coolest bit of business ever. <3
|
|
inherit
100824
0
May 13, 2012 5:37:49 GMT -8
Michael
14,585
March 2007
wrighty
|
Post by Michael on Jul 21, 2010 16:27:15 GMT -8
Another virtual copy? I was more flattered by the createElement one, to be honest. Anywho $('tr', $('table:eq(1)', $('a.nav').parent())) That has got to be the coolest bit of business ever. <3 Lolwat?
|
|