- This topic is empty.
Viewing 8 posts - 1 through 8 (of 8 total)
Viewing 8 posts - 1 through 8 (of 8 total)
- The forum ‘JavaScript’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Home › Forums › JavaScript › jQuery.load() + WordPress = fail
This of course works perfectly fine in practice when it is stand alone and has nothing to do with wordpress…but when ported over there are obviously complications. How can i simply get my dynamic dropdowns to change when using wordpress?!
PLEASE help!
jQuery.noConflict();
jQuery(document).ready(function($) {
$("#state").change(function() {
$("#county").load("http://wwwvibrantusa.zippykid.it/wp-content/themes/medica/" + $(this).val() + ".php");
});
});
Here is the fiddle proving it SHOULD work…
http://jsfiddle.net/M5XkX/
I am guessing there is some kind of conflict, perhaps someone can help?!
Is that the entirety of the code? If so, you haven’t closed everything properly. There are two open curly brackets but only one closed.
TheDoc is right, the code in jsFiddle works because it’s not the same as what you have in the post
Is it possible to link us to your site or is it running locally?
Very clean looking professional site, I like it
Where is this drop down? *EDIT found it
Which script is this function in? there’s quite a few loaded
Hi sorry for the delay, I fell asleep :P
There’s an error in general.js causing it to break
change
if ($(this).scrollTop() != 0) {
to this
if ($(this).scrollTop() !== 0) {
I think there might be more though :S
For the moment try removing it from general.js and inline it on the page to rule out external errors
That stupid little blank space seems to go in there when copy/pasting from jsfiddle. It will completely break the code.