Is there a method that I can call that will automatically open the jwbox on page load?
Is there a method that I can call that will automatically open the jwbox on page load?
Unfortunately not - JW Box wasn't designed to be open on startup. You can always modify the source code (http://www.longtailvideo.com/jw/js/jquery.jwbox.js) to work however you like.
Yes there is.
<body onLoad="$.jwbox.toggle();$('.jwbox_content').jwbox.toggle(); return false;">
It will open the movie from jwbox_content. So you have that on the page.
Make sure you disable this on all other pages
Although the above practice(s) still work, they have fallen out of favor.
The standard of unobtrusive JavaScript dictates that not only should JavaScript be removed from the document structure (i.e., not use HTML event handler attributes) but should also not obtrude on (have to commingle with) other code.
A much better and effective method is to use the AddLoadEvent Functions
This is a much better approach
function addLoadEvent(func) {
var oldonload = window.onload;
if (typeof window.onload != 'function') {
window.onload = func;
} else {
window.onload = function() {
if (oldonload) {
oldonload();
}
func();
}
}
}
Come on guys... I really need some help on this one.
If there's no function is there a hack or work around that would accomplish the same functionality?