[jQuery] Re: Click event outside of an element

2009-11-21 Thread mofle
Here you go: $(document).click(function(){ alert('clicked outside classname'); }); $('.classname').click(function(e){ e.stopPropagation(); }); First you bind a click event to the document with the action you want. Then you bind the classname to stop it from propagate up to the d

[jQuery] Re: Cant able to execute JQuery in ASP.NET

2009-11-21 Thread mofle
Add: return false; below the $("p").show("slow"); Like this: $("button").click(function() { $("p").show("slow"); return false; }); On Nov 20, 7:03 pm, Chinna wrote: > Hi guys, > > I have downloaded JQuery . > > <%@ Page Language="C#" AutoEventWireup="true" > CodeFile="Default.a

[jQuery] Re: adding event to dynamic element

2009-11-21 Thread mofle
You're doing it wrong, and you don't need to use live. I tested this, and it works: var $results = $('#ajaxSearchResults'); $('

[jQuery] Re: Only show 5 list item, hide the rest?

2009-02-17 Thread mofle
> multiple IE's? Another question would be, which version of jQuery are > you using and have you cleared the ie6 cache? > > Sorry that didn't work for you. > > -Trey > > On Feb 13, 9:56 am, tres wrote: > > > I'll install multiple IE's and get

[jQuery] Re: Only show 5 list item, hide the rest?

2009-02-12 Thread mofle
Thanks, you're a genius. But it didn't work in IE6, where I need it. Any solution? On Feb 12, 12:32 am, tres wrote: > Oh and also Safari 3.1.2 Windows. > > -Trey

[jQuery] Expand and collapse a list

2009-02-11 Thread mofle
Hi, I'm trying to create a collapsible list, that only shows the first 5 items, and hides the rest. If click the link it will slide in the rest of the list items, and if I click the link again it will hide the expanded list items. How can I do that? and is there a better way to do this? h

[jQuery] Re: Only show 5 list item, hide the rest?

2009-02-11 Thread mofle
        Item 9 >         Item 10 > > > $(document).ready(function(){ >    var list = $('#myListExt'); >    list.hide(); > >    $('a#myList-toggle').click(function() { >       list.slideToggle(400); >       return false; >    }); > >

[jQuery] Re: Only show 5 list item, hide the rest?

2009-02-10 Thread mofle
)'); >     list.hide(); >     $('a#myList-toggle').click(function() { >        list.slideToggle(400); >        return false; >     }); > > by(e) > Stephan > > 2009/2/10 mofle : > > > > > Hi. > > > I have an unordered list like this

[jQuery] Only show 5 list item, hide the rest?

2009-02-10 Thread mofle
Hi. I have an unordered list like this one: Item 1 Item 2 Item 3 Item 4 Item 5 Item 6 Item 7 Item 8 Item 9 Item 10 I want to only show the 5 first items, and hide the rest. I have a link to toggle the hidden elements on and off: Show the rest I use the slideToggle(400) to slide the rest of