Easy way to add info buttons (?) - php

I want to add those little buttons many webpages have that are simply a circle with a ? on the middle and that on click show a little dialog with information. Is there a simple way to do it?

The title HTML attribute for a rollover message? Otherwise, I'm sure there are easy ways to make those with jQuery.

jQuery is probably what you're looking for. It's a JavaScript framework that has many plugins available, some of which do what you want.
One is http://flowplayer.org/tools/tooltip/index.html. You can search for others at http://plugins.jquery.com/ or by searching google for "jquery tooltip".

Can be done with jquery & css. Lot of example out there.
jQuery Tooltip
CSS Tooltip
I suggest to use Simpletip :)

Do you mean something like this?
This could be done with jQuery, an example here. (see demo)
And many more with google here.
Good luck!!
You said javascirpt not Query so here it goes. See demo here.

Related

JavaScript create input fields

At the moment i create this page here: http://skeptar.bplaced.net/Design_1.0/index.php?content=create_tutorial
If you press on the button "schritt hinzufügen" you will get one more step. I did it complete with PHP, but now i want to do it with JS. But im a totaly noob in JS. Should i use normal JS or jquery? I found many jsfiddles in the Internet, but im to low to use it. Maybe ssomeone of you can help me a bit.
Here is what I did.
I started with jQuery, because it is much less typing (and I found it easier to learn). Don't listen to those who say you must learn javascript first -- I didn't and I am now filling-in what I missed about javascript after having designed numerous sites.
I also found these great tutorials:
PHPAcademy.org
jQuery Basics
TheNewBoston.com
Intro to jQuery

Drag items onto draggable object

I am currently developing a wordpress plugin. This plugin requires to drag certain items onto an image. The layout is like this:
And i need to save the points that are dragged onto the picture into the database. I also need the ability to edit the points or remove the points.
Does anybody knows a good method of achieving this?
Kind regards,
Jack
Edit:
Maybe i'm being a little bit vague about this, but all i need is suggestions.. I do not need people to write code for me.
A google search gave me:
http://www.codingforums.com/showthread.php?t=160798
http://jquery-howto.blogspot.com/2009/07/identifying-locating-mouse-position-in.html
jQuery get mouse position within an element
http://www.switchonthecode.com/tutorials/jquery-snippet-relative-mouse-position
My suggestion is that onmouseup() you get the co-ordinates and store them.
A bit more googling and I found this answer:
Alternatives to trigger('mouseup') to stop dragging programmatically
Maybe this will help you.
Good luck :)
That's a lot you are asking eh, you can't expect us to write it for you but we can point your nose in the right direction :)
I suggest you start looking at the jQuery UI draggable plugin (and of course droppable too), it offers quite a flexible drag and drop implementation.
Manipulate the jquery ui draggable plugin
http://jqueryui.com/demos/draggable/

How can I replace the content in a div tag upon selecting a radio button?

I want to make an online poll in which upon selecting any option I want to replace the content of the <div> with the result. Is there a simple PHP function to replace the content of a <div> tag upon selecting a radio button?
php is a server side scripting language. You need to use javascript. If you want to replace it without reloading the page you will need to use ajax. You have about 5 questions packed into your one, and none of them are entirely trivial.
It sounds like you need to start from scratch and learn php and javascript. I found an online resource that will walk you through the many hours it will take for you to produce this effect: http://net.tutsplus.com/tutorials/javascript-ajax/creating-a-dynamic-poll-with-jquery-and-php/
This cannot be done with PHP. You need to use Javascript to do it.
Example here
Php is not the way to go with this. jQuery, though, would be.
("#id_of_radio").click(function(){
("#div_tag").html("<html code here>");
});

Emulate/Simulate iPhone Sprinboard behavior in a JS Webpage

I am looking for a smart way to emulate the iPhone Springboard behavior of changing icon possition. I just want to change few icons on ONE screen.
It should be run in JS on a webpage.
Any suggestions to start?
Thank you very much
I think jQuery UI Sortable will be good for that.
Check this demo. If you would add icons to the elements in that demo and style it a bit I think you would get what you want.

facebook status bar

Anyone know a good tutorial of how to make the status bar found in the new facebook? the one on the bottom. looks really cool
i was thinking it was written in either ajax or jquery. but not sure.
Here are some useful links/plugins that might help you:
Positioning the footer
Enable drag/drop of things (like applications)
Tooltip (when hover)
And for the interaction with the server (for new events etc.) you might use the AJAX functionality in jQuery:
In order to have it always be in the bottom, that is more of CSS than javascript.
I think you would get better answers if you were more specific. For example, I would want the answer to revolve around as to how the chatroom works on facebook. Is the javascript request being sent every second to check for new messages? or is there another protocol being used in order to have instant messages?
It's not clear what your are looking for: bar's design or it's functionality. If your are speaking about design you should look into css positioning (absolute). If it's about functionality i suppose that there is some kind of ajax javascript which checks every x seconds if there is change of state, and if there is go deeper and find out what to load.
Why not just download the Facebook source code and take a look at how they do it? They open sourced a lot of the stuff they use/created/enhanced.
Soh Tanaka just put out a great step-by-step tutorial on how to re-create the Facebook Status Bar:
Here's another good starting point: http://www.ben-griffiths.com/project/jquery-position-footer/. If I remember correctly it works in FF & IE & Safari
I looked through the jQuery plugins, and Googled the topic for you. All I could find was this which isn't exactly what you want, but it is a good place to start. With some style changes, and a little tweaking it could easily look exactly like the Facebook bar.
Not sure that this is the type of answer you were looking for, but i've been looking for the same thing and this code seems to at least show how it's done.

Categories