Design for a halfopaque card on background
A Pen by Nico Brünjes on CodePen.
Design for a halfopaque card on background
A Pen by Nico Brünjes on CodePen.
Design for a halfopaque card on background
A Pen by Nico Brünjes on CodePen.
| function isInViewport(element) { | |
| var rect = element.getBoundingClientRect(); | |
| var html = document.documentElement; | |
| return ( | |
| rect.top >= 0 && | |
| rect.left >= 0 && | |
| rect.bottom <= (window.innerHeight || html.clientHeight) && | |
| rect.right <= (window.innerWidth || html.clientWidth) | |
| ); | |
| } |
| // Select all links | |
| var links = document.querySelectorAll("a"); | |
| // For each link element | |
| [].forEach.call(links, function(el) { | |
| // Add event listener | |
| el.addEventListener("click", function(event) { | |
| event.preventDefault(); | |
| alert("You clicked"); |
Use network_home_url( $path = '', $scheme = null ).
You can see it in /wp-includes/link-template.php.
Examples:
// Root of main site
$network_home = network_home_url();
// About page on main site
$network_about = network_home_url( 'about/' );
| old_page = browser.find_element_by_tag_name('html') | |
| browser.find_element_by_link_text('my link').click() | |
| try: | |
| WebDriverWait(driver, 20).until( | |
| expected_conditions.staleness_of(old_page)) | |
| assert True | |
| except TimeoutException: | |
| assert False |
| <svg class="svg-symbol" role="img" aria-labelledby="title-suche" viewBox="0 0 16 16" width="16" height="16" preserveAspectRatio="xMinYMin meet"> | |
| <title id="title-suche">Suche</title> | |
| <path d="M15.32 13.34l-4.17-4.203a5.62 5.62 0 0 0 .835-2.944C11.985 3.076 9.45.54 6.332.54S.68 3.076.68 6.193s2.536 5.653 5.653 5.653c.95 0 1.844-.238 2.63-.653L13.2 15.46l2.12-2.12zM2.68 6.19c0-2.014 1.64-3.652 3.653-3.652s3.653 1.64 3.653 3.652c0 2.015-1.64 3.653-3.653 3.653S2.68 8.207 2.68 6.192z"/> | |
| </svg> |
| var clamp = function (n, min, max) { | |
| return Math.max(min, Math.min(max, n)); | |
| }; |
| +keyframes(smoothPulse) | |
| to | |
| background-color: rgba(#eee, 0.6) |