Permalink
Browse files

added cindy's widget

  • Loading branch information...
1 parent aa96932 commit 405736056422bb7bea520a254a5bf9c9ec000987 @benrito committed Apr 7, 2012
Showing with 118 additions and 0 deletions.
  1. BIN photos/pain.jpg
  2. +118 −0 widget.html
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
@@ -0,0 +1,118 @@
+
+<!DOCTYPE html>
+<html style="height: 100%; margin: 0px; padding: 0px; overflow: hidden;"><head>
+<meta http-equiv="content-type" content="text/html; charset=UTF-8">
+<meta charset="UTF-8">
+<head>
+</head>
+<title>Widget</title>
+<style>
+
+#node{
+ border:1px solid red;
+width:50px;
+height:50px;
+display:block;
+}
+
+#popup{
+background-color:#ccc;
+position:absolute;
+border:3px solid #333;
+width:200px;
+-moz-box-shadow: 10px 10px 5px #888;
+-webkit-box-shadow: 10px 10px 5px #888;
+box-shadow: 10px 10px 5px #888;
+margin:10px;
+padding:10px;
+}
+
+}
+#popup h2 {
+ font:Verdana, Arial, Helvetica, sans-serif;
+ font-size:12px;
+
+}
+#popup img{
+
+}
+#popup #closebox {
+ color: #333;
+ position: absolute;
+ right: 10px;
+ top: 10px;
+ text-decoration:none;
+
+
+}
+</style>
+
+<script src="js/jquery.js" type="text/javascript"></script>
+
+<script>
+
+ $(document).ready(function() {
+
+
+ //Following events are applied to the trigger (Hover events for the trigger)
+ $('#node').mouseenter(function() {
+
+
+ createPopup(this, "DEA Informant","photos/pain.jpg", "media/somevideo.mp4", 200, 250);
+
+ });
+ $('#node').mouseleave(function() {
+ //removePopup(this);
+ });
+
+
+});
+
+function createPopup(thisnode, title, imgsrc, videosrc, x, y){
+
+ var $newdiv1 = $('<div id="popup"/>');
+ var $title = $('<h2>' + title + '</h2>');
+
+ $newdiv1.append("<a href='" + videosrc + "'><img src='" + imgsrc + "'></a>").append($title);
+ $newdiv1.append("<a id='closebox' class='close' href='#'>X</a>");
+
+
+ $("section").append($newdiv1).animate({opacity:1},'slow');
+ $($newdiv1).css("top", x).css("left", y);
+
+
+ $('#closebox').click(function (e) {
+ e.preventDefault();
+ removePopup();
+ //load video popup?
+ });
+
+
+}
+
+function removePopup(){
+ $("#popup").animate({opacity:0},'slow');
+ $("#popup").remove();
+
+}
+
+
+
+
+</script>
+
+
+
+
+
+<section>
+<div id="node">
+
+<div class="content"><p>I am a popup</p>
+</div>
+
+ </section>
+
+
+
+ </html>

0 comments on commit 4057360

Please sign in to comment.