1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- $(function(){
- // 筛选
- $('.a-btn').on('click',function(){
- var that = $(this);
- // $('.screen_box').hide();
- that.siblings('.screen_box').toggle();
- })
- // 省份选中效果
- $('.screen_city li').on('click',function(){
- var $this = $(this);
- $this.parent().siblings('.screen_are').animate({right:"0"});
- var oid = $this.attr('data-id');
- var _html = '<li data-id="0">不限</li>';
- $.ajax({
- type: "POST",
- url: "/public/getcity",
- data:{id:oid},
- dataType: "json",
- success: function(data) {//请求成功完成后要执行的方法
- if(data.code == 200){
- $.each(data.data,function(k,v){
- _html += '<li data-id="11">'+v.city_name+'</li>';
- })
- $('.screen_are ul').html(_html);
- }
- }
- });
- })
- //
- $('.screen_city li.cle').on("click",function(){
- var $this = $(this);
- $this.parent().siblings('.screen_are').animate({right:"-70%"});
- })
-
- // 选中
- $('.opt').on('click','li',function(){
- var that = $(this);
- var txt = that.text();
- that.parents('.screen_box').siblings('.a-btn').html(txt);
- that.parents('.screen_box').siblings('input').val(txt);
- that.parents('.screen_box').hide();
- })
-
- //报名验证及提交的调用
- PublicAction.AjaxSend(
- {
- CORID:'ap_btn', /*操作ID*/
- }
- );
-
- })
|