jquery - submit of a bunch of slider values

So I have 5 sliders on a web page. Any brilliant solutions as to how to grab their values and submit them to the server (rails in this case) (ajax is ok)? One solution is to use hidden fields and on each slider change to update the corresponding hidden field. Seems kinda lame. The sliders all have a class of "slider", so I was hoping for some cool approach like var json = $(".slider").toJSON(); $.ajax({ url: "myurl", processData: false, data: json, success: handleResponse } which would take all the values and put them in a JSON structure. However, that doesn't work :( Other ideas?

以上就是jquery - submit of a bunch of slider values的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » jQuery 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准