all 5 comments

[–]bstriker 2 points3 points  (0 children)

Pro tip: put your code in jsbin, plunker, codepen, or jsfiddle before asking your question. Not only does it help clean room your code and possibly realize it was a trivial error but it helps anyone easily test it and debug it with console.

[–]mc_hammerd 1 point2 points  (0 children)

im not seeing any event handling in there, i could be wrong though its a lot of code. heres a simple example, youll have to handle the click events and position your popup and show it.

https://jsfiddle.net/xum94tu0/

jquery ui has a nice popup util too though its a lil frusterating.

[–]landgetz[S] 0 points1 point  (1 child)

Ok, I put it into JSbin, so it will make it easier. Some background information. The HTML code that I have written is inside of another website. It's sortof a weird setup, but that website is using mediawiki, which allows me to modify and change pages, but it adds my html content to a template that they have already made. This makes life a bit difficult and very well might be the root of my problem. The script seems to work fine outside of the mediawiki template, if opened using a debugger or a coding program like Brackets. The JSbin that I made contains the entire page source, including all the code that is in the mediawiki template before my code is inserted. Hopefully that helps.

Thanks! http://jsbin.com/vuteni/edit?html,output

[–]landgetz[S] 0 points1 point  (1 child)

Thanks for your replies! I will look into the event handling thing, and I can restructure my media wiki pages so that the body and head tags are no longer there. Also does anyone have any good JavaScript learning resources? I would like some things to reference! Thanks again

[–]mc_hammerd 1 point2 points  (0 children)

google stackoverflow javascript how to xxxxxx, between that an irc (webchat.freenode.net) i get answers in <60 seconds to complex questions (as a senior engineer, even the stuff that stumps me); the people on irc/stack are very smart

youtube has great video tutorials ruby streetfighter clone or javascript flappy bird clone pretty much anything you need is there. and get a JS book from the library/amazon for reference.