A simple javascript utility library to include partial html (iframe alternate) without a framework or jQuery.

Overview

alt-iframe

A simple javascript utility library to include partial html (iframe alternate) without a framework or jQuery.

<!doctype html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Single HTML Page</title>
</head>
<body>
  ...
  ...
  <!-- use [src] attribute to load a partial html inside the tag -->
  <div src="partial-html-files/header.html"></div>
  ...
  ...
  <!-- use [replace] attribute along with [src] attribute to replace the tag with partial html content -->
  <br src="partial-html-files/footer.html" replace >
  ...
  ...
  ...
  <!-- use [href] and [target] attribute with values starting with # to load [href] content on [target] element -->
  <a href="#partial-html-files/profile.html" target="#targetContainer">Profile</a>
  ...
  <button href="#partial-html-files/profile.html" target="#targetContainer">Profile</button>
  ...
  ...
  ...
  <script src="https://cdn.jsdelivr.net/gh/frontendneo/alt-iframe/dist/es5/alt-iframe.min.js"></script>

</body>
</html>
You might also like...

A MagicMirror² module which embeds multiple other websites with iframe or webview

A MagicMirror² module which embeds multiple other websites with iframe or webview

MMM-EmbedURL This is a MagicMirror² module which embeds other websites either by "iframe" (default), "webview" or a custom HTML-element to your mirror

Dec 18, 2022

A small javascript DOM manipulation library based on Jquery's syntax. Acts as a small utility library with the most common functions.

Quantdom JS Quantdom is a very small (about 600 bytes when ran through terser & gzipped) dom danipulation library that uuses a Jquery like syntax and

Aug 16, 2022

A utility for creating toggleable items with JavaScript. Inspired by bootstrap's toggle utility. Implemented in vanillaJS in a functional style.

LUX TOGGLE Demo: https://jesschampion.github.io/lux-toggle/ A utility for creating toggleable dom elements with JavaScript. Inspired by bootstrap's to

Oct 3, 2020

A simple Node.js code to get unlimited instagram public pictures by every user without api, without credentials.

A simple Node.js code to get unlimited instagram public pictures by every user without api, without credentials.

Instagram Without APIs Instagram Scraping in August 2022, no credentials required This is a Node.js library, are you looking for the same in PHP? go t

Dec 29, 2022

Calculating Pi number without limitation until 10k digits or more in your browser powered by JS without any third party library!

Calculating Pi number without limitation until 10k digits or more in your browser powered by JS without any third party library!

PI Calculator Web JS (Online) Calculating Pi number without limitation until 10k digits or more in your browser powered by JS without any third party

Jul 27, 2022

A tiny, plugin extendable JavaScript utility library with a JQuery-like syntax.

A tiny, plugin extendable JavaScript utility library with a JQuery-like syntax.

Tiny Friggin' Utility Zapper What is it? A tiny ~7kb extendable JavaScript utility library with a JQuery like syntax for getting work done fast! If yo

Jun 25, 2022

Turn an HTML input box to a duration picker, without jQuery

html-duration-picker.js html-duration-picker.js is a very tiny JS library used for transforming a native HTML text input into a duration picker. The a

Oct 19, 2022

An npm package with Tailwind CSS utility classes for creating responsive grid columns without media queries using auto fit.

Grid Auto Fit for Tailwind CSS A plugin that helps you create a responsive grid layout in Tailwind CSS without using media queries. It uses the auto-f

Dec 28, 2022

Javascript library for switching fixed elements on scroll through sections. Like Midnight.js, but without jQuery

Library for Switching Fixed Elements on Scroll Sometimes designers create complex logic and fix parts of the interface. Also they colour page sections

