1/* 2 * 3 * 4 jAlert v.3 5 Made with love by Versatility Werks (http://flwebsites.biz) 6 MIT Licensed 7 * 8 * 9*/ 10;(function($) { 11 12 var $jAlertSelectedOpts = {}; 13 14 if(!Date.now) 15 Date.now = function(){ 16 return +new Date(); 17 }; 18 19 $.fn.jAlert = function(options) { 20 21 var themes = ['default', 'green', 'red', 'black', 'blue','yellow'], 22 sizes = ['xsm', 'sm', 'md', 'lg', 'xlg', 'full'], 23 backgroundColors = ['white', 'black'], 24 styles = [], //array of styles that gets joined together with a space between in a style tag on the jalert div 25 classes = ['animated'], //array of classes that get joined together with a space between on the jalert div 26 backgroundClasses = []; //array of classes that get joined together with a space between on the jalert background div 27 28 /* Block Multiple Instances by running jAlert for each one */ 29 if (this.length > 1){ 30 this.each(function() { 31 $(this).jAlert(options); 32 }); 33 return this; 34 } 35 36 /* Combine user options with default */ 37 options = $.extend({}, $.fn.jAlert.defaults, options); 38 39 /* If they didn't set an id, just create a random one */ 40 if( !options.id ) 41 { 42 var unique = Date.now().toString() + Math.floor(Math.random() * 100000); 43 var alert_id = 'ja_' + unique; 44 } 45 else 46 { 47 var alert_id = options.id; 48 } 49 50 $jAlertSelectedOpts[alert_id] = {}; 51 52 thisAlert = $jAlertSelectedOpts[alert_id]; 53 54 thisAlert.options = options; 55 56 thisAlert.options.id = alert_id; 57 58 thisAlert.instance = false; 59 60 /*if( thisAlert.options.type == 'confirm' ) 61 { 62 if( !thisAlert.options.content ) 63 { 64 thisAlert.options.content = thisAlert.options.confirmQuestion; 65 } 66 67 thisAlert.options.btns = [ 68 { 'text': thisAlert.options.confirmBtnText, 'theme': 'green', 'class': 'confirmBtn', 'closeAlert': true, 'onClick': thisAlert.options.onConfirm }, 69 { 'text': thisAlert.options.denyBtnText, 'theme': 'red', 'class': 'denyBtn', 'closeAlert': true, 'onClick': thisAlert.options.onDeny } 70 ]; 71 72 thisAlert.options.autofocus = thisAlert.options.confirmAutofocus; 73 }*/ 74 75 /* Add theme class */ 76 if( $.inArray(thisAlert.options.theme, themes) == -1 ) 77 { 78 console.log('jAlert Config Error: Invalid theme selection.'); 79 return false; 80 } 81 82 classes.push('ja_'+thisAlert.options.theme); 83 84 /* If they set custom classes */ 85 if( thisAlert.options.class ) 86 { 87 classes.push(thisAlert.options.class); 88 } 89 if( thisAlert.options.classes ) 90 { 91 classes.push(thisAlert.options.classes); 92 } 93 94 /* If no title, add class */ 95 if( !thisAlert.options.title ) 96 { 97 classes.push( 'ja_noTitle' ); 98 } 99 100 /* if it's set and it's not in the array of sizes OR it's an object and it's missing width/height */ 101 if( thisAlert.options.size && ((typeof thisAlert.options.size == 'string' && $.inArray(thisAlert.options.size, sizes) == -1) || (typeof thisAlert.options.size == 'object' && (typeof thisAlert.options.size.width == 'undefined' || typeof thisAlert.options.size.height == 'undefined'))) ) 102 { 103 console.log('jAlert Config Error: Invalid size selection (try a preset or make sure you\'re including height and width in your size object).'); 104 return false; 105 } 106 /* If it's not set, set to md */ 107 else if( !thisAlert.options.size ) 108 { 109 classes.push('ja_sm'); 110 } 111 /* If it's set and it's an object */ 112 else if( typeof thisAlert.options.size == 'object' ) 113 { 114 styles.push('width: '+thisAlert.options.size.width+';'); 115 styles.push('height: '+thisAlert.options.size.height+';'); 116 } 117 /* If it's set and it's not an object */ 118 else 119 { 120 classes.push('ja_'+thisAlert.options.size); 121 } 122 123 /* Add background color class */ 124 if( $.inArray(thisAlert.options.backgroundColor, backgroundColors) == -1 ) 125 { 126 console.log('jAlert Config Error: Invalid background color selection.'); 127 return false; 128 } 129 130 131 backgroundClasses.push('ja_wrap_'+thisAlert.options.backgroundColor); 132 133 /* If there are button(s), then you obviously don't want to hide the div when you alert anywhere or they'll be useless...SAME with autofocus */ 134 if( (typeof thisAlert.options.btns == 'object' || typeof thisAlert.options.btns == 'array') || thisAlert.options.autofocus ){ 135 thisAlert.options.closeOnClick = false; 136 } 137 138 thisAlert.options.onOpen = [ thisAlert.options.onOpen ]; 139 140 var onload = "onload='$.fn.jAlert.mediaLoaded($(this))'", 141 loader = "<div class='ja_loader'>Loading...</div>"; 142 143 /* Creates content */ 144 if( thisAlert.options.image ) 145 { 146 thisAlert.options.content = "<div class='ja_media_wrap'>"+ 147 loader+ 148 "<img src='"+thisAlert.options.image+"' class='ja_img' "+onload+"'"; 149 if( thisAlert.options.imageWidth ) 150 { 151 thisAlert.options.content += " style='width: "+thisAlert.options.imageWidth+"'"; 152 } 153 thisAlert.options.content += ">"+ 154 "</div>"; 155 } 156 else if( thisAlert.options.video ) 157 { 158 thisAlert.options.content = "<div class='ja_media_wrap'>"+ 159 loader+ 160 "<div class='ja_video'>"+ 161 "</div>"+ 162 "</div>"; 163 164 /* Add to the onOpen callbacks array to append the iframe and attach the onload callback in a crossbrowser compatible way (IE is a bizitch). */ 165 thisAlert.options.onOpen.unshift( function(alert){ 166 var iframe = document.createElement("iframe"); 167 iframe.src = thisAlert.options.video; 168 169 if(iframe.addEventListener) 170 { 171 iframe.addEventListener('load', function(){ 172 $.fn.jAlert.mediaLoaded($(this)); 173 }, true) 174 } 175 else if (iframe.attachEvent){ 176 iframe.attachEvent("onload", function(){ 177 $.fn.jAlert.mediaLoaded($(this)); 178 }); 179 } else { 180 iframe.onload = function(){ 181 $.fn.jAlert.mediaLoaded($(this)); 182 }; 183 } 184 185 alert.find('.ja_video').append(iframe); 186 }); 187 188 } 189 else if( thisAlert.options.iframe ) 190 { 191 if( !thisAlert.options.iframeHeight ) 192 { 193 thisAlert.options.iframeHeight = $(window).height() * 0.9+'px'; 194 } 195 196 thisAlert.options.content = "<div class='ja_media_wrap'>"+ 197 loader+ 198 "</div>"; 199 200 /* Add to the onOpen callbacks array to append the iframe and attach the onload callback in a crossbrowser compatible way (IE is a bizitch). */ 201 thisAlert.options.onOpen.unshift( function(alert){ 202 var iframe = document.createElement("iframe"); 203 iframe.src = thisAlert.options.iframe; 204 iframe.height = thisAlert.options.iframeHeight; 205 iframe.className = 'ja_iframe'; 206 207 if(iframe.addEventListener) 208 { 209 iframe.addEventListener('load', function(){ 210 $.fn.jAlert.mediaLoaded($(this)); 211 }, true) 212 } 213 else if (iframe.attachEvent){ 214 iframe.attachEvent("onload", function(){ 215 $.fn.jAlert.mediaLoaded($(this)); 216 }); 217 } else { 218 iframe.onload = function(){ 219 $.fn.jAlert.mediaLoaded($(this)); 220 }; 221 } 222 223 alert.find('.ja_media_wrap').append(iframe); 224 }); 225 226 } 227 else if( thisAlert.options.ajax ) 228 { 229 230 thisAlert.options.content = "<div class='ja_media_wrap'>"+ 231 loader+ 232 "</div>"; 233 234 /* Store as another var */ 235 onAjaxCallbacks = thisAlert.options.onOpen; 236 237 /* Overwrite the onOpen to be the ajax call */ 238 thisAlert.options.onOpen = [function(alert){ 239 $.ajax(thisAlert.options.ajax, { 240 async: true, 241 complete: function(jqXHR, textStatus) 242 { 243 alert.find('.ja_media_wrap').replaceWith(jqXHR.responseText); 244 245 /* Run onOpen callbacks here */ 246 $.each(onAjaxCallbacks, function(index, onAjax){ 247 onAjax(alert); 248 });
249 }, 250 error: function(jqXHR, textStatus, errorThrown) 251 { 252 thisAlert.options.onAjaxFail(alert, 'Error getting content: Code: '+jqXHR.status+ ' : Msg: '+jqXHR.statusText); 253 } 254 }); 255 }]; 256 257 } 258 259 this.centerAlert = function() 260 { 261 262 var viewportHeight = $(window).height(), 263 alertHeight = thisAlert.instance.height(), 264 diff = viewportHeight - alertHeight; 265 266 var top = diff / 2; 267 268 if( top > 200 ) 269 { 270 top = top - 100; 271 } 272 273 if( top <= 0 ) 274 { 275 top = 0; 276 } 277 278 thisAlert.instance.css('margin-top', top+'px'); 279 280 $('body').css('overflow', 'hidden'); 281 282 if( diff > 5 ) 283 { 284 thisAlert.instance.parents('.ja_wrap').css('position', 'fixed'); 285 } 286 else 287 { 288 thisAlert.instance.parents('.ja_wrap').css('position', 'absolute'); 289 290 /* Scroll to alert */ 291 $('html, body').animate({ 292 scrollTop: top - 50 293 }, 200); 294 295 } 296 297 } 298 299 var animateAlert = function(which, thisAlert){ 300 if( which == 'hide' ) 301 { 302 thisAlert.removeClass($jAlertSelectedOpts[thisAlert.attr('id')].options.showAnimation).addClass($jAlertSelectedOpts[thisAlert.attr('id')].options.hideAnimation); 303 } 304 else 305 { 306 thisAlert.centerAlert(); 307 thisAlert.addClass($jAlertSelectedOpts[thisAlert.attr('id')].options.showAnimation).removeClass($jAlertSelectedOpts[thisAlert.attr('id')].options.hideAnimation).show(); 308 } 309 } 310 311 var getBtnHTML = function(btn){ 312 313 if(typeof btn.href == 'undefined'){ btn.href = ''; } 314 if(typeof btn.class == 'undefined'){ btn.class = ''; } 315 if(typeof btn.theme == 'undefined'){ btn.class += ' ja_btn_default'; }else{ btn.class += ' ja_btn_'+btn.theme; } 316 if(typeof btn.text == 'undefined'){ btn.text = ''; } 317 if(typeof btn.id == 'undefined'){ var unique = Date.now().toString() + Math.floor(Math.random() * 100000); btn.id = 'ja_btn_' + unique; } 318 if(typeof btn.target == 'undefined'){ btn.target = '_self'; } 319 if(typeof btn.closeAlert == 'undefined'){ btn.closeAlert = true; } 320 321 /* Attach on click handler */ 322 $('body').on('click', '#'+btn.id, function(e){ 323 324 var button = $(this); 325 326 if( btn.closeAlert ) 327 { 328 button.parents('.jAlert').closeAlert(); 329 } 330 331 var callbackResponse = true; 332 333 if( typeof btn.onClick == 'function' ) 334 { 335 callbackResponse = btn.onClick(e, button); 336 } 337 338 if( !callbackResponse || btn.closeAlert ) 339 { 340 e.preventDefault(); 341 return false; 342 } 343 344 return callbackResponse; 345 346 }); 347 348 return "<a href='"+btn.href+"' id='"+btn.id+"' target='"+btn.target+"' class='ja_btn "+btn.class+"'>"+btn.text+"</a> "; 349 } 350 351 /* Hides an alert and optionally removes it */ 352 this.closeAlert = function(remove, onClose){ 353 354 var alertInstance = $(this); 355 356 if( remove != false ) 357 { 358 remove = true; 359 } 360 361 if(alertInstance.length) 362 { 363 alertInstance.unbind('DOMSubtreeModified'); 364 365 animateAlert('hide', alertInstance); 366 367 window.setTimeout(function() 368 { 369 370 var alertWrap = alertInstance.parents('.ja_wrap'); 371 372 if( remove ) 373 { 374 alertWrap.remove(); 375 } 376 else 377 { 378 alertWrap.hide(); 379 } 380 381 if(typeof onClose == 'function') 382 { 383 onClose(alertInstance); 384 } 385 else if(typeof $jAlertSelectedOpts[alertInstance.attr('id')].options.onClose == 'function') 386 { 387 $jAlertSelectedOpts[alertInstance.attr('id')].options.onClose(alertInstance); 388 } 389 390 if( $('.jAlert').length > 0 ) 391 { 392 $('.jAlert:last').centerAlert(); 393 } 394 else 395 { 396 $('body').css('overflow', 'auto'); 397 } 398 399 }, $jAlertSelectedOpts[alertInstance.attr('id')].options.animationTimeout); 400 401 } 402 403 return this; 404 } 405 406 /* Shows an alert that already exists */ 407 this.showAlert = function(replaceOthers, removeOthers, onOpen, onClose){ 408 409 var alertInstance = $(this); 410 411 if( replaceOthers != false ) 412 { 413 replaceOthers = true; 414 } 415 416 if( removeOthers !== false ) 417 { 418 removeOthers = true; 419 } 420 421 if( replaceOthers ) 422 { 423 $('.jAlert:visible').closeAlert(removeOthers); 424 } 425 426 /* Put this one above the last one by moving to end of dom */ 427 var wrap = alertInstance.parents('.ja_wrap'); 428 429 $('body').append(wrap); 430 431 animateAlert('show', alertInstance); 432 433 if( typeof onClose == 'function' ) 434 { 435 $jAlertSelectedOpts[alertInstance.attr('id')].options.onClose = onClose; 436 } 437 438 window.setTimeout(function(){ 439 440 if(typeof onOpen == 'function') 441 { 442 onOpen(alertInstance); 443 } 444 445 }, $jAlertSelectedOpts[alertInstance.attr('id')].options.animationTimeout); 446 447 } 448
449 /* Adds a new alert to the dom */ 450 var addAlert = function(content){ 451 452 var html = ''; 453 454 html += '<div class="ja_wrap '+backgroundClasses.join(' ')+'">'+ 455 '<div class="jAlert '+classes.join(' ')+ '" style="' +styles.join(' ')+ '" id="' +thisAlert.options.id+ '">'+ 456 '<div>'; 457 458 if( thisAlert.options.closeBtn ) 459 { 460 html += "<div class='closejAlert ja_close"; 461 if( thisAlert.options.closeBtnAlt ) 462 { 463 html += ' ja_close_alt'; 464 } 465 html += "'>X</div>"; //closejAlert has a close handler attached, ja_close is for styling 466 } 467 468 if( thisAlert.options.title ) 469 { 470 html += "<div class='ja_title'><div>"+thisAlert.options.title+"</div></div>"; 471 } 472 473 html += '<div class="ja_body">'+content; 474 475 476 if( thisAlert.options.btns ) 477 { 478 html += '<div class="ja_btn_wrap '; 479 480 if( thisAlert.options.btnBackground ) 481 { 482 html += 'optBack'; 483 } 484 485 html += '">'; 486 } 487 488 if( typeof thisAlert.options.btns[0] == 'object' ) 489 { 490 $.each(thisAlert.options.btns, function(index, btn){ 491 if( typeof btn == 'object' ) 492 { 493 html += getBtnHTML(btn); 494 } 495 }); 496 } 497 else if( typeof thisAlert.options.btns == 'object' ) 498 { 499 html += getBtnHTML(thisAlert.options.btns); 500 } 501 else if( thisAlert.options.btns ) 502 {
503 console.log('jAlert Config Error: Incorrect value for btns (must be object or array of objects): '+thisAlert.options.btns); 504 } 505 506 if( thisAlert.options.btns ) 507 { 508 html += '</div>'; 509 } 510 511 html += '</div>'+ 512 '</div>'+ 513 '</div>'+ 514 '</div>'; 515 516 var alertHTML = $(html); 517 518 if( thisAlert.options.replaceOtherAlerts ) 519 { 520 $('.jAlert:visible').closeAlert(); 521 } 522 523 $('body').append(alertHTML); 524 525 thisAlert.instance = $('#'+thisAlert.options.id); 526 527 animateAlert('show', thisAlert.instance); 528 529 if( thisAlert.options.closeBtn ){ 530 531 thisAlert.instance.on('click', '.closejAlert', function(e){ 532 e.preventDefault(); 533 $(this).parents('.jAlert').closeAlert(); 534 return false; 535 }); 536 537 } 538 539 /* Bind mouseup handler to document if this alert has closeOnClick enabled */ 540 if( thisAlert.options.closeOnClick ){ 541 542 /* Unbind if already exists */ 543 $(document).off('mouseup', $.fn.jAlert.onMouseUp); 544 545 /* Bind mouseup */ 546 $(document).on('mouseup', $.fn.jAlert.onMouseUp); 547 548 } 549 550 /* Bind on keydown handler to document and if esc was pressed, find all visible jAlerts with that close option enabled and close them */ 551 if( thisAlert.options.closeOnEsc ){ 552 553 /* Unbind if already exists */ 554 $(document).off('keydown', $.fn.jAlert.onEscKeyDown); 555 556 /* Bind keydown */ 557 $(document).on('keydown', $.fn.jAlert.onEscKeyDown); 558 559 } 560 561 /* If there are onOpen callbacks, run them. */ 562 if( thisAlert.options.onOpen ) 563 { 564 $.each(thisAlert.options.onOpen, function(index, onOpen){ 565 onOpen(thisAlert.instance); 566 }); 567 } 568 569 /* If the alert has an element that should be focused by default */ 570 if( thisAlert.options.autofocus ) 571 { 572 thisAlert.instance.find(thisAlert.options.autofocus).focus(); 573 } 574 else 575 { 576 thisAlert.instance.focus(); 577 } 578 579 thisAlert.instance.bind("DOMSubtreeModified", function(){ 580 thisAlert.instance.centerAlert(); 581 }); 582 583 return thisAlert.instance; 584 585 }; 586 587 /* Shows an alert based on content type */ 588 this.initialize = function(){ 589 590 if( !thisAlert.options.content && !thisAlert.options.image && !thisAlert.options.video && !thisAlert.options.iframe && !thisAlert.options.ajax ) 591 { 592 console.log('jAlert potential error: No content defined'); 593 return addAlert(''); 594 } 595 else 596 { 597 if( !thisAlert.options.content ) 598 { 599 thisAlert.options.content = ''; 600 } 601 return addAlert(thisAlert.options.content); 602 } 603 604 } 605 606 this.initialize(); 607 608 return this; 609 610 /* END OF PLUGIN */ 611 }; 612 613 /* Default thisAlert.options */ 614 $.fn.jAlert.defaults = { 615 'title': false, //title for the popup (false = don't show) 616 'content': false, //html for the popup (replaced if you use image, ajax, or iframe) 617 'image': false, //adds a centered img tag 618 'imageWidth': 'auto', //defaults to max-width: 100%; width: auto; 619 'video': false, //adds a responsive iframe video - value is the "src" of the iframe 620 'ajax': false, //uses ajax call to get contents 621 'onAjaxFail': function(alert, errorThrown){ //callback for when ajax fails 622 thisAlert.closeAlert(); 623 errorAlert(errorThrown); 624 }, 625 'iframe': false, //uses iframe as content 626 'iframeHeight': false, //string. height of the iframe within the popup (false = 90% of viewport height) 627 'class': '', //adds a class to the jAlert (add as many as you want space delimited) 628 'classes': '', //add classes to the jAlert (space delimited) 629 'id': false, //adds an ID to the jAlert 630 'showAnimation': 'fadeInUp', 631 'hideAnimation': 'fadeOutDown', 632 'animationTimeout': 600, //approx duration of animation to wait until onClose 633 'theme': 'default', // red, green, blue, black, default 634 'backgroundColor': 'black', //white, black 635 'size': false, //false = css default, xsm, sm, md, lg, xlg, full, { height: 200, width: 200 } 636 'replaceOtherAlerts': false, //if there's already an open jAlert, remove it first
637 'closeOnClick': false, //close the alert when you click anywhere 638 'closeOnEsc': true, //close the alert when you click the escape key 639 'closeBtn': true, //adds a button to the top right of the alert that allows you to close it 640 'closeBtnAlt': false, //alternative close button 641 'btns': false, //adds buttons to the popup at the bottom. Pass an object for a single button, or an object of objects for many 642 /* 643 Variety of buttons you could create (also, an example of how to pass the object 644 645 'btns': [ 646 {'text':'Open in new window', 'closeAlert':false, 'href': 'http://google.com', 'target':'_new'}, 647 {'text':'Cool, close this alert', 'theme': 'blue', 'closeAlert':true}, 648 {'text':'Buy Now', 'closeAlert':true, 'theme': 'green', 'onClick': function(){ console.log('You bought it!'); } }, 649 {'text':'I do not want it', 'closeAlert': true, 'theme': 'red', 'onClick': function(){ console.log('Did not want it'); } }, 650 {'text':'DOA', 'closeAlert': true, 'theme': 'black', 'onClick': function(){ console.log('Dead on arrival'); } } 651 ] 652 */ 653 'btnBackground': true, //adds optional background to btns 654 'autofocus': false, //pass a selector to autofocus on it 655 656 'onOpen': function(alert){ //on open call back. Fires just after the alert has finished rendering 657 return false; 658 }, 659 'onClose': function(alert){ //fires when you close the alert 660 return false; 661 }, 662 663 'type': 'modal', //modal, confirm, tooltip 664 665 /* The following only applies when type == 'confirm' */ 666 'confirmQuestion': 'Are you sure?', 667 'confirmBtnText': 'Yes', 668 'denyBtnText': 'No', 669 'confirmAutofocus': '.confirmBtn', //confirmBtn or denyBtn 670 'onConfirm': function(e, btn){ 671 e.preventDefault(); 672 console.log('confirmed'); 673 return false; 674 }, 675 'onDeny': function(e, btn){ 676 e.preventDefault(); 677 //console.log('denied'); 678 return false; 679 } 680 } 681 682 /* Mouseup on document */ 683 $.fn.jAlert.onMouseUp = function(e){ 684 685 /* Find top visible jAlert and see if it has closeOnClick enabled */ 686 var lastVisibleAlert = $('.jAlert:visible:last'); 687 688 if( $jAlertSelectedOpts[lastVisibleAlert.attr('id')].options.closeOnClick ) 689 { 690 lastVisibleAlert.closeAlert(); 691 } 692 693 }; 694 695 /* Keydown on document (escape key) */ 696 $.fn.jAlert.onEscKeyDown = function(e){ 697 698 /* Escape = 27 */ 699 if(e.keyCode === 27){ 700 701 /* Find top visible jAlert and see if it has closeOnClick enabled */ 702 var lastVisibleAlert = $('.jAlert:visible:last'); 703 704 if( $jAlertSelectedOpts[lastVisibleAlert.attr('id')].options.closeOnEsc ) 705 { 706 lastVisibleAlert.closeAlert(); 707 } 708 709 } 710 711 }; 712 713 /* If you're not using the DOM (aka, you're not hiding or showing a specific alert, you can just use $.jAlert */ 714 $.jAlert = function(options){ 715 return $.fn.jAlert(options); 716 } 717 718 /* Alert on click function - attach to existing dom */ 719 $.fn.alertOnClick = function(options) 720 { 721 $(this).on('click', function(e){ 722 e.preventDefault(); 723 $.jAlert(options); 724 return false; 725 }); 726 } 727 728 /* Alert on click function - global, works for changing dom */ 729 $.alertOnClick = function(selector, options) 730 { 731 $('body').on('click', selector, function(e){ 732 e.preventDefault(); 733 $.jAlert(options); 734 return false; 735 }); 736 } 737 738 /* Slowed window resize function */ 739 var $jAlertResizeTimeout; 740 $(window).resize(function () { 741 window.clearTimeout($jAlertResizeTimeout); 742 $jAlertResizeTimeout = window.setTimeout(function(){ 743 $('.jAlert:visible').each(function(){ 744 $(this).centerAlert(); 745 }); 746 }, 200); 747 }); 748 749 /* Onload callback for iframe, img, etc */ 750 $.fn.jAlert.mediaLoaded = function(elem){ 751 var wrap = elem.parents('.ja_media_wrap'), 752 vid_wrap = wrap.find('.ja_video'); 753 754 wrap.find('.ja_loader').remove(); 755 756 if( vid_wrap.length > 0 ) 757 { 758 vid_wrap.fadeIn('fast'); 759 } 760 else 761 { 762 elem.fadeIn('fast'); 763 } 764 765 elem.parents('.jAlert').centerAlert(); 766 767 } 768 769/* END OF ON JQUERY LOAD */ 770})(jQuery);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.