Skip to main content
Code Review

Return to Answer

Added code copied from link
Source Link
Michael K
  • 2.9k
  • 1
  • 22
  • 24

Try this sample

copied from jsfiddle.net pastebin:
html html:

<select>
 <option val="#">---</option>
 <option val="#paris">paris</option>
</select>
<br/>
<select>
 <option val="#">---</option>
 <option val="#mexico">mexico</option>
</select>
<br/>
<select>
 <option val="#">---</option>
 <option val="#london">london</option>
</select>

​js:

//if (typeof $.uniform !== "undefined") {
 //$.uniform.update("select.jump");
 $("select").each(function(){
 $(this).change(function() {
 alert($(this).find("option:selected").val());
 window.location = $(this).find("option:selected").val();
 });
 });
//}​​

uncomment your function parts

Try this sample

copied from jsfiddle.net pastebin:
html:

<select>
 <option val="#">---</option>
 <option val="#paris">paris</option>
</select>
<br/>
<select>
 <option val="#">---</option>
 <option val="#mexico">mexico</option>
</select>
<br/>
<select>
 <option val="#">---</option>
 <option val="#london">london</option>
</select>

​js:

//if (typeof $.uniform !== "undefined") {
 //$.uniform.update("select.jump");
 $("select").each(function(){
 $(this).change(function() {
 alert($(this).find("option:selected").val());
 window.location = $(this).find("option:selected").val();
 });
 });
//}​​

uncomment your function parts

Try this sample

html:

<select>
 <option val="#">---</option>
 <option val="#paris">paris</option>
</select>
<br/>
<select>
 <option val="#">---</option>
 <option val="#mexico">mexico</option>
</select>
<br/>
<select>
 <option val="#">---</option>
 <option val="#london">london</option>
</select>

​js:

//if (typeof $.uniform !== "undefined") {
 //$.uniform.update("select.jump");
 $("select").each(function(){
 $(this).change(function() {
 alert($(this).find("option:selected").val());
 window.location = $(this).find("option:selected").val();
 });
 });
//}​​

uncomment your function parts

Try this sample

copied from jsfiddle.net pastebin:
html:

<select>
 <option val="#">---</option>
 <option val="#paris">paris</option>
</select>
<br/>
<select>
 <option val="#">---</option>
 <option val="#mexico">mexico</option>
</select>
<br/>
<select>
 <option val="#">---</option>
 <option val="#london">london</option>
</select>

​js:

//if (typeof $.uniform !== "undefined") {
 //$.uniform.update("select.jump");
 $("select").each(function(){
 $(this).change(function() {
 alert($(this).find("option:selected").val());
 window.location = $(this).find("option:selected").val();
 });
 });
//}​​

uncomment your function parts

Try this sample

uncomment your function parts

Try this sample

copied from jsfiddle.net pastebin:
html:

<select>
 <option val="#">---</option>
 <option val="#paris">paris</option>
</select>
<br/>
<select>
 <option val="#">---</option>
 <option val="#mexico">mexico</option>
</select>
<br/>
<select>
 <option val="#">---</option>
 <option val="#london">london</option>
</select>

​js:

//if (typeof $.uniform !== "undefined") {
 //$.uniform.update("select.jump");
 $("select").each(function(){
 $(this).change(function() {
 alert($(this).find("option:selected").val());
 window.location = $(this).find("option:selected").val();
 });
 });
//}​​

uncomment your function parts

Source Link
deerua
  • 126
  • 2

Try this sample

uncomment your function parts

default

AltStyle によって変換されたページ (->オリジナル) /