Move your code to some function and then call it on document ready and
onchange-event:
function myMethod(){
// my custom js code
}
$(document).ready(function(){
myMethod();
$("#properties div select").bind("change",myMethod());
});
--
jQuery HowTo Resource <http://jquery-howto.blogspot.com>
On Thu, Jan 8, 2009 at 2:19 PM, lsblsb <[email protected]> wrote:
>
> hi there,
>
> i want to execute the same lines of code when the site has finished
> loading AND when an onchange-event is fired.
>
> i tried something like
>
> $("#properties div select").bind("ready change",function(e){
> $("#properties div select").bind("load change",function(e){
>
> but this does not work :/
>
> can you tell me how to do something like that?
>
> thank you!
>