Search Results

Search found 106 results on 5 pages for 'cheeso'.

Page 5/5 | < Previous Page | 1 2 3 4 5 

  • How can I clear content without getting the dreaded "stop running this script?" dialog?

    - by Cheeso
    I have a div, that holds a div. like this: <div id='reportHolder' class='column'> <div id='report'> </div> </div> Within the inner div, I add a bunch (7-12) of pairs of a and div elements, like this: <h4><a>Heading1</a></h4> <div> ...content here....</div> The total size of the content, is maybe 200k. Each div just contains a fragment of HTML. Within it, there are numerous <span> elements, containing other html elements, and they nest, to maybe 5-8 levels deep. Nothing really extraordinary, I don't think. After I add all the content, I then create an accordion. like this: $('#report').accordion({collapsible:true, active:false}); This all works fine. The problem is, when I try to clear or remove the report div, it takes a looooooong time, and I get 3 or 4 popups asking "Do you want to stop running this script?" I have tried several ways: option 1: $('#report').accordion('destroy'); $('#report').remove(); $("#reportHolder").html("<div id='report'> </div>"); option 2: $('#report').accordion('destroy'); $('#report').html(''); $("#reportHolder").html("<div id='report'> </div>"); option 3: $('#report').accordion('destroy'); $("#reportHolder").html("<div id='report'> </div>"); after getting a suggestion in the comment, I also tried: option 4: $('#report').accordion('destroy'); $('#report').empty(); $("#reportHolder").html("<div id='report'> </div>"); No matter what, it hangs for a long while. The call to accordion('destroy') seems to not be the source of the delay. It's the erasure of the html content within the report div. This is jQuery 1.3.2. EDIT - fixed code typo. ps: this happens on FF3.5 as well as IE8 . Questions: What is taking so long? How can I remove content more quickly? Addendum I broke into the debugger in FF, during "option 4", and the stacktrace I see is: data() trigger() triggerHandler() add() each() each() add() empty() each() each() (?)() // <<-- this is the call to empty() ResetUi() // <<-- my code onclick I don't understand why add() is in the stack. I am removing content, not adding it. I'm afraid that in the context of the remove (all), jQuery does something naive. Like it grabs the html content, does the text replace to remove one html element, then calls .add() to put back what remains. Is there a way to tell jQuery to NOT propagate events when removing HTML content from the dom?

    Read the article

  • Why does this static factory method involving implied generic types, work?

    - by Cheeso
    Consider public class Tuple<T1, T2> { public Tuple(T1 v1, T2 v2) { V1 = v1; V2 = v2; } public T1 V1 { get; set; } public T2 V2 { get; set; } } public static class Tuple { // MAGIC!! public static Tuple<T1, T2> New<T1, T2>(T1 v1, T2 v2) { return new Tuple<T1, T2>(v1, v2); } } Why does the part labeled "MAGIC" in the above work? It allows syntax like Tuple.New(1, "2") instead of new Tuple<int, string>(1, "2"), but ... how and why? Why do I not need Tuple.New<int,string>(1, "2") ??

    Read the article

  • emacs debugger: how can I step-out, step-over ?

    - by Cheeso
    I don't know why I'm having so much trouble groking the documentation for the elisp debugger. I see it has a commands to "step-into" (d). But for the life of me, I cannot see a step-out or step-over. Can anyone help? If I have this in the Backtrace buffer: Debugger entered--returning value: 5047 line-beginning-position() * c-parse-state() * byte-code("...") * c-guess-basic-syntax() c-show-syntactic-information(nil) call-interactively(c-show-syntactic-information) ...where do I put the cursor, and what key do I type, to step out of the parse-state() fn ? by that I mean, run until that fn returns, and then stop in the debugger again.

    Read the article

  • jQuery accordion: is there a way to make the scrollbar fit the displayed panel?

    - by Cheeso
    I have a jQuery accordion (jQuery 1.3.2, jQuery UI 1.7.2), with between 3-12 content panels. Some of the content panels are large, and have lots of content. some are small, and have only a little. When I expand any of them, the scrollbar on the div containing the accordion (it's got css overflow: auto;) is set as if the largest of the panels is expanded. Let's say I have 3 panels. One has 3 lines of content, one has 20 lines, and one has 1000 lines. If I expand either of the first two, the scrollbar indicator gets very very tiny, and moves all the way to the top, even though there is nothing worth scrolling. Is there a way to fix this? It seems like autoHeight:false ought to do it, but that doesn't work for me.

    Read the article

  • Is there a greasemonkey for IE? or, how do I get a website to use MSXML6 instead of MSXML5 ?

    - by Cheeso
    I don't know greasemonkey but I think it is a way to script or extend Firefox. Is there a greasemonkey for IE? for example: There's a website that is hosting a page that asks me to install MSXML5.0. I don't want MSXML5.0. I was thinking if I had a greasemonkey capability (if it is what I think it is), I'd be able to write a script that changes the 5.0 to 6.0 and everything would be cool. I know there's a way to do this kind of thing in Fiddler, if I have it running, and set up as a proxy.

    Read the article

< Previous Page | 1 2 3 4 5