Monday, 5 August 2013

Change Border width and Color on Dropdown selected item

Javascript funtion :

 <script type="text/javascript">
$("#evt_width").change(function() {
    $("#someDiv").css("border-width", $(this).val());
}).change();
</script>​
<script type="text/javascript">
$("#evt_color").change(function() {
    $("#someDiv").css("border-color", $(this).val());
}).change();
</script>​

in this evt_witdh is dropdown for width selection and evt_color is dropdown for color selection and 

someDiv is div/panel which border will changed.

No comments:

Post a Comment