Top 10 school districts with the most homeless students in the state
';
document.querySelector('#copytext').value = textContent;
modal.showModal();
});
// Modal close functionality
const modal = document.querySelector('.republish-modal');
const closeBtn = document.querySelector('.republish-modal-close');
// Close button click
closeBtn.addEventListener('click', function() {
modal.close();
});
// Close on backdrop click
modal.addEventListener('click', function(e) {
if (e.target === modal) {
modal.close();
}
});
// Close on ESC key (this is usually built-in, but adding for safety)
modal.addEventListener('keydown', function(e) {
if (e.key === 'Escape') {
modal.close();
}
});
// Copy text button functionality
document.querySelector('.copy-text-button').addEventListener('click', async function() {
const textarea = document.querySelector('#copytext');
const text = textarea.value;
try {
// Try modern Clipboard API first
if (navigator.clipboard && window.isSecureContext) {
await navigator.clipboard.writeText(text);
this.textContent = 'Copied!';
} else {
// Fallback for older browsers
textarea.select();
document.execCommand('copy');
this.textContent = 'Copied!';
}
// Reset button text after 2 seconds
setTimeout(() => {
this.textContent = 'Copy text';
}, 2000);
} catch (err) {
console.error('Failed to copy text: ', err);
// Fallback to selection if copying fails
textarea.select();
this.textContent = 'Text selected';
setTimeout(() => {
this.textContent = 'Copy text';
}, 2000);
}
});
});
TOP 10 DISTRICTS WITH MOST HOMELESS STUDENTS IN STATE 2009-2010 (plus percent change compared with 2006-2007)
1. Tacoma School District—1194, up 17 percent
2. Seattle Public Schools – 1139, up 27 percent
3. Spokane Schools -- 856, down 5 percent
4. Everett School District -- 630, down 22 percent
5. Wenatchee School District – 621, up 29 percent
6. Highline School District – 597, up 21 percent
7. Olympia School District – 457, up 61 percent
8. Bellingham School District – 451, up 80 percent
9. Evergreen School District (Clark) – 448, up 104 percent
10.Vancouver School District -- 391, up 3 percent