0

I have written jQuery like below lines of code

     var prmvar = window.Sys.WebForms.PageRequestManager.getInstance();
     prmvar.add_endRequest(function () {
         var j = jQuery.noConflict();
         j(document).ready(function () {
             j('#pagination').jcarousel({

             });
             var count = $("#pagination li").size();
             if (count < 10) {
                 alert(count)
                 j(".jcarousel-prev").css('display', 'none');
                 j(".jcarousel-next").css('display', 'none');
             }
         });
     });

It does not work in update panel. Please help me !!!

I added the following configuration in web.config file

      <system.web.extensions>
      <scripting>
      <scriptResourceHandler enableCompression="false" enableCaching="true" />
      </scripting>
      </system.web.extensions>

It still doesnot work !!!

Nida
  • 1,672
  • 3
  • 35
  • 68

1 Answers1

0

I don't know if this code will work or not,but you can try this.

j(document).ready(function () {
        var j = jQuery.noConflict();
        j('#pagination').jcarousel({

        });
        var count = $("#pagination li").size();
        if (count < 10) {
            alert(count)
            j(".jcarousel-prev").css('display', 'none');
            j(".jcarousel-next").css('display', 'none');
        }
    });

    var prmvar = window.Sys.WebForms.PageRequestManager.getInstance();
    prmvar.add_endRequest(function () {
        var j = jQuery.noConflict();

            j('#pagination').jcarousel({

            });
            var count = $("#pagination li").size();
            if (count < 10) {
                alert(count)
                j(".jcarousel-prev").css('display', 'none');
                j(".jcarousel-next").css('display', 'none');
            }
    });
KanisXXX
  • 757
  • 7
  • 19