문제

I'm using jquery:

$(document).ready(function () {
    $(".content div").hide();

    $(".content h4").click(function(){
        $(this).next("div").slideToggle("fast").siblings("div:visible").slideUp("fast");
        $(this).toggleClass("active");
        $(this).siblings("h4").removeClass("active");
    });
});

This slides different parts of page into one line which is shown then by clicking on it. All fine till here.

I have DropDownList which gets populated from SQL DB. All fine.

I also have some TextBoxes, that are supposed to be populated on SelectedIndexChanged from DDL, which kind of works, but the problem is, page gets refreshed and my jquery kicks in, closing the current viewpoint of page. User has to click through again to get to the populated textboxes.

How could I prevent JQuery to kick in and closing my divs when postback from DDL happens?

OR! Is there a way to populate textboxes, using selected value from DDL, without postback enabled on DDL?

올바른 솔루션이 없습니다

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top