How to move a DIV based on a mouse click in Javascript? -


i have testbed 4 simple content divs change position of when each of them clicked. link below.

http://christopherwynne.com/tattoo/

i have performed similar functions other sites in past, , feel missing fundamental. still new java, , have had issues getting work initially.

any issue appreciated.

your jquery click handlers not quite right. you're using:

$("gallerywrap") 

but should

$("#gallerywrap") 

to select element id.

once you've selected them can add class attach left margin of 205 want.

likewise have few other places you're not selecting elements properly. if try selecting elements these commands in console you'll see jquery can't find them.

an example: command $('div') selects <div>s on page, whereas if wrote $('#div') select elements id="div".


Comments

Popular posts from this blog

c++ - QTextObjectInterface with Qml TextEdit (QQuickTextEdit) -

javascript - angular ng-required radio button not toggling required off in firefox 33, OK in chrome -

xcode - Swift Playground - Files are not readable -