Create a div/href/img nest block in JQuery or JavaScript -
i using button , when click it, creates panel contains 4 divs, multiple links < href >, , multiple < img >s. new @ web programming understanding has in javascript section since using jsplumb , jsplumb elements have within jsplumb ready function. panel created become node can dragged , connected other nodes, have working. using jinja , passing values sqlite database panel works well. can pass variables not sure how create < img > , < href> tags. have made in html don't know how in javascript.
i using jquery , have found several ways make divs , create panel multiple divs not way < img > , < href > tags in divs. here 2 ways of making divs have done:
var connect = $('<div>').addclass('connect'); var newagent = $('<div class="panel"></div>'); newagent.append(connect);
and
var addclasscontent = $('<div>', { "class": "panel_class_content", text: classthumbnail + classdescription , }); newagent.append(addclasscontent);
overall creating panel , within panels there several divs , within divs there < href >< img >< /img >< /a > , < img >< /img >. how should go nesting these?
thank you!
first off, put id on div such (just don't mess other divs):
<div id="div" ></div>
then using jquery:
$('#div').append('< href="" >< img src="" >< /a >' + '< img src="" >'
this should need
Comments
Post a Comment