Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Why isn't this working?

  • This topic is empty.
Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #168733
    davidchristopher
    Participant

    This Josh blackwood released a way I can change divs with in the same page with out the page changing itself, I found this through google, the link is below, it seems to work perfectly in CodePen, but when I bring it into DreamWeaver and copy the code exactly it will not bring up the content when I click on the images. Any ideas why this may not be working? Any help would be much appreciated. Thanks!

    Link to Code: http://codepen.io/JoshBlackwood/pen/yoLBJ

    #168734
    __
    Participant

    Any ideas why this may not be working?

    Without seeing an example that demonstrates the problem, I would say Dreamweaver is what is wrong. Write your code in a code editor*, and test it in your browser.

    * free suggestions:
    * notepad++ (windows)
    * textwrangler (mac)
    * gedit (win/mac/linux)
    * Komodo Edit (win/mac/linux; highly recommended).

    #168735
    davidchristopher
    Participant

    Hmm can’t see the replies…..

    #168736
    __
    Participant

    I replied, but now my reply is gone.

    Can you recreate the problem outside of dreamweaver? I would suspect that DreamWeaver is the problem. WYSIWYG web editing programs generally produce messy, problematic code and make changes that you didn’t ask for. They are not worth using.

    My suggestion (and likely solution) is to write your code in a real code editor, and test your code in a real browser. I had several suggestions in my previous reply, but my #1 choice is Komodo Edit. It is free, open-source, and cross-platform (works on win/mac/linux).

    #168766
    davidchristopher
    Participant

    traq- I did what you have said, and still not working….. is there any one who is familiar with JS and could try themselves and see if they get the same error?

    #168767
    __
    Participant

    @traq – your reply got caught in the spam filter by having 4+ links in it. I pushed it through.

    I figured it was something like that. Thanks.

    is there any one who is familiar with JS and could try themselves and see if they get the same error?

    You have already tried (in your codepen), and managed to get it to work. Unless you can reproduce the non-working code outside DW, this would indicate that the problem is with DW, not the code itself.

    If you are asking me to open up DW and just fiddle around until something goes wrong, no, sorry. The solution here is to use a program that doesn’t break your code.

    Can you reproduce the non-working code? If so, please share it, and I would be happy to take a look.

    traq- I did what you have said, and still not working

    Did what? Do you mean that you tried using another editor, tested in a real browser, and the code still didn’t work? (If so, did you copy the code from DW, or did you copy the working version?)

    If so, as above, please share the non-working code (i.e., make a new example on codepen).

    #168768
    davidchristopher
    Participant

    Yes I tried in other editors as you said too. I also just simply tried with note pad and still produced the same result with all. I have just did as you said and brought the code that is not working into code pen and will give you the link: It seems to not be working as well, yet I copied and pasted this exactly from the original working product.

    http://codepen.io/davidchristopher/pen/Dmtvr

    #168769
    __
    Participant

    Alright – first, you had fragments of code copy+pasted everywhere, with html/css/javascript all mixed up.

    Compare your codepen with JoshBlackwood’s original codepen.

    Next, you didn’t have the jQuery library on your page.

    If you want this all in a single document (i.e., something that would work on a regular website, not all separated out into frames like on codepen), see here.

    #168809
    davidchristopher
    Participant

    traq thanks allot man! it all works now, I appreciate the help man!

    #168815
    __
    Participant

    no problem.

Viewing 10 posts - 1 through 10 (of 10 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.