PS: I use jquery too if it isn't obvious.
////////////front-end.js/////////////
$(document).ready(function() {
$("#start-menu-frame").hide();
$('#start-menu-icon').hover(function(){
$("#start-menu-frame").fadeIn();
}, function(){
$("#start-menu-frame").fadeOut();
});
var applications = [];
applications.push(new createFrame(200,200));
applications.push(new createFrame(500,500));
});
///////////applications.js///////////////////////////////
function createFrame(width,height) {
$("#desktop-box").append('<div class = "application-frame"><div class = "buttons-box"><div class = "exit-button"></div><div class = "fullscreen-button"></div><div class = "minimise-button"></div><div id ="webcontent" class ="content"></div></div></div>');
$(".application-frame").width(width);
$(".application-frame").height(height);
$(".exit-button").click(function() {
$(".application-frame").fadeOut('very slow');
});
$(function() {
$(".application-frame").draggable({containment:"parent"});
});
}
This post has been edited by andrewsw: 05 June 2015 - 03:22 PM
Reason for edit:: Added [code][/code] tags

New Topic/Question
Reply



MultiQuote




|