Popup for webpage? - javascript

I'm attempting to add a sort of popup window to my html file. To give a good example of what exactly I'm looking for there is this website http://www.goodsearch.com/zipcar/coupons?open=3709630 when you click on one of the coupons a sort of pop up shows up
Does anyone know how would I do something like this? Would I use JavaScript?
I tried doing the following in JavaScript, but it’s not exactly what I want:
window.prompt('defaulttext', 'defaulttext')
I would appreciate any help!

You can use jQuery UI Dialog. Example:
$( "your-selector-here" ).dialog();

Simple Modal is a decent basic jQuery plugin, see the website for documentation and the plugin.

Related

How do I display a alert on a website?

I wanted to have a message pop up in the middle of the page of my website when there is a important announcement like the one below. Any ideas of what to use. I tries looking at the code but I have no idea how to get it to work. Any ideas will be appreciated.
Image (My Idea of how it should look)
It looks like you have tagged 'javascript' on this question, so I will show you the most common way to do it completely using javascript.
Use the alert() function. The alert function takes one parameter — the text that you want to show. All browsers will present this in a different way. This is really easy to do and is recommended especially if you are just starting.
An example of implementing this on your HTML website:
<script type="text/javascript">
alert('My message goes here');
</script>
If you want to change the way this looks, you will have to use an HTML modal. By using that, you can customize the HTML&CSS to look exactly like the picture you attached.
To get started with that, I recommend you check out W3Schools tutorial on this: https://www.w3schools.com/howto/howto_css_modals.asp

Dropdown Information Boxes

I am trying to create dropdown menus that contain information similar to that of what this website has down in their main body.
http://www.alexanderresearch.com.au/index.php?option=com_moofaq&Itemid=3
I would like the functionality to be similar to that of these information boxes, i would like some help in pointing me in the right direction to be able to create this for my website. Any help would be appreciate, Thankyou in advance!
The design pattern you are referring to is called an Accordion.
Since your question is tagged jQuery, I assume you're using it, so you could add a script from jQuery UI here:
http://jqueryui.com/accordion/
Let me know if you need help integrating it.
It is an accordion menu. You can find it here.
http://jqueryui.com/accordion/#hoverintent

Simple jquery plugin that quick looks information

Is there any good JavaScript/jQuery plug-in that will 'quicklook' an information on click?
I want it simple so when you click the quick view link it just displays it as a modal form
Ideally it would be set up by just giving said links a class and the JavaScript/jQuery does the rest.
Similar to the (http://us.norton.com/downloads/) quick view button.
qtip plugin might come in handy too
Norton is using colorbox i think.. http://www.jacklmoore.com/colorbox/
colorbox is a jQuery lightbox.. you can customize it using CSS.. it can handel inline content as well as fetch data by making an ajax call

Is there a basic/simple lightbox/overlay jQuery-based library anywhere?

Is there any Lightbox-live or overlay library out there that only provides the "basic cross-browser centered popup with a dark background" without attempting to perform requests and display images?
I would like to populate the contents myself using my own JS code which is non-trivial and all of these libraries expecting a link with something displayable inside it are unusable for my simple yet unusual (it would appear) use case...
I've gone over maybe 15 Lightbox clones today and for the life of me couldn't find a simple way to just get the basic overlay functionality without the added fluff. Is anyone familiar with something like that ?
Look into Colorbox. Check the Inline Examples. It works well.
http://jacklmoore.com/colorbox/
Look here: http://jacklmoore.com/colorbox/example1/ under "Other Content types"
Try jQuery UI dialog!
jQuery Dialog in jQuery UI might be an option to consider.
You can customize the download of the library to give you only the dialog.
Just de-select everything from here and select "Dialog" only (it will select the minimum dependencies for you):
http://jqueryui.com/download

facebook auto-expanding like box

can anyone provide me any ideas about how to import a facebook like box, in my site. I would it to seem like the one in the folowing site "http://www.babyspace.gr/". Does any of the existing javascript frameworks afford such a functionality?
Thank you in advance
It is simple Facebook social plugin called Like Box and you can get it here: http://developers.facebook.com/plugins?footer=1
You can install it on any webpage quite easily - If you follow the instructions on the page linked above.
About the slider - It can be achieved quite easily with jQuery. Put the Like Box on some div and use jQuery animate to show it by click.

Categories

Resources