Question

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?

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top