Thank you both :-) Divavocals you are right. I removed
Code:
<script src="'.DIR_WS_TEMPLATES . $template_dir . '/jscript/jquery-1.10.2.min.js"></script>
it now looks like:
Code:
$field = '<script type="text/javascript">
                 $(function(){
                    $("#attrib-'.$tmp_attribID.'").on("click", function(){
                        $("#SBA_ProductImage").attr("src", $(this).find(":selected").attr("data-src"));
                    });
                });
       </script>';
And is still worked.
mc12345678 thanks for telling me wat the snippet actually does.