Popup message in jquery

230 views
Skip to first unread message

Mayur pimple

unread,
Apr 11, 2012, 5:05:18 AM4/11/12
to php...@googlegroups.com
Hi

How to display popup message in php and jquery?

--

Best,

M



 


Praveen Kumar

unread,
Apr 11, 2012, 5:35:33 AM4/11/12
to php...@googlegroups.com
By popup you mean an 'alert box' or a 'modal window' or a the 'window.open' kinda popup? Also, it has nothing to do with PHP.



--

Best,

M



 


--
On Twitter ==> http://twitter.com/phpcamp
On Facebook ==> http://www.facebook.com/campersfanpage
 
 
 
You received this message because you are subscribed to the Google
Groups "phpcamp" group.
To post to this group, send email to php...@googlegroups.com



--
Praveen
Not Sent from my iPhone or BlackBerry® on Airtel

Amit Patil

unread,
Apr 11, 2012, 5:41:18 AM4/11/12
to php...@googlegroups.com
You might like "apprise" modal box
Thanks and Regards,
Amit Patil
http://www.amitpatil.me



Rutwick Gangurde

unread,
Apr 12, 2012, 1:06:41 AM4/12/12
to php...@googlegroups.com
It takes a couple of lines of jQuery (and PHP for receiving the AJAX call if the data comes via AJAX). Or you could keep the data for the popup in a hidden div, and show it in the popup when hovered over the popup trigger.

Lets say you want to show a popup when hovered over a link. Then you could use this, but this is AJAX less, so no php.

THE MARKUP:
<div class='the_list'>
    <ul>
        <li>
            <a href='#' id='pers_info' class='the_trigger'>Personal Info</a>
            <div id='pers_info_data' class='hidden'>lorem personal ipsum</div>
        </li>
        <li>
            <a href='#' id='prof_info' class='the_trigger'>Professional Info</a>
            <div id='prof_info_data' class='hidden'>lorem professional ipsum</div>
       </li>
    </ul>
</div>

CSS:
.the_list li{ position: relative; }
.the_list .hidden{ display: none; position: absolute; }

JQUERY:
jQuery('.the_trigger').hover(function(){
    jQuery(this).next('.hidden').show().css({'top':'10px', 'right':'10px'});
},
function(){
     jQuery(this).next('.hidden').hide();
}

Not tested this, but it will work.
Rutwick Gangurde
Web developer
Reply all
Reply to author
Forward
0 new messages