Skip to content

Instantly share code, notes, and snippets.

for (const item of document.querySelectorAll(".pmHCK")) {
console.log(item.getElementsByTagName("div")[0].dataset.id);
}
$(window).mousemove(function(event) {
var msg = "Handler for .mousemove() called at ";
msg += event.pageX + ", " + event.pageY;
console.log(msg);
});
$(window).resize(function() {
console.log("You resized the window!");
});
$(window).scroll(function() {
console.log("window has scrolled!");
});
<div class="tooltip" data-related="P-Res_Korea" data-gourl="https://www.bam.org/">
<div class="lrholder">
<div class="tt-inner">
<div class="tt-bg">
<img src="img/dancer3.jpg">
<div class="tt-t">
<p class="tt-title">Rennie Harris Puremovement (2012)</p>
<p>Egypt, Israel, Palestinian Territories</p>
</div>
</div>
<div class="tooltip" data-related="P-Res_Korea" data-gourl="https://www.bam.org/">
<div class="lrholder">
<div class="tt-inner">
<div class="tt-bg">
<img src="img/dancer3.jpg">
<div class="tt-t">
<p class="tt-title">Rennie Harris Puremovement (2012)</p>
<p>Egypt, Israel, Palestinian Territories</p>
</div>
</div>
$("*").css("box-sizing","border-box").each(function(){$(this).css("border","1px solid #" + Math.random().toString(16).substr(-6))});
<?php foreach($page->children()->sortBy('alphabetize', 'asc') as $subpage): ?>
<a href="<?php echo $subpage->url(); ?>">
<div class="worktile">
<img src="<?php
if ( !$subpage->featuredimage()->empty() ) {
$img = $subpage->featuredimage()->toFile();
echo $img->resize(600)->url();
} else {
echo $subpage->images()->sortBy('sort', 'asc')->first()->resize(600)->url();
}
/**
* @license
* MyFonts Webfont Build ID 3340581, 2017-02-04T22:38:13-0500
*
* The fonts listed in this notice are subject to the End User License
* Agreement(s) entered into by the website owner. All other parties are
* explicitly restricted from using the Licensed Webfonts(s).
*
* You may obtain a valid license at the URLs below.
*
var monthNames = ["Jan.", "Feb.", "Mar.", "Apr.", "May", "Jun.", "Jul.", "Aug.", "Sep.", "Oct.", "Nov.", "Dec."];
var dayNames = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"];
var theDate = new Date(Date.parse(res.query.results.item[i].pubDate));
var todaysDate = new Date();
var thedateCheck = theDate.getTime();
var todaysdateCheck = todaysDate.getTime();
var month = theDate.getMonth();
var dayName = theDate.getDay();
var dayDay = theDate.getDate();