sega — 2012-03-20T10:23:09-04:00 — #1
I have a [website here, and the jquery is not working. On it's external file here it [URL="http://www.pricklypearmedia.com/clients/sitepoint/jquery_prickly/example_4.html"]works perfectly](http://www.pricklypearmedia.com). The website is in WordPress so I am not sure if I have done something wrong. I tried the IRC channels but nobody seams to know what it is.
Can anybody shed light on this, spent all day on it.
mmoore5553 — 2012-03-20T13:58:22-04:00 — #2
sega — 2012-03-21T05:04:13-04:00 — #3
It's understandable that you need the files. I included the source code file for the major files associated with the homepage
page-home.php - http://pastebin.com/7Usf3FTb
header.php - http://pastebin.com/W7Mx6Zth
footer.php - http://pastebin.com/SpKUs1ic
functions.php - http://pastebin.com/4T6sAAvH
Since then I've tried a few tricks, including, using jQueries no conflict mode, which still not did not work - http://codex.wordpress.org/Function_Reference/wp_enqueue_script. I also used this, but no cigar -http://api.jquery.com/jQuery.noConflict/.
I know this is probably most likely due to inexperience. Since then I am looking more into jQuery and I am going to go through these tutorials so it can help me in the future. - http://net.tutsplus.com/articles/web-roundups/jquery-for-absolute-beginners-video-series/. My site is a WP site.
I hope this helps to try and figure out what's up with the site.
paul_wilkins — 2012-03-21T06:38:47-04:00 — #4
I've taken a look a web site and the jQuery on there seems to be working fine with what you currently have there.
If the problem is being had with something else, please link us to a page that demonstrates the problem that you are having.
mmoore5553 — 2012-03-21T08:41:26-04:00 — #5
I went to your site and it has a maintenance pop up. Is everything working now ?
sega — 2012-03-21T09:06:33-04:00 — #6
Sorry, I was working on an additional section to the site, so maintenance mode was up.
It's now online again. I am still puzzled on what's wrong with it and why it does not work. Somebody mentioned isolation mode in jQuery but that did nothing.
mmoore5553 — 2012-03-21T09:09:48-04:00 — #7
One thing i see real quick is the header.php is not correct you have
without the ending tags.
it should be
<?php wp_head(); ?>
Also i would not put css in the header.
paul_wilkins — 2012-03-21T09:10:41-04:00 — #8
First of all, remove that noconflict part. It shouldn't be used unless you understand what it's used for and way.
Second, you have the jQuery library loading twice.
First it loads and then the sexy slider is loaded. Then you're loading the jQuery library again for something else, which results in destroying that first one (and the sexyslider that attached itself on to the original jQuery).
mmoore5553 — 2012-03-21T09:14:01-04:00 — #9
remove my comment as Paul said same thing i did.
sega — 2012-03-21T09:24:14-04:00 — #10
The header region is okay, it's done in PHP and echoing everything out instead. The CSS is there because of the slider. I don't want it there and once I see things working I will remove it and try and put it in an external file.
I've updated the scripts now. I removed the no conflict part and also remove the additional call to the jQuery library, which is now being loaded through functions.php. I am not too sure I've everything is done, but it's still broken.
paul_wilkins — 2012-03-21T09:28:54-04:00 — #11
The only thing that seems wrong now is that some of the slider init code has been inappropriately cut out.
Currently you have this:
You are missing a part there from when closing off the slider init code.
sega — 2012-03-21T09:34:59-04:00 — #12
okay, it's done and now it seams to be working fine, thanks!
So to sum things up it was the missing end bit that did it for me and maybe the additional jQuery?
Let me know if there is anything else, because I will have to put my site back on maintenance mode to get working on the blog section, and also fixing up the appearance of the slider.
mmoore5553 — 2012-03-21T09:36:36-04:00 — #13
Good catch paul on the script part. I did not even bother looking at it.
paul_wilkins — 2012-03-21T09:53:07-04:00 — #14
I didn't either until the other issues were resolved.
When the debugger claimed an unexpected end of input at line #1, that prompted a further investigation.
Step by step, resolving issues one by one. That's how these things are solved.
sega — 2012-03-21T11:27:41-04:00 — #15
Oh man, I got to get into jQuery more, thanks again Paul.
system — 2014-10-07T22:09:21-04:00 — #16
This topic is now closed. New replies are no longer allowed.