Results 1 to 11 of 11
Thread: select
Hybrid View
-
11th February 2010 16:44 #1
select
jobs.bg , .
:
o :<select id="selectCategory">
<option>1</option>
<option>1</option>
<select>
<select id="SelectedCatogories" multiple="multiple">
</select>
, , .Code:$('#selectCategory option').click(function() { $('#SelectedCatogories').append('<option>'+$(this).text()+'</option>'); }
//1//
/* $(this).appendTo('#SelectedCatogories'); */
//2//
$('#SelectedCatogories').html(thisValue) ;
//3//
//$('#SelectedCatogories').append($(this)) ;
.
-
11th February 2010 17:25 #2
-
11th February 2010 17:40 #3
. , . .
:
Firefox.Code:$(function() { $('#selectCategory option').click(function() { if($(this).attr('value') != 0) { if($(this).attr('disabled') != true && $(this).text() !='') { $(this).clone().appendTo('#SelectedCatogories'); $(this).attr('disabled','disabled'); } } }); $('#remove').click(function() //input[type="button"] { var value = ""; $('#SelectedCatogories :selected').each(function(i, selected){ value = $(selected).attr('value'); $("#selectCategory option").each(function() { if(value == $(this).attr('value')) { $(selected).remove(); $(this).attr("disabled",false); } }); }); }); });Last edited by bombov; 11th February 2010 at 17:52.
-
11th February 2010 21:19 #4
?
:
1. -"", if-.
:
, , option-, , .Code:$('#selectCategory option')
2. , .
, .
-
12th February 2010 11:16 #5
.
:
http://jeradbitner.com/content/jquer...select-options
FF.Code:$('#selectCategory option').click(function() { alert('option was Clicked'); });
:
<select id="selectCategory" onchange="selectChange()">
...
</select>
: http://82.103.68.218/Obqvi/userPanel/
:
Code:$(function() { $('#remove').click(function() { var value = ""; $('#SelectedCatogories :selected').each(function(i,selected){ value = $(selected).attr('value'); $("#selectCategory option").each(function() { if(value == $(this).attr('value')) { $(selected).remove(); $(this).attr("disabled",false); $(this).css('color','black'); // IE6 } }); }); }); }); function selectChange() { $('#selectCategory :selected').each(function() { if($(this).attr('value') != 0) { if($(this).attr('disabled') != true && $(this).text() !='') { $(this).clone().appendTo('#SelectedCatogories'); $('#multiSelectDiv').fadeIn('slow'); $(this).attr('disabled','disabled'); $(this).css('color','#6d6d6d'); // IE6 } } });
-
12th February 2010 18:38 #6
-
12th February 2010 20:33 #7
-
16th February 2010 16:31 #8Registered User
Join Date: Jul:2005
Location: Sofiq
Posts: 2,798
this onchange="selectChange(this, $(''#SelectedCatogories'))". , this $(this), , jquery. selectChange: function selectChange(from, to) { .. }, jquery.
-
16th February 2010 17:40 #9
-
17th February 2010 15:33 #10Registered User
Join Date: Jul:2005
Location: Sofiq
Posts: 2,798
-
17th February 2010 16:16 #11




Reply With Quote

Lenovo ThinkPad 15 IdeaPad 15
5th May 2023, 22:16 in