i am using jquery form plugin to upload the images without page reload but it seems that it is not possible to add a click function.i dont know what im doing wrong?
code:
$(document).ready(function () {
var options = {
url:'img_handler.php',
type:'POST',
success:function(data) {
//all the events are handeled properly
}
};
$(".post_the_img-sing").click(function () {///the probem is over here
$('#post_image_to_stream-single').ajaxForm(options);
});
});
its not possible for me to have the .post_the_img_sing
button within the form 我无法在.post_the_img_sing
体内使用.post_the_img_sing
按钮
found out that i could use a submit button which is hidden then just add a click event to the div .post_the_img_sing
发现我可以使用一个隐藏的提交按钮,然后将一个click事件添加到div中.post_the_img_sing
Looks fine to me, as far as this code goes... Have you checked the class names? Because in your code you have .post_the_img-sing
but then you have written .post_the_img_sing
...
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.