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 7759563
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T13:39:43+00:00 2026-06-01T13:39:43+00:00

I found this tutorial which pretty much does exactly what I want: http://webstutorial.com/jquery-popup-jquery-slide-popup/jquery Except

  • 0

I found this tutorial which pretty much does exactly what I want:

http://webstutorial.com/jquery-popup-jquery-slide-popup/jquery

Except that it runs when the body loads, I’ve tried getting it to run onclick but I can’t get it working, can anyone help me get it to run when I click a button instead of when it loads?

JS

function openOffersDialog() {
    $('#overlay').fadeIn('fast', function() {
    $('#overlay').css('z-index', 100);
    $('#overlay').css('opacity', 0.8);
    $('#overlay').css('background', '#000000');
    $('#boxpopup').css('display','block');
    $('#boxpopup').animate({'left':'30%'},500);
    });
}


function closeOffersDialog(prospectElementID) {
$(function($) {
    $(document).ready(function() {
        $('#' + prospectElementID).css('position','absolute');
        $('#' + prospectElementID).animate({'left':'-100%'}, 500, function()       {
            $('#' + prospectElementID).css('position','fixed');
            $('#' + prospectElementID).css('left','100%');
            $('#overlay').fadeOut('fast');
        });
    });
});
 }

CSS

#wrapper a{
cursor:pointer;
font-size:15px;
font-weight:bold;
text-decoration:underline;
}

.box {
background-color: #ffffff;
color: #888888;
height: 205px;
left: 100%;
padding: 20px;
position: fixed;
right: 30%;
top: 25%;
width: 555px;
z-index: 101;
border:5px solid #888888;
border-radius:10px;
-moz-border-radius:10px;
}

.overlay {
/*background: #000000;*/
bottom: 0;
left: 0;
position: fixed;
right: 0;
top: 0;
z-index: -100;
/*opacity:0.5;*/
}

a.boxclose {
background: url("cancel.png") repeat scroll left top transparent;
cursor: pointer;
float: right;
height: 26px;
left: 32px;
position: relative;
top: -33px;
width: 26px;
}

HTML

<body>
<!--<body onload="openOffersDialog();">-->
<div id="wrapper">
<div id="overlay" class="overlay"></div>

<a onclick="openOffersDialog();">Click Here To See The PopUp</a><button onclick="test();">TESTCLICK</button><button ontouchstart="test();">TESTTOUCH</button>
<div id="boxpopup" class="box">
<a onclick="closeOffersDialog('boxpopup');" class="boxclose"></a>
<div id="content">
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. 
</div>
</div>
</div>

Any help would be great, thanks.

  • 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-01T13:39:45+00:00Added an answer on June 1, 2026 at 1:39 pm

    JavaScript

    function closeOffersDialog(prospectElementID) {
            $('#' + prospectElementID).css('position','absolute');
            $('#' + prospectElementID).animate({'left':'-100%'}, 500, function()       {
                $('#' + prospectElementID).css('position','fixed');
                $('#' + prospectElementID).css('left','100%');
                $('#overlay').fadeOut('fast');
            });
     }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm running through this tutorial found here: http://vb.net-informations.com/crystal-report/vb.net_crystal_report_from_multiple_tables.htm which teaches how to pass a
I found this tutorial which uses jQuery and validation plugin to validate form input.
I have found this tutorial online http://net.tutsplus.com/tutorials/php/creating-a-php5-framework-part-1/ I have created myself a simple sort
I found this JSF tutorial which shows how to create JSF table with pagination
So I found this: http://tiles.apache.org/framework/tutorial/advanced/nesting-extending.html Here is the example: <definition name=myapp.homepage template=/layouts/classic.jsp> <put-attribute name=title
Below is some html I found in this jquery tooltip tutorial, the contents inside
I want to make a nice, modern-looking transitions between pages. I've found this tutorial:
Okay so for this page: http://www.facebook.com/ESPN?sk=app_224097940938597 Which appears on the left hand bar between
i finished this tutorial: http://dblog.com.au/iphone-development/iphone-sdk-tutorial-build-your-very-own-web-browser/ and now i want to add a function for
I found This tutorial for resize background of button . i change this for

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.