// JavaScript Document function release(generalDataRaw) { // Functions this.parseGeneralDataRaw = function(generalDataRaw) { var generalDataRawExploded = generalDataRaw.split('|'); this.id = generalDataRawExploded[0]; this.nameUsed = generalDataRawExploded[1]; this.type = generalDataRawExploded[2]; this.description = generalDataRawExploded[3]; return true; }; this.updateGeneralData = function() { this.HTMLtitle.text('Minecraft ' + this.nameUsed); this.HTMLdescription.text(this.description); }; this.expandButton = function() { if (that.detailedDataExpanded) { that.HTMLexpandButton.attr('value', '...'); // Load the content if (this.detailedDataBuilded) { // Creating HTML Elements } else { } that.HTMLdetailedData.hide('slow'); that.detailedDataExpanded = false; that.HTMLexpandButton.attr('value', '+'); } else { that.HTMLexpandButton.attr('value', '...'); that.HTMLdetailedData.show('slow'); that.detailedDataExpanded = true; that.HTMLexpandButton.attr('value', '-'); } }; /*this.parseExtendedDataRaw = function(generalDataRaw) { var generalDataRawExploded = generalDataRaw.split('|'); this.id = generalDataRawExploded[0]; return true; }; this.updateExtendedData = function() { this.HTMLtitle.text('Minecraft ' + this.nameUsed); };*/ this.parseGeneralDataRaw(generalDataRaw); // Creating HTML Elements this.HTMLtitle = $('
').appendTo(this.HTMLelement);
this.HTMLdescription = $('', {
className: 'description'
}).appendTo(this.HTMLgeneralData);
this.HTMLexpandButton = $('', {
className: 'expandButton',
type: 'button',
value: '+'
}).appendTo(this.HTMLgeneralData);
this.HTMLdetailedData = $('