Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Well I am new and beginner !

I installed auto thickbox plus for wp. Now all I want to do is automatically open a link in specific page.

Let's suppose I have a page "about us" on which I have a video.

When I click a nice insite popup appears playing the video by thickbox.

All I want to do is automatically open that video when someone click on "about us" after the page load of "about us".

Kindly help me !

share|improve this question
    
Want to tell you all the thick box work like when i define class in the link like <a href="asd.com"; class="thickbox">link popup</a> now if i use jquery how will i put class atribute in the link ? –  Ubaid Rehman Mar 29 '12 at 8:41

1 Answer 1

You can use JavaScript to trigger events upon page load. The example below uses jQuery.

$(document).ready(function () {
    // Select a link by ID
    $('#specific-link').trigger('click');

    // Select the first link with a certain class
    $('a.thickbox').first().trigger('click');
});

http://api.jquery.com/trigger/

share|improve this answer
    
Want to tell you all the thick box work like when i define class in the link like <a href="asd.com"; class="thickbox">link popup</a> now if i use jquery how will i put class atribute in the link ? –  Ubaid Rehman Mar 29 '12 at 8:44
    
@UbaidRehman I updated the code so it the first thickbox link gets clicked. –  Geert Mar 29 '12 at 13:15

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.