Skip to content
Permalink
Browse files

Link to jQuery version

Signed-off-by: drublic <hans@sa-designz.de>
  • Loading branch information
drublic committed Dec 8, 2011
1 parent df24918 commit 145a150854bde08ae651f0124b363a4120b7156b
Showing with 20 additions and 17 deletions.
  1. +7 −6 css/styles.css
  2. +13 −11 index.html
@@ -66,8 +66,9 @@ hr { display: block; height: 1px; border: 0; border-top: 1px solid #ccc; margin:
section {
margin: 3px 0;
}
section p {
section a {
position: relative;
display: block;
margin: 0 5%;
}

@@ -142,10 +143,10 @@ hr { display: block; height: 1px; border: 0; border-top: 1px solid #ccc; margin:

.button::-moz-focus-inner { padding: 0; border: 0; }

section p:first-child {
section a:first-child {
border-radius: .2em .2em 0 0;
}
section p + .button {
section a + .button {
margin-top: -1px;
border-radius: 0 0 .2em .2em;
}
@@ -216,18 +217,18 @@ hr { display: block; height: 1px; border: 0; border-top: 1px solid #ccc; margin:
display: -o-box;
display: box;
}
section p {
section a {
-webkit-box-flex: 1;
-moz-box-flex: 1;
-ms-box-flex: 1;
-o-box-flex: 1;
box-flex: 1;
margin: 0;
}
section p:first-child {
section a:first-child {
border-radius: .2em 0 0 .2em;
}
section p + .button {
section a + .button {
margin: 0 0 0 -1px;
border-radius: 0 .2em .2em 0 ;
}
@@ -20,18 +20,18 @@ <h2>The current version is <span>1.7.1</span></h2>

<div id="libs">
<section class="jquery">
<p class="full button" data-url="http://ajax.googleapis.com/ajax/libs/jquery/%current%/jquery.js">jQuery CDN - Full</p>
<p class="min button" data-url="http://ajax.googleapis.com/ajax/libs/jquery/%current%/jquery.min.js">jQuery CDN - Minimized</p>
<a href="http://ajax.googleapis.com/ajax/libs/jquery/%current%/jquery.js" class="full button">jQuery CDN - Full</a>
<a href="http://ajax.googleapis.com/ajax/libs/jquery/%current%/jquery.min.js" class="min button">jQuery CDN - Minimized</a>
</section>

<section class="google">
<p class="full button" data-url="http://code.jquery.com/jquery-%current%.js">Google CDN - Full</p>
<p class="min button" data-url="http://code.jquery.com/jquery-%current%.min.js">Google CDN - Minimized</p>
<a href="http://code.jquery.com/jquery-%current%.min.js" class="full button">Google CDN - Full</a>
<a href="http://code.jquery.com/jquery-%current%.min.js" class="min button">Google CDN - Minimized</a>
</section>

<section class="ms">
<p class="full button" data-url="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-%current%.js">Microsoft CDN - Full</p>
<p class="min button" data-url="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-%current%.min.js">Microsoft CDN - Minimized</p>
<a href="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-%current%.js" class="full button">Microsoft CDN - Full</a>
<a href="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-%current%.min.js" class="min button">Microsoft CDN - Minimized</a>
</section>
</div>

@@ -109,18 +109,20 @@ <h2>The current version is <span>1.7.1</span></h2>
// Test the given CDNs
function runTests() {
$('#libs p').each(function() {
$(this).loadTest(
this.getAttribute('data-url').replace(/%current%/g, current)
);
$('#libs a').each(function() {
$(this)
.attr('href', this.getAttribute('href').replace(/%current%/g, current) )
.loadTest(
this.getAttribute('href')
);
});
}
runTests();
// Run tests again
$('.refresh a').click( function() {
$('section p').removeClass('yep nope');
$('section a').removeClass('yep nope');
runTests();
});

0 comments on commit 145a150

Please sign in to comment.
You can’t perform that action at this time.