use of .size() and don't work in my project?
Did you can help me that why don't work following code in my project?
My project: see this link -> please go to select box or input box and select or typed value.var length_pa = $('#pagination a').size();
if(length_pa >= 16){
$('#prev_pag, #next_pag').show();
$('#pagination').css('float','left')
开发者_如何学C }else{
$('#prev_pag, #next_pag').hide();
}
if(length_pa == 0){
alert('0000000000')
$('#hesar_number').hide();//.css('display','none');
}
EDITE: Sorry, my mistake in typing the code here. Now What is cause problem?
$('#hesar_number')hide();
should be:
$('#hesar_number').hide();
And you don't have an element with ID clock which is throwing another error in show
There's a typo in your JS, which is killing the script:
$('#hesar_number')hide();//.css('display','none');
^--- missing a .
Absolutely ANYTIME you are working with Javascript and run into trouble, check your browser's JS console (shift-ctrl-J usually). This error would've jumped right out at you if you had.
精彩评论