Go to Post I think that everyone should just take a step back and look at the whole picture, FIRST is a family, not an organization full of regions, we all try to help each other, not 'cause it benefits us, but because it's graciously proffesional. - Mike Schroeder [more]
Home
Go Back   Chief Delphi > Technical > IT / Communications > Website Design/Showcase
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #6   Spotlight this post!  
Unread 14-02-2013, 16:40
iLloyd iLloyd is offline
Registered User
AKA: Isiah L.
FRC #0128 (The Botcats)
Team Role: Programmer
 
Join Date: Feb 2013
Rookie Year: 2013
Location: Grandview
Posts: 27
iLloyd is an unknown quantity at this point
Re: Team 128's redesigned website!

I don't know if anyone knows jQuery but I am trying to change the width of ".affix" if the screen resolution is above a certain size. I got the code but it doesn't seem to work. Any help?

Code:
<script>
$(document).ready(function() {

if ((screen.width>=2048) && (screen.height>=1152)) {
alert('Screen size: 1024x768 or larger');
$(".affix").css({"width":"7%"});

}
else {
alert('Screen size: less than 1024x768, 800x600 maybe?');

}
});
</script>
EDIT: Also I added the resize script. Just for giggles I mesured the before and after speed of the media.html page.

Before: 3.30s
After: 0.92s.

Holly smokes! A reduction of 2.38 S. Thanks, synth3tk!

Last edited by iLloyd : 14-02-2013 at 17:04. Reason: Added more details
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 12:41.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi