Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7906079
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T10:46:03+00:00 2026-06-03T10:46:03+00:00

I have over two hundred web pages that need a lightbox added to them.

  • 0

I have over two hundred web pages that need a lightbox added to them. I’ve added a javascript file at the bottom of the <body> for these pages. Unfortunately, I forgot to add JQuery in the <head>…I’m hating myself for this :(.

Basically, I’m creating and appending the <script> and <link> tags to the <head> of my html from my javascript file at the bottom of my <body>

I believe that since I’m loading the script tags from the end of my HTML that it’s an order of operations problem.

When I click on the designated tag defined by the shadowbox plugin, nothing happens.

I’m a little stuck on this one if anyone could help. I’d really appreciate it!

Here is some example code that I’m using:

//Get head element
var head = document.getElementsByTagName("head")[0];

//Create and attach JQuery
var jquery = document.createElement('script');

jquery.type = 'text/javascript';
jquery.src = 'https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js';
jquery.onload = function() { 
};
head.insertBefore(jquery,head.childNodes[4]);

//Create and attach shadowbox CSS
var shadowboxCSS = document.createElement('link');
shadowboxCSS.type = 'text/css';
shadowboxCSS.rel = 'stylesheet';
shadowboxCSS.href = 'http://image.iloqal.com/lib/fe5c1570746107757c1c/m/1/shadowboxCSS.css';
head.appendChild(shadowboxCSS);

//Create and attach shadowbox JS
var shadowbox = document.createElement('script');

shadowbox.type = 'text/javascript';
shadowbox.src = 'http://image.iloqal.com/lib/fe5c1570746107757c1c/m/1/shadowboxJS.js';
head.appendChild(shadowbox);

//Call shadowbox function in head
var shadowboxcall = document.createElement('script');
shadowboxcall.type = 'text/javascript';
shadowboxcall.innerHTML = "Shadowbox.init()";
head.appendChild(shadowboxcall);
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T10:46:05+00:00Added an answer on June 3, 2026 at 10:46 am

    Remove the “call shadowbox function” section, it’s not right.

    Instead, add shadowbox.onload = function() {Shadowbox.init();}; to the end.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two .NET applications that talk to each other over a named pipe.
I have two Java applications in my network that talk to each other over
Here's the situation: I have a two images that are over 1024 in width
Ok, I have a query over two tables. I need to get two sums.
I've been working on an application for a little over two years and have
Over the last few months/years, I have shared a folder or two with numerous
We have over 1000 unit tests. A while ago 18 of them started to
I have text file looks like that: float a[10] = { 7.100000e+000 , 9.100000e+000
I have a string: <font face=ARIAL,HELVETICA size=-2> JUL 28 </font> (it outputs over two
I have two XAML pages. One page (named Page1) has a listbox named strangers

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.