[jQuery] Re: Overriding extended plugin variables

2008-03-25 Thread meeboo
Well it seems as if you can't override values with null as options. Is this expected behaviour? meeboo wrote: > > Hi all > > I have a plugin which has a couple of variables which can be overriden > like this: > $.fn.doStuff.defaults.classOdd = 'oddClass';

[jQuery] Re[jQuery] moving dynamically added elements

2008-02-15 Thread meeboo
Hey all How can I when dynamically adding a new element also bind a click event to another element which removes it? //Here's what I have so far, redundant code is omitted $.fn.addElement = function(options) { //Redundant code omitted this.prepend($elementToAdd); //dynamically create

[jQuery] Re: Dynamically prepending elements to a div

2008-02-14 Thread meeboo
Problem solved by cloning the element which is to be added, like this. $("#adder").click(function() { var $elementToBeAdded = $('#content').clone(); $('#container').prepend($elementToBeAdded); }); easy peasy meeboo wrote: > > Hey all &g

[jQuery] Re: Dynamically prepending elements to a div

2008-02-14 Thread meeboo
Solved it, it seems as if prepend moves the element instead of copying it. So when trying to add the element a second time you just end up moving the element to the exact position it's located. meeboo wrote: > > Hey all > > In this example, how come I can't prepend th

[jQuery] Dynamically prepending elements to a div

2008-02-14 Thread meeboo
Hey all In this example, how come I can't prepend the paragraph to the div more than once? $("#adder").click(function() { $('#container').prepend($('#content')); }); # Add content content -- View this message in context: http://www.nabble.com/Dynamically-prepending-elements-to-a-d

[jQuery] Re: Simple RSS reader plugin

2008-02-08 Thread meeboo
Just what I needed. Thanks! Francesco Vivoli wrote: > > Hi all > > I've just wrote about a simple wrap-up plugin of the idea given in > http://www.nabble.com/RSS-Feed-Reader-to4997503s27240.html this post . > > it basically fills a news box with the contents of an rss feed. > In case someone

[jQuery] toggleClass weird behaviour

2008-02-08 Thread meeboo
Hey all! I'm wondering why the following code will toggle the div 'divRed' to a different color, but it won't toggle the color for 'divGreen'. div {height: 100px; width: 100px;} .divRed {background-color: red;} .divGray {background-color: gray;} .divGreen {ba