browserstate / ajaxify

Ajaxify your entire website instantly with this simple drop-in script using the HTML5 History API with History.js and jQuery ScrollTo.
601 stars 94 forks source link

Three questions about ajaxify #24

Open bildlich opened 11 years ago

bildlich commented 11 years ago

I hope this is the right place to ask these questions.

randomobject commented 10 years ago

This may be an old post but for folks stumbling across it. I can answer the first question. If you take a look at the ajaxify.js you see / find the following:

/* Application Specific Variables */
contentSelector = '#container',
$content = $(contentSelector).filter(':first'),
contentNode = $content.get(0),
$menu = $('#menu,#nav,nav:first,.nav:first').filter(':first'),
activeClass = 'current-menu-item',
activeSelector = '.current-menu-item',
menuChildrenSelector = '> li,> ul > li',
completedEventName = 'statechangecomplete',
/* Application Generic Variables */
$window = $(window),
$body = $(document.body),
rootUrl = History.getRootUrl(),
scrollOptions = {
duration: 0,
easing:'swing'
};

Menu container is this line:

$menu = $('#menu,#nav,nav:first,.nav:first').filter(':first'),

and content container is this line;

contentSelector = '#container',

Hope that helps.