SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 235 | Next

Jonathan Snook, Aaron Gustafson, Stuart Langridge, and Dan Webb

"Accelerated DOM Scripting with Ajax, APIs, and Libraries"

Upon opening faq.html, you??™ll notice
that the two libraries and jsTrace files (dom-drag.js and jsTrace.js) have already been
included, as have main.js (containing the source for addDOMLoadEvent() and the trace() function
for jsTrace, which you??™ll see in the next section) and faq.js (where you??™ll be building the
FAQ object):






Close that file and open up faq.js. Here you??™ll find the humble beginnings of the FAQ
object:
var FAQ = {
// open items
open_items: [],
// running processes
processes: [],
// timer wrapper
timer: new Object(),
// what's opening
to_open: null,
CHAPTER 8 n CASE STUDY: FAQ FACELIFT 173
// position we are scrolling to
scrolling_to: null,
/* cache of where we are in the scrolling to keep us from
trying to scroll again at the top or bottom */
scroll_cache: null,
// ----- Initialization
initialize: function(){
// startup stuff
},
// ----- Open/Close/Complete
open: function(){
// opener
},
closeAndGo: function(){
// closer & scroll trigger
},
complete: function( dd ){
// housekeeping
},
// ----- Scrolling stuff
goTo: function(){
// scroll manager
},
/* Based on Travis Beckham's (squidfingers.


Pages:
223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247
druga wojna światowa Free English grammar and study guid hotel jelenia góra Russian bride counter strike 1.6