Executing javascript code stored in an element attribute using jQuery
        Posted  
        
            by Moak
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Moak
        
        
        
        Published on 2010-05-11T04:43:06Z
        Indexed on 
            2010/05/11
            4:54 UTC
        
        
        Read the original article
        Hit count: 365
        
say there is an element #button with the attribute onmousedown containing some random javascript how could I trigger the js in that element attribute using jQuery?
j("#otherbutton").click(function(){ 
         var script =  j("#button").attr("onmousedown"); //what now? 
});
© Stack Overflow or respective owner