Hello,
Just wondering how the case select function works for Jquery -- I think I may be missing the mark a little. What i'm trying to do is case select on a given item and then perform a particular function. Seems that when I try this the case doesn't fire; I can alert and get the right HREF but the switch statement doesnt go anywhere. Is it the formulation of the switch, can I not use text but only comparisons? Any help is appreciated.
for example (assume document ready state).
target is a div on the page where new content is to load based on click.
button click //where buttons are jquery ui buttons and are <A href = "#">something</a>
variable = $(this).attr('href') // as this is a set of <a>
switch(variable){
case 'index.html': document.load('index.html');break;
case 'foo.html': ('#target').load('foo.html');break;
....
}