Currently a lightbox is triggered when a visitor clicks a certain link on my page. However, as an introduction to new users I'd also like to show the lightbox when a visitor loads a page.
I've been looking into click events, but I can't seem to get it to work. Could somebody please point me in the right direction?
The site is located on http://wandree.websites.xs4all.nl/test, and the lightbox is currently triggered when you press the image of the tv located in the sidebar.
Thanks for any help!
Try this in the head section of the page:
$(document).ready(function(){
// Call the lightbox function.
});
Related
I am trying to do something like this:
A user share the url to my page which has a small javascript based lets-say-a-game.
The shared content will display a static image and a play button inside the widget/thumbnail.
When the user clicks on the play button, I want to load the page within the shared widget inside an iframe
For example: When a souncloud page is shared, it shows the music thumbnail and a play button. When I click on the play button it displays a javascript based music player inside the share widget loaded inside an iframe. To my understanding, the trick is to use a video content as a wrapper of some sort i.e swf but couldnt figure it out exactly how to do it.
Any help towards the right direction is appreciated.
Thanks in advance!
I think Facebook will not allow you to post any script. Rather you can post links and if the user clicks on that link they will be redirected and there you can implement your code..
I have this issue and I don't know how to solve it...
When entering in my homepage, I want to popup a picture so as the visitors could see directly a new event before they enter the website. I tried it with JavaScript but I didn't make it to work.
I don't want to make a new homepage, but I want this picture to pop up over the normal homepage and when clicking the picture it will redirect you to the competition, otherwise by clicking anywhere else it will make the picture go away.
I know how to add the links but I am stacked in the JavaScript part.
If you could help me on how to pop up the picture when someone visit my website I would really appreciate it.
Create a div which contains your pop'in and use jQuery when the page load :
<div id="mypopup">
**** Somes stuff here ****
</div>
$(document).ready(function() {
$("#mypopup").show();
});
Have an image with position: absolute property. And place it wherever you want on screen (show it default)
Use jQuery library, to do the below stuff to hide it.
$('.image-class').click(function(e){
e.stopPropagation();
});
$('body').click(function(e){
$('.image-class').hide();
});
I have a few Pretty Photo images in my app, but they are opening in a new page instead of in a PrettyPhoto display.
Here's the index of my app, which is stripped down of everything not nescessary to run it.
Click the down arrow in order to view the pretty photo page.
I use the jQuery version from the download. Also PrettyPhoto and it's script are initialised right before the closing div tag.
What could possibly be wrong with it? Why are the images opening in a new page?
Thx in advance!
It's because you are calling the plugin once the document is loaded but not after clicking on the down arrow.
If you go to your site. Click on the down arrow. Open the js inspector and copy/paste this
//jQuery.noConflict();
jQuery(document).ready(function(){
$("a[rel^='prettyPhoto']").prettyPhoto({
social_tools: false,
theme: 'light_square'
});
});
You will see it's working.
So try to trigger the prettyPhoto once the pictures are loaded.
I'm trying to figure out how to make a link on my page access a game in a certain spot on the same page. I have multipal games that are embeded>. So I have multipal links on the same page.
So Basically after I click one of the links, it will do a pop up in any area next to the link and they can play it. If someone can help me out I will give you much credit needed.
I'm using antenna web design and I'm not sure if I need to call functions so I can put the code in a certain area. Thank You For Your Time If You Help.
if you need in the same page means use
<iframe></iframe>
otherwise just make a link. it will open same window or use target="_blank" it will open for a tab
try to send the video Id in link and filter the video id from querystring on click event
I am looking for a lightbox like effect script.
When click on a link or button, it will load the html/php file with the lightbox effect on the same page.
I know there are many such script available, but these scripts will have the pop-up form disappear whenever I click on the outer surroundings of the pop-up form. Is there any scripts that can have those pop-up forms remain when clicked on the outer section just like the ones on facebook?
Try the shadowbox script, you can download it at : http://www.shadowbox-js.com/
Colorbox would be my lightbox of choice: http://jacklmoore.com/colorbox/, although #julesanchez suggestion of shadowbox is an excellent choice as well.
This seems to be what you're looking for: http://davidwalsh.name/dw-content/lightface.php