Skip to content
This repository has been archived by the owner on Apr 24, 2018. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
Reordered js functions according to importance.
  • Loading branch information
yellowled committed Jan 6, 2012
1 parent 1719542 commit cd23a3c
Showing 1 changed file with 22 additions and 22 deletions.
44 changes: 22 additions & 22 deletions js/2k11.js
Expand Up @@ -13,6 +13,28 @@ jQuery(document).ready(function($) {
header: '#banner',
footer: '#colophon'
});
// Cloned primary navigation for small screen
var $select = $('<select/>');
$('#primary-nav li').each(function() {
var $el = $(this);
if ($el.find('span').length) {
$('<option/>', {
'selected': 'selected',
'value' : '',
'text' : $el.text()
}).appendTo($select);
} else {
$('<option/>', {
'value' : $el.find('a').attr('href'),
'text' : $el.text()
}).appendTo($select);
}
});
if($select.children().size() > 0) {
$select.appendTo('#primary-nav').change(function() {
window.location = $(this).find('option:selected').val();
});
}
// Disable trackback + short url links
$('#trackback_url>a,.short-url').click(function() {
var linkMsg = $(this).attr('title');
Expand All @@ -38,26 +60,4 @@ jQuery(document).ready(function($) {
$('#serendipity_replyTo').after(replyToPlaceholder);
});
$('#reply-to-hint, #serendipity_replyTo').addClass('visuallyhidden');
// Cloned primary navigation for small screen
var $select = $('<select/>');
$('#primary-nav li').each(function() {
var $el = $(this);
if ($el.find('span').length) {
$('<option/>', {
'selected': 'selected',
'value' : '',
'text' : $el.text()
}).appendTo($select);
} else {
$('<option/>', {
'value' : $el.find('a').attr('href'),
'text' : $el.text()
}).appendTo($select);
}
});
if($select.children().size() > 0) {
$select.appendTo('#primary-nav').change(function() {
window.location = $(this).find('option:selected').val();
});
}
});

0 comments on commit cd23a3c

Please sign in to comment.