0
这是我的jsfiddle当一个变量中有空间,股利是不可折叠
http://jsfiddle.net/nvx4tkLt/8/
我noticied,如果变量,它出现了空间,股利是不可折叠。
例如在jsfiddle中,如果您点击兄弟首页div不可折叠。
当在DIV clciked这是正在执行
$(document).on('click', '.lielement', function() {
var locationname = $(this).attr("id");
if($(this).find('.restListings').length)
$(this).find('.restListings').remove()
else
displayingRestaurantsForLabel(locationname);
});
function displayingRestaurantsForLabel(locationname)
{
showRestaurantDetailsByLocation(restaurantsbylocation,locationname);
}
function showRestaurantDetailsByLocation(response, locationname) {
var responsedata = JSON.stringify(response);
$("#restmenu").find('.restListings').remove();
var ulhtml = $('<ul class="restListings"></ul>');
var divhtml = $('<div class="inner-intit"><sub class="sub">Yours Favorite Restaurant</sub></div>');
divhtml.append('<br>');
for (var i = 0; i < response.length; i++) {
divhtml.append('<li class="grayOut-Rest innerChild"><h6> '+response[i].vendor_name+'</h6></li>');
existingrestaurants.push(response[i].vendor_id);
}
ulhtml.append(divhtml);
$("#restmenu").find('#'+locationname.trim()).append(ulhtml);
}
有谁请让我知道什么是问题的代码?
在此先感谢。
非常感谢你对这个问题的解释。 – Pawan 2014-09-30 07:11:31