1// Track internal Ingeniux redirects before navigation; the target may be a page or file. 2(function () { 3 if (window.__naspXmlTrackingInstalled) return; 4 window.__naspXmlTrackingInstalled = true; 5 6 document.addEventListener("click", function (event) { 7 try { 8 var link = event.target; 9 while (link && link.nodeType !== 1) link = link.parentNode; 10 while (link && link.tagName.toLowerCase() !== "a") link = link.parentElement; 11 if (!link || !link.getAttribute("href")) return; 12 13 var url = new URL(link.getAttribute("href"), document.baseURI); 14 if (!/^https?:$/.test(url.protocol) || url.hostname !== window.location.hostname) return; 15 var match = /^\/x(\d+)\.xml$/i.exec(url.pathname); 16 if (!match || typeof window.gtag !== "function") return; 17 18 window.gtag("event", "xml_link_click", { 19 link_id: "x" + match[1], 20 link_url: url.origin + url.pathname, 21 link_text: (link.textContent || "").trim().slice(0, 100), 22 transport_type: "beacon" 23 }); 24 } catch (e) { 25 // Analytics must never interrupt navigation. 26 } 27 }, true); 28})(); 29 30// ---------------------------------------------------- 31// SEO / Google Branding Fixes (runs early, no jQuery) 32// ---------------------------------------------------- 33(function () { 34 try { 35 var head = document.getElementsByTagName("head")[0]; 36 if (!head) return; 37 38 var hostname = (location.hostname || "").toLowerCase(); 39 if (hostname.indexOf("nasponline.org") === -1) return; 40 41 // If already injected, stop 42 if (!document.getElementById("schema-website-nasp")) { 43 var websiteSchema = document.createElement("script"); 44 websiteSchema.type = "application/ld+json"; 45 websiteSchema.id = "schema-website-nasp"; 46 websiteSchema.text = JSON.stringify({ 47 "@context": "https://schema.org", 48 "@type": "WebSite", 49 "name": "National Association of School Psychologists (NASP)", 50 "alternateName": "NASP", 51 "url": "https://www.nasponline.org/" 52 }); 53 head.appendChild(websiteSchema); 54 } 55 56 if (!document.getElementById("schema-org-nasp")) { 57 var orgSchema = document.createElement("script"); 58 orgSchema.type = "application/ld+json"; 59 orgSchema.id = "schema-org-nasp"; 60 orgSchema.text = JSON.stringify({ 61 "@context": "https://schema.org", 62 "@type": "Organization", 63 "name": "National Association of School Psychologists", 64 "alternateName": "NASP", 65 "url": "https://www.nasponline.org/", 66 "logo": "https://www.nasponline.org/assets/images/Logos/NASP-logo_RGB.png" 67 }); 68 head.appendChild(orgSchema); 69 } 70 } catch (e) { } 71})(); 72 73(function () { 74 try { 75 var t = (document.title || "").trim().toLowerCase(); 76 if (t && t !== "untitled" && t !== "untitled document") return; 77 78 var h1 = document.querySelector("h1"); 79 if (!h1) return; 80 81 var h1Text = (h1.textContent || "").trim(); 82 if (!h1Text) return; 83 84 document.title = h1Text + " | NASP"; 85 } catch (e) { } 86})(); 87 88// ---------------------------------------------------- 89// Global Website Alert 90// ---------------------------------------------------- 91document.addEventListener("DOMContentLoaded", function () { 92 try { 93 var showWebsiteAlert = false; 94 95 if (!showWebsiteAlert) return; 96 97 if (document.getElementById("nasp-global-alert")) return; 98 99 var alert = document.createElement("div"); 100 alert.id = "nasp-global-alert"; 101 alert.setAttribute("role", "alert"); 102 103 alert.style.background = "#f8d7da"; 104 alert.style.border = "1px solid #f5c2c7"; 105 alert.style.color = "#842029"; 106 alert.style.padding = "14px 18px"; 107 alert.style.margin = "0 0 20px 0"; 108 alert.style.fontSize = "16px"; 109 alert.style.lineHeight = "1.5"; 110 111 alert.innerHTML = 112 "<strong>Website Notice:</strong> " + 113 "Some pages on our website may currently display an error message. " + 114 "We are aware of the issue and are working to resolve it as quickly as possible. " + 115 "Thank you for your patience."; 116 117 var header = document.querySelector("header.page-header"); 118 119 if (header) { 120 header.appendChild(alert); 121 } else { 122 document.body.insertBefore(alert, document.body.firstChild); 123 } 124 } catch (e) { } 125}); 126 127document.addEventListener("DOMContentLoaded", function () { 128 if (typeof jQuery === "undefined") { 129 console.log("Anchor tracking not loaded: jQuery is unavailable"); 130 return; 131 } 132 133 jQuery(document).on("click", "a[href*='#']", function () { 134 var href = jQuery(this).attr("href"); 135 var label = jQuery.trim(jQuery(this).text()); 136 137 console.log("Anchor clicked:", href, label); 138 139 if (typeof gtag === "function") { 140 gtag("event", "anchor_navigation", { 141 link_text: label, 142 anchor_target: href, 143 page_path: window.location.pathname, 144 page_title: document.title, 145 debug_mode: true 146 }); 147 } else { 148 console.log("gtag is not available"); 149 } 150 });
151}); 152 153//manage-your-account 154if (window.location.href.indexOf("membership-and-community/manage-your-account") > -1) { 155 156 var myAccountRow = $('.my-account-grid + .row'); 157 myAccountRow.addClass('my-account-row'); 158 myAccountRow.removeClass('row'); 159 160 $('.my-account-grid + .my-account-row:first').addClass('first'); 161 $('.my-account-row.first').insertBefore('.grid-unit.grid-unit-1-2-m.my-account-grid:first').show(); 162 163 //$('#payment_history').addClass('grid-unit-1-2-m'); 164 //$('#email_sub').addClass('grid-unit-1-2-m'); 165 //$('#elec_prod').addClass('grid-unit-1-2-m'); 166 167 //$('#payment_history').removeClass('grid-unit-1-3-m'); 168 //$('#email_sub').removeClass('grid-unit-1-3-m'); 169 //$('#elec_prod').removeClass('grid-unit-1-3-m'); 170 171 $('h2:contains("NCSP Information")').closest('.alert-light').addClass('account-info-ncsp'); 172 var myNCSPRow = $('.alert-light .account-info-ncsp'); 173 myNCSPRow.removeClass('account-info-ncsp'); 174 175 var maxacctgrid = 0; 176 $(".alert.alert-secondary.sub-cube").each(function () { 177 if ($(this).height() > maxacctgrid) { maxacctgrid = $(this).height(); } 178 }); 179 $(".alert.alert-secondary.sub-cube").height(maxacctgrid); 180 181 var maxacctgrid2 = 0; 182 $(".alert.alert-secondary.sub-cube .intro-text").each(function () { 183 if ($(this).height() > maxacctgrid2) { maxacctgrid2 = $(this).height(); } 184 }); 185 $(".alert.alert-secondary.sub-cube .intro-text").height(maxacctgrid2); 186 187 var maxshowpride = 0; 188 $(".account-info-show-your-pride").each(function () { 189 if ($(this).height() > maxshowpride) { maxshowpride = $(this).height(); } 190 }); 191 $(".account-info-show-your-pride").height(maxshowpride); 192 193 var maxbooksproducts = 0; 194 $(".books-products").each(function () { 195 if ($(this).height() > maxbooksproducts) { maxbooksproducts = $(this).height(); } 196 }); 197 198 199 //$(".books-products").height(maxbooksproducts); 200 201 var row_str2 = '<iframe id="ifrm" class="ad-container" src="https://apps.nasponline.org/resources-and-publications/books-and-products/products/N1818/hhframe2.aspx" scrolling="no" style="width:100%;border:0;"></iframe>'; 202 //var row_str2_contents = row_str2.contentDocument.body.innerHTML; 203 //$('#electronic_products').addClass("alert alert-secondary"); 204 $('#electronic_products').html(row_str2); 205 206 var adContainer = $('#ifrm'); 207 var adContainer2 = $('#payment_history'); 208 var adContainer3 = $('#email_sub'); 209 var adContainer4 = $('#elec_prod'); 210 211 if (adContainer.contents().find("body").html().trim() === "") { 212 //adContainer.css('display', 'none'); 213 //adContainer4.remove(); 214 //adContainer2.removeClass('grid-unit-1-3-m'); 215 //adContainer2.addClass('grid-unit-1-2-m'); 216 //alert("Test"); 217 //adContainer3.removeClass('grid-unit-1-3-m'); 218 //adContainer3.addClass('grid-unit-1-2-m'); 219 } 220 221 if (adContainer2.html().trim().length === 0) { 222 //adContainer2.css('display', 'none'); 223 //adContainer3.removeClass('grid-unit-1-3-m'); 224 //adContainer3.addClass('grid-unit-1-2-m'); 225 226 //adContainer4.removeClass('grid-unit-1-3-m'); 227 //adContainer4.addClass('grid-unit-1-2-m'); 228 //adContainer4.addClass('grid-unit-1-2-m'); 229 } 230 231 232} 233//if (!window.location.search.includes('nocache') && !sessionStorage.getItem('nocacheApplied')) { 234 // Mark it as applied for this browser session 235 //sessionStorage.setItem('nocacheApplied', 'true'); 236 237 // Redirect once with unique nocache parameter 238 //window.location.href = window.location.href + 239 //(window.location.search ? '&' : '?') + 240 //'nocache=' + new Date().getTime(); 241//} 242 243let elements = document.getElementsByClassName("docType"); 244for (let i = 0; i < elements.length; i++) { 245 elements[i].innerHTML = elements[i].innerHTML.replace("ResearchReport", "RESEARCH REPORT"); 246} 247for (let i = 0; i < elements.length; i++) { 248 elements[i].innerHTML = elements[i].innerHTML.replace("WhitePaper", "WHITE PAPER"); 249} 250// RSS FEED FOR PODCASTS 251if (window.location.href.indexOf("demos/resources/resources-and-publications/resources") > -1 || window.location.href.indexOf("https://www.nasponline.org/demos/resources/resources-and-publications") > -1) { 252 253 var row_str2 = '<div class="iframe-container"><iframe id="ifrm" class="ad-container" src="https://apps.nasponline.org/resources-and-publications/podcasts/rss/top3.aspx" width="100%" scrolling="no" style="width:100%;min-height: 370px;border:0;"></iframe></div>'; 254 $('#podcast_rss').html(row_str2); 255 256} 257 258$(".membersOnly").hover( 259 function (e) { 260 $("body").append('<div class="tooltip">NASP Members Only</div>'); 261 $(".iconTooltip").css({ top: e.pageY + 10, left: e.pageX + 10 }).fadeIn(); 262 }, 263 function () { 264 $(".iconTooltip").remove(); 265 } 266).mousemove(function (e) { 267 $(".tooltip").css({ top: e.pageY + 10, left: e.pageX + 10 }); 268}); 269 270 271if (window.location.href.indexOf("research-and-policy/policy-matters-blog") > -1) { 272 //pager for blog 273 $(function () { 274 $(".list-blog-post ul.item-list").JPaging({ 275 pageSize: 7, 276 startPage: 1 // Ensure it starts from page 1 277 }); 278 });
279 280 $('<div/>').attr({ class: 'searchArea', style: 'width:220px;float:right;margin-top:25px;' }).insertBefore('.list-blog-post ul.item-list'); 281 //$('.searchArea').html('<b>Search:</b> '); 282 $('<input/>').attr({ type: 'text', id: 'searchblog', name: 'search', class: 'text-input' }).appendTo('.searchArea'); 283 $("#searchblog").attr('placeholder', 'Search Title'); 284 285 286 $('<div/>').attr({ class: 'postCount' }).insertBefore('.list-blog-post ul.item-list'); 287 var c = $(".list-blog-post ul.item-list li").length; 288 $(".postCount").append(c + ' posts'); 289 290 $("#searchblog").keyup(function () { 291 // Retrieve the input field text and reset the count to zero 292 var filter = $(this).val(), 293 count = 0; 294 // Loop through the comment list 295 $('.list-blog-post ul.item-list li .blog-title').each(function () { 296 // If the list item does not contain the text phrase fade it out 297 if ($(this).text().search(new RegExp(filter, "i")) < 0) { 298 $(this).parent(".list-blog-post ul.item-list li").hide(); // MY CHANGE 299 // Show the list item if the phrase matches and increase the count by 1 300 } else { 301 $(this).parent(".list-blog-post ul.item-list li").show(); // MY CHANGE 302 count++; 303 } 304 }); 305 }); 306} 307 308 309//Add Favicon to all pages 310var link = document.querySelector("link[rel*='icon']") || document.createElement('link'); 311link.type = 'image/png'; 312link.rel = 'shortcut icon'; 313link.href = 'https://apps.nasponline.org/favicon.ico'; 314document.getElementsByTagName('head')[0].appendChild(link); 315 316$('a[href*="#ctl00_SiteMapPath1_SkipLink"]').remove(); 317$('#ctl00_SiteMapPath1_SkipLink').remove(); 318 319//Adjust Breadcrumbs 320if (window.location.hostname.toLowerCase().indexOf("webdev") > -1 || window.location.hostname.toLowerCase().indexOf("apps.nasponline.org") > -1) { 321 322 $("nav.breadcrumbs a").each(function () { 323 324 if ($(this).text().indexOf('Home') === -1) { 325 $(this).addClass("ancestorBreadcrumb"); 326 var text = $(this).text().replace("> ", ""); 327 $(this).text(text); 328 $('<span class="ancestorSeperator"> > </span>').insertBefore(this); 329 } 330 }); 331 332 $("nav.breadcrumbs span").each(function () { 333 334 if ($(this).text().indexOf('>') !== -1) { 335 //$(this).addClass("ancestorSeperator"); 336 //var text = $(this).text().replace(">", ""); 337 //$(this).text(text); 338 //$('<span class="ancestorSeperator"> > </span>').insertBefore(this); 339 } 340 }); 341 342 $('a[href*="#ctl00_SiteMapPath1_SkipLink"]').remove(); 343 344} else { 345 $("nav.breadcrumbs a").each(function () { 346 347 if ($(this).text().indexOf('Home') === -1) { 348 $(this).addClass("ancestorBreadcrumb"); 349 var text = $(this).text().replace("> ", ""); 350 $(this).text(text); 351 $('<span class="ancestorSeperator"> > </span>').insertBefore(this); 352 } 353 }); 354 355} 356 357$('.infoImg').bind('contextmenu', function (e) { 358 return false; 359}); 360 361//////////////////////// 362// Quicklinks Highlight // 363//////////////////////// 364 365var str = location.href.toLowerCase(); 366$('.bodyQuicklinks ul.item-list li a').each(function () { 367 if (str.indexOf(this.href.toLowerCase()) > -1) { 368 $(this).addClass("qHighlight"); 369 } 370}); 371 372 373//$('.infoCardList ul.item-list li p.abstract').each(function (i, v) { 374// var txt = $(v).text(); 375// if (txt.length > 120) { 376// var shortText = txt.substring(0, 120) + 377// "<span onclick='$(this).hide();$(this).next().toggle();'>" + 378// "..." + 379// "</span>" + 380// "<span style='display:none'> " + 381// txt.substring(100, txt.length) + 382// "</span>"; 383 384// $(v).html(shortText); 385// } 386//}); 387 388//Make .infoCardList divs the same height 389var maxinfoCardListHeight = 0; 390$("div.infoCardList ul.item-list li .colRight .title-4").each(function () { 391 if ($(this).height() > maxinfoCardListHeight) { maxinfoCardListHeight = $(this).height(); } 392}); 393$("div.infoCardList ul.item-list li .colRight .title-4").height(maxinfoCardListHeight); 394 395//Make .resourceCard divs the same height 396var maxresourceCardListHeight = 0; 397$("div.resourceCard ul.item-list li .colRight .abstract").each(function () { 398 if ($(this).height() > maxresourceCardListHeight) { maxresourceCardListHeight = $(this).height(); } 399}); 400$("div.resourceCard ul.item-list li .colRight .abstract").height(maxresourceCardListHeight); 401 402
403//Make .mid-card divs the same height 404var maxmidCardHeight = 0; 405$("div.leaderInformationWrapper").each(function () { 406 if ($(this).height() > maxmidCardHeight) { maxmidCardHeight = $(this).height(); } 407}); 408//$("div.mid-card").height(maxmidCardHeight - 20); 409 410 411$("<span></span>").insertAfter(".infoCardListVideo ul.item-list li .colLeft img"); 412//$("<div class='member-overlay'></div>").insertBefore(".infoCardListVideo ul.item-list li .colLeft img"); 413 414//Main accordion using id 415$('#faqAccordion').find('.accordion-toggle').click(function () { 416 $('.accordion-toggle.active').removeClass('active'); 417 $(this).addClass('active'); 418}); 419 420//New accordion using class 421$('.accordion-container').find('.accordion2-toggle').click(function () { 422 $('.accordion2-toggle.active').removeClass('active'); 423 $(this).addClass('active'); 424}); 425 426//3rd Accordion 427$('.custom-accordion .custom-header').click(function () { 428 if (!$(this).closest('li').hasClass('no-toggle')) { 429 $(this).closest('li').toggleClass('active').siblings('li').removeClass('active'); 430 } 431}); 432 433 434//Add Back to Top to every page 435//############################# 436// Add Back to Top to every page 437//############################# 438$(function () { 439 440 // 1) Insert (only if it doesn't exist already) 441 if ($('.backToTop').length === 0) { 442 443 if ($(".column-primary .formatted").length > 0) { 444 $("<a id='button' title='Back to Top' class='backToTop'></a>") 445 .insertAfter(".column-primary .formatted:first"); 446 447 } else if ($("h1.title-1").length > 0) { 448 $("<a id='button' title='Back to Top' class='backToTop'></a>") 449 .insertAfter("h1.title-1:first"); 450 451 } else { 452 $("<a id='button' title='Back to Top' class='backToTop'></a>") 453 .appendTo("body"); 454 } 455 } 456 457 // 2) Bind behavior AFTER insert 458 var btn = $('.backToTop'); 459 460 $(window).off('scroll.backToTop').on('scroll.backToTop', function () { 461 if ($(window).scrollTop() > 300) { 462 btn.addClass('show'); 463 } else { 464 btn.removeClass('show'); 465 } 466 }); 467 468 btn.off('click.backToTop').on('click.backToTop', function (e) { 469 e.preventDefault(); 470 $('html, body').animate({ scrollTop: 0 }, 300); 471 }); 472 473}); 474//############################# 475 476$('span:contains("(PDF)")').css('font-weight', 'normal'); 477$('span:contains("(PDF)")').css('color', '#444'); 478 479$(document).ready(function () { 480 $('.content-box.margin-large.sidebar-nav-container h2.sidebar-nav-title').text('In This Section'); 481 $('.content-box img:not(.img-left)').css({ 482 width: '100%', 483 height: 'auto' 484 }); 485}); 486 487document.addEventListener('DOMContentLoaded', function () { 488 var links = document.querySelectorAll('a.open-inline[href$=".pdf"]'); 489 490 links.forEach(function (link) { 491 var originalHref = link.getAttribute('href'); 492 493 // Make sure the URL is absolute for Google Viewer 494 var absoluteUrl = new URL(originalHref, window.location.href).href; 495 496 var viewerUrl = 'https://docs.google.com/viewer?url=' + encodeURIComponent(absoluteUrl); 497 link.setAttribute('href', viewerUrl); 498 link.setAttribute('target', '_blank'); // Open in new tab 499 }); 500}); 501 502document.addEventListener('DOMContentLoaded', function () { 503 504 if (window.location.pathname.toLowerCase().indexOf('/about-school-psychology/media-room') === 0) { 505 506 var content = document.querySelector('.column-primary'); 507 508 if (content) { 509 content.classList.add('hide-pdf-label'); 510 } 511 } 512 513}); 514 515$(function () { 516 var href = window.location.href.toLowerCase(); 517 var isLoginPage = href.indexOf("account/login") > -1; 518 var isStorePage = href.indexOf("/books-and-products/products/books/titles/") > -1; 519 var isNCSPApp1 = href.indexOf("/standards-and-certification/approved-application/") > -1; 520 var isNCSPApp2 = href.indexOf("/standards-and-certification/ncsp-application/") > -1; 521 var isResourceOrStore = href.indexOf("/resources-and-publications/") > -1 || isStorePage; 522 523 // ----------------------------------------------------- 524 // 1. Downtime date window (Eastern Time) 525 // -----------------------------------------------------
526 var nowET = new Date(new Date().toLocaleString("en-US", { timeZone: "America/New_York" })); 527 var startET = new Date("2025-07-31T12:00:00-04:00"); // July 31, 12 PM ET 528 var endET = new Date("2025-08-11T11:59:59-04:00"); // Aug 11, 11:59 AM ET 529 var isDowntime = nowET >= startET && nowET <= endET; 530 531 // ----------------------------------------------------- 532 // 2. Alerts 533 // ----------------------------------------------------- 534 if (isNCSPApp2) { 535 //insertAlertAfter("h1.title-1", 536 //"<h2>Notice: NCSP Application Forms Temporarily Unavailable</h2><br><p>We are currently making important updates to the NCSP application forms to ensure they work properly and provide the best possible experience for applicants. While this work is underway, the forms will be temporarily unavailable.</p><br><p>All other parts of our website and application systems are operating as usualâthis only affects the NCSP application forms. Once the updates are complete and the forms are ready, we will post an announcement so you can access them again without interruption.</p><br><p>We understand this may be inconvenient and appreciate your patience as we finish the work needed to bring the forms back online.</p>" 537 //); 538 } 539 540 if (isLoginPage) { 541 var bypass = location.search.indexOf('byp@ss') >= 0; 542 543 if (!bypass) { 544 // Always show the downtime alert on the login page 545 insertAlertAfter(".errorMessage", 546 "<p><strong>Beginning July 31st at noon Eastern through August 11th</strong></p>" + 547 "<p>Our online services will be temporarily unavailable as we perform a planned system upgrade. " + 548 "During this time, you wonât be able to make purchases or update your accountâincluding NCSP renewals, " + 549 "membership updates, or book orders.</p>" + 550 "<br><p>Services will resume sometime on August 11th. We appreciate your patience and understanding.</p>" 551 ); 552 553 // Optional: only disable the login form during downtime window 554 if (isDowntime) { 555 //$(".headerDiv form.login-page-form").remove(); 556 $(".headerDiv2 + .headerDiv").remove(); 557 $(".headerDiv2").remove(); 558 //$("h1.title-1").remove(); 559 //$("#loginWrapper .headerDiv").css("width", "100%"); 560 } 561 } 562 } 563 else if (isDowntime) { 564 // Default main alert for non-login pages 565 insertAlertAfter("h1.title-1", 566 "<p><strong>Beginning July 31st at noon Eastern through August 10th</strong></p>" + 567 "<p>Our online services will be temporarily unavailable as we perform a planned system upgrade. " + 568 "During this time, you wonât be able to make purchases or update your accountâincluding NCSP renewals, " + 569 "membership updates, or book orders.</p>" + 570 "<br><p>Services will resume sometime on August 11th. We appreciate your patience and understanding.</p>" 571 ); 572 573 // Replace with store-specific alert if it's a store/resource page 574 if (isResourceOrStore) { 575 $(".mainAlert").replaceWith(buildStoreAlert()); 576 } 577 } 578 579 // ----------------------------------------------------- 580 // 3. Store button disabling (only during downtime) 581 // ----------------------------------------------------- 582 if (isStorePage && isDowntime) { 583 $('#add').prop('disabled', true) 584 .addClass('disabled') 585 .text('Unavailable'); 586 587 $('a.button.inline.green.margin[href*="/account/Login"]') 588 .addClass('disabled') 589 .css({ 'pointer-events': 'none', 'opacity': '0.5' }) 590 .text('Unavailable') 591 .on('click', function (e) { e.preventDefault(); }); 592 } 593 594 // ----------------------------------------------------- 595 // 4. Cleanup: remove account elements 596 // ----------------------------------------------------- 597 $('#email_sub, #payment_history').remove(); 598 $('.my-account-grid').not(':has(.account-info-ncsp)').find('a').remove(); 599 600 // ----------------------------------------------------- 601 // 5. Helper functions 602 // ----------------------------------------------------- 603 function insertAlertAfter(selector, html) { 604 $("<div class='mainAlert alert alert-danger' style=margin-bottom:20px;>" + 605 "<div style='display:block;margin:0 auto;width:100%;font-size:15px;font-weight:400;" + 606 "padding-left:50px;background-image:url(//apps.nasponline.org/img/icons/danger.png);" + 607 "background-position:0 0;background-repeat:no-repeat;background-size:40px;'>" + 608 html + 609 "</div></div>" 610 ).insertAfter(selector); 611 } 612 613 function buildStoreAlert() { 614 //return "<div class='mainAlert alert alert-danger'>" + 615 "<div style='display:block;margin:0 auto;width:100%;font-size:15px;font-weight:400;" + 616 "padding-left:50px;background-image:url(//apps.nasponline.org/img/icons/danger.png);" + 617 "background-position:0 0;background-repeat:no-repeat;background-size:40px;'>" + 618 "<p style='font-size:17px;'><strong>NASP Store Offline July 31–August 10</strong></p><br><p>The NASP online store will be closed beginning <strong>noon ET on July 31 through August 10</strong>, <strong>with service resuming sometime on August 11</strong>. If you need to initiate an order during this time, please call NASP Publications at 866-331-NASP or 301-657-0270 ext. 500, Monday through Friday, 8:30 a.m. to 5:00 p.m. ET.</p><br><p>School districts may send a purchase order (PO) to <a href='mailto: [email protected]'>[email protected]</a>. A few of our titles are also available in limited stock through <a href='https://www.amazon.com/s?k=Best+Practices+in+School+Psychology&me=A3JE6Y296Q9WTQ&ref=nb_sb_noss' data-uw-rm-brl='PR' data-uw-original-href='https://www.amazon.com/s?k=Best+Practices+in+School+Psychology&me=A3JE6Y296Q9WTQ&ref=nb_sb_noss'>the ARI Store</a>. The ARI Store cannot offer member pricing, so call us for the lowest possible rate.</p>" + 619 "</div></div>"; 620 } 621}); 622 623var elemPhD = $('.cqArticle hr ~ p span[style="font-variant: small-caps;"]'); 624//elemPhD.text(elemPhD.text().replace("phd", "PhD")); 625 626var elemNCSP = $('.cqArticle hr ~ p span[style="font-variant: small-caps;"]'); 627//elemNCSP.text(elemNCSP.text().replace("ncsp", "NCSP")); 628 629//$('.cqArticle hr ~ p span[style="font-variant: small-caps;"]:contains("ncsp")').replace("ncsp", "NCSP"); 630 631var wrap = $('strong span[style="font-variant: small-caps;"]'); 632var text = wrap.text(); 633$(wrap).each(function () { 634 //wrap.replaceWith(text); 635}); 636 637var SPRtitle = "School Psychology Review"; 638$('.abstract:contains(' + SPRtitle + ')', document.body).each(function () { 639 console.log(this); 640 $(this).html($(this).html().replace( 641 new RegExp(SPRtitle, 'g'), '<span style=font-style:italic;>' + SPRtitle + '</span>' 642 )); 643}); 644 645if (window.location.href.indexOf("/resources-and-publications/books-and-products") > -1) { 646 647 // Construct URL object using current browser URL 648 var url = new URL(document.location); 649 650 // Get query parameters object 651 var params = url.searchParams; 652 653 // Get value of keywords 654 var keywords = params.get("Keywords"); 655 656 // Set it as the dropdown value 657 $("#ddlfilterTypes").val(keywords); 658 659 //Build an array containing Customer records. 660 var filterTypes = [{ 661 typeValue: "", 662 typeText: "--Filter By--" 663 }, 664 { 665 typeValue: "", 666 typeText: "All" 667 }, 668 { 669 typeValue: "-Digital", 670 typeText: "Print"
671 }, 672 { 673 typeValue: "Digital", 674 typeText: "Digital" 675 } 676 ]; 677 //Create a DropDownList element. 678 var ddlfilterTypes = $("<select id='ddlfilterTypes' class='select-input' onchange='filterFunction()' />"); 679 680 //Add the Options to the DropDownList. 681 $(filterTypes).each(function () { 682 var option = $("<option />"); 683 684 //Set Customer Name in Text part. 685 option.html(this.typeText); 686 687 //Set CustomerId in Value part. 688 option.val(this.typeValue); 689 690 //Add the Option element to DropDownList. 691 ddlfilterTypes.append(option); 692 }); 693 694 //Reference the container DIV. 695 var dvContainer = $("#dvContainer") 696 697 //Add the DropDownList to DIV. 698 var div = $("<div />"); 699 div.append(ddlfilterTypes); 700 701 ddlfilterTypes.insertAfter("button.form-submit"); 702 703 //Add the DIV to the container DIV. 704 dvContainer.append(div); 705 706 $('#ddlfilterTypes').css({ 707 'float': 'right', 708 'width': '100%', 709 'max-width': '395px', 710 'display': 'whiinlinete', 711 'margin': '0 0 0 20px' 712 }) 713 714} 715 716function filterFunction() { 717 var x = document.getElementById("ddlfilterTypes").value; 718 window.location.href = "https://www.nasponline.org/resources-and-publications/books-and-products?AuthorKeyword=&Keywords=" + x; 719} 720 721 722$(function () { 723 $(window).scroll(function () { 724 if ($(this).scrollTop() >= 170) { 725 $('nav.page-nav').addClass('stickytop'); 726 } 727 else { 728 $('nav.page-nav').removeClass('stickytop'); 729 } 730 }); 731}); 732 733if (window.location.href.indexOf("/research-and-policy/policy-matters-blog") > -1) { 734 var $blogPosts = $('.list-blog-post ul.item-list').children('.list-blog-post'); 735 var blogIndex = {}; 736 737 // Build the index 738 $blogPosts.each(function () { 739 var datetimeString = $(this).find('time').attr('datetime'); 740 var date = new Date(datetimeString); 741 var year = date.getFullYear(); 742 var month = date.getMonth() + 1; // getMonth() returns month index (0-11), so add 1 743 var title = $(this).find('.blog-title a').text(); 744 var link = $(this).find('.blog-title a').attr('href'); 745 var content = $(this).find('.content').html(); 746 747 if (!blogIndex[year]) { 748 blogIndex[year] = {}; 749 } 750 if (!blogIndex[year][month]) { 751 blogIndex[year][month] = []; 752 } 753 blogIndex[year][month].push({ 754 title: title, 755 content: content, 756 link: link 757 }); 758 }); 759 760 // Sort the years and months in descending order 761 var sortedYears = Object.keys(blogIndex).sort((a, b) => b - a); 762 var $blogIndex = $('#blogIndex'); 763 764 sortedYears.forEach(year => { 765 var $yearLi = $('<li class="year-section"></li>'); 766 var $yearHeader = $('<div class="year-accordion"></div>').text(year); 767 $yearLi.append($yearHeader); 768 769 var $monthUl = $('<ul></ul>'); 770 var sortedMonths = Object.keys(blogIndex[year]).sort((a, b) => b - a); 771 sortedMonths.forEach(month => { 772 var $monthLi = $('<li class="month-section"></li>'); 773 var monthNames = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "
773November", "December"]; 774 var $monthHeader = $('<div class="month-accordion"></div>').text(monthNames[month - 1]); 775 $monthLi.append($monthHeader); 776 777 var $postUl = $('<ul></ul>'); 778 blogIndex[year][month].forEach(post => { 779 var $postLi = $('<li></li>'); 780 var $title = $('<p class="blog-title"></p>').html('<a href="' + post.link + '">' + post.title + '</a>'); 781 var $content = $('<div class="content"></div>').html(post.content); 782 $postLi.append($title).append($content); 783 $postUl.append($postLi); 784 }); 785 786 $monthLi.append($postUl); 787 $monthUl.append($monthLi); 788 }); 789 790 $yearLi.append($monthUl); 791 $blogIndex.append($yearLi); 792 }); 793 794 // Add accordion functionality 795 $('.year-accordion').click(function () { 796 var $this = $(this); 797 $('.year-accordion').not($this).siblings('ul').slideUp(); 798 $this.siblings('ul').slideToggle(); 799 }); 800 801 $('.month-accordion').click(function () { 802 var $this = $(this); 803 $('.month-accordion').not($this).siblings('ul').slideUp(); 804 $this.siblings('ul').slideToggle(); 805 }); 806 807 // Initialize accordion state - only hide nested uls 808 $('#blogIndex ul').hide(); 809} 810 811if (window.location.href.indexOf("/research-and-policy/policy-matters-blog/index") > -1) { 812 var monthNames = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']; 813 814 var $entries = $('.blog-index ul.item-list').children('.list-blog-post'); 815 var groupedEntries = {}; 816 817 // Group entries by year and month 818 $entries.each(function () { 819 var datetimeString = $(this).find('time').attr('datetime'); 820 var date = new Date(datetimeString); 821 var year = date.getFullYear(); 822 var month = date.getMonth() + 1; // getMonth() returns month index (0-11), so add 1 823 824 if (!groupedEntries[year]) { 825 groupedEntries[year] = {}; 826 } 827 if (!groupedEntries[year][month]) { 828 groupedEntries[year][month] = []; 829 } 830 groupedEntries[year][month].push($(this).clone()); 831 }); 832 833 // Sort years and months in descending order 834 var sortedYears = Object.keys(groupedEntries).sort((a, b) => b - a); 835 var $sortedBlogList = $('#sortedBlogList'); 836 837 sortedYears.forEach(function (year) { 838 var $yearGroup = $('<div class="year-group"></div>'); 839 $yearGroup.append('<div class="year-label">' + year + '</div>'); 840 var sortedMonths = Object.keys(groupedEntries[year]).sort((a, b) => b - a); 841 842 sortedMonths.forEach(function (month) { 843 var $monthGroup = $('<div class="month-group"></div>'); 844 $monthGroup.append('<div class="monthNames margin-small">' + monthNames[month - 1] + '</div>'); 845 846 groupedEntries[year][month].forEach(function ($entry) { 847 var $title = $entry.find('.blog-title'); 848 var $url = $entry.find('.blog-title a'); 849 $monthGroup.append('<p class="blog-title"><a href="' + $url.attr('href') + '" class="blog-url">' + $title.text() + '</a></p>'); 850 $monthGroup.append($entry.find('.blog-content').clone()); 851 }); 852 853 $yearGroup.append($monthGroup); 854 }); 855 856 $sortedBlogList.append($yearGroup); 857 $(".blog-index").hide(); 858 }); 859} 860 861if (window.location.href.indexOf("/research-and-policy/policy-matters-blog/") > -1) { 862 863 $.get('/research-and-policy/policy-matters-blog', function (data) { 864 var fetchedContent = $(data).find('div.list-blog-post').html(); 865 $('#mainList').html(fetchedContent); 866 867 // Append the loaded content to a new div 868 //$('.column-primary').prepend('<div class="list-blog-post">' + fetchedContent + '</div>'); 869 //$('.column-secondary-top .content-box').hide(); 870 }); 871 872 var $blogPosts = $('.list-blog-post ul.item-list').children('.list-blog-post'); 873 var blogIndex = {}; 874 875 // Build the index 876 $blogPosts.each(function () { 877 var datetimeString = $(this).find('time').attr('datetime'); 878 var date = new Date(datetimeString); 879 var year = date.getFullYear();
880 var month = date.getMonth() + 1; // getMonth() returns month index (0-11), so add 1 881 var title = $(this).find('.blog-title a').text(); 882 var link = $(this).find('.blog-title a').attr('href'); 883 var content = $(this).find('.content').html(); 884 885 if (!blogIndex[year]) { 886 blogIndex[year] = {}; 887 } 888 if (!blogIndex[year][month]) { 889 blogIndex[year][month] = []; 890 } 891 blogIndex[year][month].push({ 892 title: title, 893 content: content, 894 link: link 895 }); 896 }); 897 898 // Sort the years and months in descending order 899 var sortedYears = Object.keys(blogIndex).sort((a, b) => b - a); 900 var $blogIndex = $('#blogIndex'); 901 902 sortedYears.forEach(year => { 903 var $yearLi = $('<li class="year-section"></li>'); 904 var $yearHeader = $('<div class="year-accordion"></div>').text(year); 905 $yearLi.append($yearHeader); 906 907 var $monthUl = $('<ul></ul>'); 908 var sortedMonths = Object.keys(blogIndex[year]).sort((a, b) => b - a); 909 sortedMonths.forEach(month => { 910 var $monthLi = $('<li class="month-section"></li>'); 911 var monthNames = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "
911November", "December"]; 912 var $monthHeader = $('<div class="month-accordion"></div>').text(monthNames[month - 1]); 913 $monthLi.append($monthHeader); 914 915 var $postUl = $('<ul></ul>'); 916 blogIndex[year][month].forEach(post => { 917 var $postLi = $('<li></li>'); 918 var $title = $('<p class="blog-title"></p>').html('<a href="' + post.link + '">' + post.title + '</a>'); 919 var $content = $('<div class="content"></div>').html(post.content); 920 $postLi.append($title).append($content); 921 $postUl.append($postLi); 922 }); 923 924 $monthLi.append($postUl); 925 $monthUl.append($monthLi); 926 }); 927 928 $yearLi.append($monthUl); 929 $blogIndex.append($yearLi); 930 }); 931 932 // Add accordion functionality 933 $('.year-accordion').click(function () { 934 var $this = $(this); 935 $('.year-accordion').not($this).siblings('ul').slideUp(); 936 $this.siblings('ul').slideToggle(); 937 }); 938 939 $('.month-accordion').click(function () { 940 var $this = $(this); 941 $('.month-accordion').not($this).siblings('ul').slideUp(); 942 $this.siblings('ul').slideToggle(); 943 }); 944 945 $("div.list-blog-post").hide(); 946 // Initialize accordion state - only hide nested uls 947 $('#blogIndex ul').hide(); 948} 949 950 951//if (window.location.href.indexOf("/professional-development/nasp-annual-convention-x105") > -1) { 952 953// document.addEventListener("DOMContentLoaded", function () { 954// var imgElement = document.getElementById("randomImage"); 955// var linkElement = document.getElementById("randomLink"); 956 957// if (!imgElement || !linkElement) { 958// console.warn("randomImage or randomLink not found"); 959// return; 960// } 961 962// var images = [ 963// { src: "https://www.nasponline.org/assets/images/Annual%20Convention/2025/Spring%20Math_February.jpg", link: "https://www.springmath.org/", title: "SpringMath by Sourcewell - Does your math MTSS need an intervention? Visit us at NASP booth 1013" }, 964// { src: "https://www.nasponline.org/assets/images/Annual%20Convention/2025/MHS_February%20Web%20Ad.png", link: "https://storefront.mhs.com/collections/naglieri-general-ability-tests?utm_source=print_ad&utm_medium=referral&utm_campaign=ed_nasp_2025", title: "" } 965// ]; 966 967// var randomIndex = Math.floor(Math.random() * images.length); 968 969// // Append a timestamp to force fresh image load 970// imgElement.src = images[randomIndex].src + "?v=" + new Date().getTime(); 971// imgElement.title = images[randomIndex].title; 972// linkElement.href = images[randomIndex].link; 973// linkElement.target = "_blank"; 974// }); 975 976 977//}
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.