function rungenerator() {
var list="";
var delim="";
$(".checkBoxClass:checked").each(
function( index, value ) {
id=this.id;
var generator=generators[id];
console.log(generator);
list=list+delim+id;
delim=", ";
});
console.log(list);
$("#result").html(list);
return false;
}
// add a TextElement with the given tag and message to the given parent
function newTextElement(tag, msg) {
var newElement = document.createElement(tag);
var content = document.createTextNode(msg);
newElement.appendChild(content);
return newElement;
}
// add an image to the given parent
function addImage(pParent, pSrc, pAlt, pTitle) {
var lbreak = document.createElement('br');
pParent.appendChild(lbreak);
var newImage = document.createElement('img');
newImage.src = pSrc;
newImage.alt = pAlt;
newImage.title = pTitle;
pParent.appendChild(newImage);
return newImage;
}
// create a new generator with the given id, y-technical and topic
function Generator(id, yt, topic) {
this.id = id;
this.yt = yt;
this.topic = topic;
return( this );
}
// jquery startup
$(document).ready(function () {
var jsontext='{"key":"MetaModel","topics":[{"context":"MetaModel","defaultstoremode":"property","documentation":"a Property is a Feature/Attribute","icon":"File:Element_into_input.png","key":"Concept:Property","name":"Property","pluralName":"Properties","wikiDocumentation":"see\n https://semantic-mediawiki.org/wiki/Help:Properties_and_types\n https://semantic-mediawiki.org/wiki/Help:Special_properties"},{"context":"MetaModel","defaultstoremode":"subobject","documentation":"an SMW_Type is a data type which determines the possible values for that type e.g. a Boolean can hold true/fals values while a Number can hold 3.1459 or 20. A Page can hold the name of a Wiki page see...
Please Whitelist JSFiddle in your content blocker.
Help keep JSFiddle free for always by one of two ways:
Whitelist JSFiddle in your content blocker (two clicks)
Go PRO and get access to additional PRO features →
Join the 4+ million users, and keep the JSFiddle dream alive.
Ad-free
All ads in the editor and listing pages are turned completely off.
Use pre-released features
You get to try and use features (like the Palette Color Generator) months before everyone else.
Fiddle collections
Sort and categorize your Fiddles into multiple collections.
Private collections and fiddles
You can make as many Private Fiddles, and Private Collections as you wish!
Console
Debug your Fiddle with a minimal built-in JavaScript console.