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

  • SEARCH
  • Home
  • 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 8028971
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T00:17:34+00:00 2026-06-05T00:17:34+00:00

my jQuery Code $(#div1).load(test1.html) $(a#link).fancybox({ ‘transitionIn’ : ‘elastic’, ‘transitionOut’ : ‘elastic’, ‘width’ : 400,

  • 0

my jQuery Code

$("#div1").load("test1.html")  

$("a#link").fancybox({
    'transitionIn'  : 'elastic',
    'transitionOut' : 'elastic',
    'width'         : 400,
    'height'        : 200,
    'overlayOpacity': 0.5,
    'type'          : 'iframe'
});

After .load my fancybox doesn’t work.

It work in test1.html.

How am i suppose to write it?

  • 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-05T00:17:38+00:00Added an answer on June 5, 2026 at 12:17 am

    I don’t know anything about fancybox but when using the load function the data is loaded asynchronously so anything after the call to load could be done before it is loaded. you should add the code into the callback if you want it to effect the items you have loaded in.

    $("#div1").load("test1.html", function () {
        $("a#link").fancybox({
            'transitionIn'  : 'elastic',
            'transitionOut' : 'elastic',
            'width'         : 400,
            'height'        : 200,
            'overlayOpacity': 0.5,
            'type'          : 'iframe'
        });
    }) 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

the body html code: <div style=background:yellow;width:500px;height:300px;> <div id=div1 style=background:red; width:100px;height:100px; float:left;></div> <div id=div2 style=background:blue;
Fiddler Link : http://jsfiddle.net/nLxc4/5/ My code : <html> <head> <script type=text/javascript src=js/jquery-1.5.1.min.js></script> <script type=text/javascript>
I have this code jQuery('.button').click(function() { jQuery('.div1').animate({width: 'toggle'}); jQuery('.div2').animate({width: '100%'}); }); Works fine for
jQuery.get(ChkNewRspLive.php?lastmsgID= + n, function(newitems){ //some code to separate values of 2d array. $('#div1').append(msgid); $('#div2').append(rspid);
For example I have following jQuery code: var div1 = $(divs).next(); How do I
I'm using this bit of jQuery code to target Safari: if ($.browser.safari) { $('#div1').css({'margin-top':
below JQuery code for showing and hiding content of my html page. when i
Exact jquery code for this(rough) condition if(searchTerm.length==0){ alert(empty) } else{ form.submit } My HTML
jQuery Code: $(document).ready(function(){ $.getJSON('dat.js', function(data) { var obj = JSON.parse(data); alert(obj[0].title); }); }); My
this jquery code works fine for me in jquery format. I want convert this

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.