Widget:HeartSoundApp: Difference between revisions

Jump to navigation Jump to search
Matt Pijoan (talk | contribs)
No edit summary
Matt Pijoan (talk | contribs)
No edit summary
Line 10: Line 10:
     });
     });
     $("#add").click(function(){
     $("#add").click(function(){
        var position = $("#imageHolder").offset();
         var top = Math.round($("#imageHolder").offset().top)+200;
         var top = Math.round($("#imageHolder").offset().top)+200;
         var left = Math.round(position.left)+200;
         var left = Math.round($("#imageHolder").offset().left)+200;
         var style = "position:absolute; top:"+top.toString()+"; left:"+left.toString()+"width:25px; height:25px; border:1px solid #000;";
         var style = "position:absolute; top:"+top.toString()+"; left:"+left.toString()+"width:25px; height:25px; border:1px solid #000;";
        alert(style);
         $("#imageHolder").append("<div src='"+$("#soundLocation").val()+"' style='"+style+"'></div>");
         $("#imageHolder").append("<div src='"+$("#soundLocation").val()+"' style='"+style+"'></div>");
         $("#soundLocation").val("");
         $("#soundLocation").val("");

Revision as of 20:09, 20 October 2015