Load div content from other pages depending on select choice
I try to load content into my site from other pages (in same site) but its not working.
I made four pages in same root:
In Index I have a select element with ID "selectchoice":
I also have a div in Index with id "get_content":
<option>Select a choice</option>
When I change the select element to option 1 or 2 or 3 I want to load one.html or two.html or three.html into the div get_content.
Then I place this code in the header if Index.html, after the jQuery-file link.
And then I run the site (on a server with other load-scripts thats works on the same site), but its not working. What am I doing wrong? :/
Kinda new to scrips and programming so do not be suprised if there is any standard error.
Is anybody find the error?
Trouble when load.in ui-slider to div with jQuery
This is kinda a continuation on my thred about load in content from a external page to a div depending on choice in a select-box.
I use this code to load in content:
var selectedOption = $('#select_box :selected').val();
$containerDiv = $('#div_where_content_loads_in');
case "Option1":$containerDiv.load( "page.html#div1" ); break;
case "Option2":$containerDiv.load( "page.html#div2" ); break;
case "Option3":$containerDiv.load( "page.html#div3" ); break;
case "Option4":$containerDiv.load( "page.html#div4" ); break;
When this code tries to load in a div containing a ui-slider element the graphics dont show up.
The slider is there but its hidden becuse if I place one slider in the page from pageload/start (visible) and one slider in the div that gets loaded (invisible), then give them same ID so the slide handle-bars move at the same time (when only moving one), in the exaxtly moment of moving the visible slider the invisible slider shows up.
Its feels like it dont have any CSS rules when loaded in and then it gets the same rules at the other slider when its have to work.
Have anybody here experienced anything similar before?
Sorry for some incorrect english.