Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



Reply
jquery pop up on page load
Old 01-17-2011, 05:00 PM jquery pop up on page load
Ultra Talker

Posts: 254
Trades: 0
i am using facebox http://chriswanstrath.com/facebox/

please click on this link
http://www.sudhakargolakaram.co.in/f...les/popup.html

when this link is clicked a popup window appears with content inside this popup window.

i would like this pop up window to appear by default when the page has loaded

if i am using another jquery plugin which also has a similar popup effect what is the general rule so that these popup windows appear by default when the page loads

i have tried using
$(document).ready(function() {
}

but not sure how to call this popup window for different jquery plugins that have different effects for the popup window inside $(document).ready
so that the window appears when the page loads
sudhakararaog is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 01-17-2011, 10:46 PM Re: jquery pop up on page load
mgraphic's Avatar
Truth Seeker

Latest Blog Post:
JAMISONTUNES
Posts: 2,918
Name: Keith Marshall
Location: Connecticut
Trades: 0
It probably binds an onclick event to the object, so inducing a click may work.

Code:
    jQuery(document).ready(function($) {
      $('a[rel*=facebox]').facebox({
        loadingImage : '../src/loading.gif',
        closeImage   : '../src/closelabel.png'
      }).click();
    })
__________________

<mgraphic /> - I don't have a solution but I admire the problem.
mgraphic is offline
Reply With Quote
View Public Profile
 
Old 01-18-2011, 07:47 AM Re: jquery pop up on page load
Average Talker

Posts: 15
Name: Kannan
Trades: 0
Like mgraphic said, you need to trigger a click event.
this may also help you
Quote:
jQuery(document).ready(function() {
$('a[rel*=facebox]').facebox({
loadingImage : '../src/loading.gif',
closeImage : '../src/closelabel.png'
});
$('a[rel*=facebox]').trigger('click');
});
kannan is offline
Reply With Quote
View Public Profile Visit kannan's homepage!
 
Old 01-19-2011, 12:53 AM jquery pop up on load
Ultra Talker

Posts: 254
Trades: 0
i have used fancybox for popup effects.
please see this link
http://www.sudhakargolakaram.co.in/f...ncy/popup.html

here when the link is clicked a popup window appears with the effect created by fancybox

what i need is i want this popup window to appear by default when the page loads

how do i specify that i want this content in a popup window with the effect when the page loads
sudhakararaog is offline
Reply With Quote
View Public Profile
 
Old 01-19-2011, 08:20 AM Re: jquery pop up on load
Extreme Talker

Posts: 246
Trades: 0
try $("#various1").fancybox({...}).click(); on the load of the page (haven't tested it)
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
stbuchok is offline
Reply With Quote
View Public Profile
 
Old 01-19-2011, 08:25 AM Re: jquery pop up on load
Extreme Talker

Posts: 246
Trades: 0
I just realized you posted the same question about another control. Just out of curiosity, why not use the one from jQuery UI?

http://jqueryui.com/demos/dialog/
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
stbuchok is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to jquery pop up on page load
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.74386 seconds with 12 queries