Sep 19, 2022
Comments
  • Issues related to Boostrap 5 navbar-dropdown?

    Issues related to Boostrap 5 navbar-dropdown?

    Are there any known issues relating to bootstrap 5 navbar? When I include alt-iframe at the bottom of my html page it will sometimes have the implication that the page's bootstrap navbar-dropdown does not drop-down (similarly, in the code below, if I comment out the inclusion of the alt-iframe lib on the problematic pages, then the dropdown works again). You can see that at this page: https://uppernyack150.netlify.app/index.html , wherein the "Exhibits" dropdown does not work. Yet the same code approach on this page works: https://uppernyack150.netlify.app/gallery.html . At the top of the index.html page I use a bootstrap 5 navbar (snippet below):

           <nav class="navbar navbar-expand-lg navbar-dark bg-dark">
                <div class="container">
                    <a class="navbar-brand" href="#"><img id="img_logo_goose" src="img/goose1.png" data-bs-toggle="offcanvas" href="#offcanvas_goose" role="button" >&nbsp;Upper Nyack 150</a>
                    <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation"><span class="navbar-toggler-icon"></span></button>
                    <div class="collapse navbar-collapse" id="navbarSupportedContent">
                        <ul class="navbar-nav ms-auto mb-2 mb-lg-0">
                            <li class="nav-item"><a class="nav-link active" aria-current="page" href="index.html">Home</a></li>
                            <!-- <li class="nav-item"><a class="nav-link" href="kickoff.html">Kickoff</a></li> -->
                            <li class="nav-item"><a class="nav-link" href="events.html">Events</a></li>
                            <li class="nav-item dropdown active">
                                <a class="nav-link dropdown-toggle" href="#" id="drop1" role="button" data-bs-toggle="dropdown" aria-expanded="false">
                                  Exhibits/History
                                </a>
                                <ul class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
                                  <li><a class="dropdown-item" href="history.html">History & Links</a></li>
                                  <li><a class="dropdown-item" href="map.html">Upper Nyack History Map</a></li>
    

    and at the bottom of the page the last thing i'm doing is including alt-iframe like this:

            </div><!-- container -->
            <div src="/modals/offcanvas_goose.html" replace></div> <!-- div gets replaced by the source -->
            <!-- Bootstrap core JS-->
            <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script>
            <script src="js/alt-iframe.min.js"></script> <!-- put last - loads and replaces html tags with new content -->
    </body>
    </html>
    

    The included html (meant to replace the div) is simply a modal div, or in another case, an off canvas div, nothing special.

    opened by bfalchuk 3
Releases(v1.9.2)
This is a library to alternate and self-host the Prisma Data Proxy (cloud.prisma.io)

Alternative Prisma Data Proxy This is a library to alternate and self-host the Prisma Data Proxy (cloud.prisma.io). In order to deploy your project to

AijiUejima 60 Dec 28, 2022
no-comma is a javascript library for dealing with inputted numbers that include commas

no-comma no-comma is a javascript library for dealing with inputted numbers that include commas. Nocomma will allow you to check if the number contain

Fatty 3 Jan 27, 2022
switch Alternate Style Sheets

alternate-stylesheets.js switch Alternate Style Sheets Installation npm $ npm install alternate-stylesheets yarn $ yarn add alternate-stylesheets Usag

sasaplus1 1 Dec 11, 2021
🖼 Simple file-upload utility that shows a preview of the uploaded image. Written in TypeScript. No dependencies. Works well with or without a framework.

file-upload-with-preview ?? Simple file-upload utility that shows a preview of the uploaded image. Written in TypeScript. No dependencies. Works well

John Datserakis 427 Dec 26, 2022
Use real-time computing technology and web technology to build a big data Kanban l to solve the problem. Among them, practical technologies include MySQL, Kafka, Flink, Redis, Flask and Echarts

实时计算(English Version) 运用实时计算技术、Web 技术构建一个大数据看板来解决问题。其中实用技术包括Mysql、Kafka、Flink、Redis、Flask和Echarts 目录 1.问题需求 2.方案分析 3.安装环境 4.环境启动命令和运行代码的方法 5.代码目录结构说明

Serendipity 2 Jan 8, 2022
A lightweight extension to automatically detect and provide verbose warnings for embedded iframe elements in order to protect against Browser-In-The-Browser (BITB) attacks.

Enhanced iFrame Protection - Browser Extension Enhanced iFrame Protection (EIP) is a lightweight extension to automatically detect and provide verbose

odacavo 16 Dec 24, 2022
Trusted timestamps that you can physically include in photos, videos and live streams using QR codes and audible data signals.

QR Date This is the reference implementation for the first version of QR Date, a signed timestamp inside a QR code that you can use to verify the date

QR Date 36 Oct 5, 2022
Multi-chain sniper bot to buy and sell tokens on ETH compatible chains. Features include instant or mempool sniping, rug protection, and sell management.

An open-source defi sniper. defi-sniper is free to download. NEW Community telegram group: https://t.me/+aBLUmP1UnypiNTVh Premium Services Now Availab

spacemonk 6 May 3, 2022
A postMessage bridge to connect to dapps loaded into an iframe.

cardano-dapp-connector-bridge A postMessage bridge to connect to dApps loaded into an iframe. Motivation In April 2022, browser extensions are the onl

Tastenkunst GmbH 15 Oct 11, 2022
iframe and html5 file uploader

Upload iframe and html5 uploader. ⇪ 演示 查看演示,你需要 clone 一份代码: $ git clone git://github.com/aralejs/upload $ cd upload $ npm install $ spm install $ node

aralejs 85 Apr 7, 2022