[jQuery] Re: Add a second trigger in this function

2010-01-06 Thread Johan Borestad
() {           $(div.tv).trigger('hover');     }); On Jan 5, 4:33 pm, Johan Borestad johan.bores...@gmail.com wrote: Hi! There are a number of nice implementations you could use for this. Example the jQuery trigger.http://docs.jquery.com/Events/trigger But for now, the simpliest solution

[jQuery] Re: removeClass() fires before anything else in a series of functions when I need it to fire last.

2010-01-05 Thread Johan Borestad
Hi! This is due to that the fadeOut function is asynchronous (and that's a good thing, otherwise the entire browser would freeze while animating). To solve your problem you could use a callback. That's a second parameter to the fadeOut method as a anonymous function

[jQuery] Re: Add a second trigger in this function

2010-01-05 Thread Johan Borestad
Hi! There are a number of nice implementations you could use for this. Example the jQuery trigger. http://docs.jquery.com/Events/trigger But for now, the simpliest solution is just to add another selector like this $('div.example, div.tv').hover( . / Johan On Jan 5, 8:33 pm, Jordan

[jQuery] Re: Change opacity of item with class of selected

2010-01-05 Thread Johan Borestad
Hi Paul! This is a case where you really don't even should use Javascript, unless you're trying to do some fancy animations. Rely entirely on CSS with a simple css-rule #thumbs li.selected { filter:alpha(opacity=50); opacity:0.50; } This will also be much much faster than any other

[jQuery] Re: Jquery color animation problem

2010-01-05 Thread Johan Borestad
Hi! This is a known Internet Explorer bug (and a very annoying one aswell). Just adding a background color or image to the container element will fix this. / Johan On Jan 5, 9:43 am, Md. Ali Ahsan Rana ranacser...@gmail.com wrote: I am trying to do it: $(this).animate({opacity:1},700); it

[jQuery] Re: jQuery Equivalent of Prototype Function.bind

2010-01-05 Thread Johan Borestad
I'm not that good at Prototype at all, but wouldn't this be equivalent? setTimeout(function(){ myFunction.apply(this) } , 1000) / Johan On Jan 5, 3:43 pm, Bruce brucejin...@gmail.com wrote: Is there a jQuery way of doing this Prototype bind? var func = myFunction;

[jQuery] Re: css editor with jquery

2010-01-02 Thread Johan Borestad
How do you internally represent your edited data? I didn't read the entire fonte.js script, but this should probably be solved by a representing each editable areas as separate objects with different id's. Then serialize everything to a JSON-object and post it to your backend where you could save

[jQuery] Re: live event with instant execution

2009-12-25 Thread Johan Borestad
Hi! I'm not really sure of what you're trying to do, but the main problem is that you're not passing all selectors to your flexinInitialiseElement method. Maybe somethingl like this will help you. It's iterationg through all dom nodes and passing them to flexinInitialiseElement.

[jQuery] Re: Attaching an event to a non-existing element?

2009-12-25 Thread Johan Borestad
I would really recommend the listen plugin for jQuery by Aaron Flesler. It's an excellent plugin that also fixes the focus/blur bug in IE6. Have been using it for over two years now (before live() was implemented), and it also have good support for the dblclick event:

[jQuery] Re: ie6 and ie7 don't load image well when using Cycle plugin

2009-03-30 Thread johan . borestad
I can only guess that you've set the loop-delay too soon, and don't control if the image have been loaded. That would explain why it looks better the next time you arrive, since the image will be in the browsercache. There's a couple of ways to go around this: 1) Load the cycle plugin onload

[jQuery] Re: Images shrinking?!?!

2009-03-30 Thread johan . borestad
1) Your site doesn't validate correct 2) You're using very large images, around 450kb on frontpage = causing slowdowns, especially in IE 3) Set an correct hardcoded height/width on the images, either in the tag directly or width CSS. 4) You seems to be using some kind of filter on the footer

[jQuery] Re: Counting Divs (IE6)

2009-03-30 Thread johan . borestad
Does your entire page validate? No mysterious unclosed divs somewhere? Johan On 29 Mar, 18:16, lardlad chris.mloa...@gmail.com wrote: I am having a problem counting the number of divs inside a container,         var cellCount = $(#cellCont).children().length; cellCount is coming up

[jQuery] Re: ie6 and ie7 don't load image well when using Cycle plugin

2009-03-30 Thread johan . borestad
Yes! jQuery support this aswell. It adds every onload/domready event in a queue. $(window).load(function(){ // do stuff onload }) $(window).load(function(){ // do other stuff onload }) But you should really look into some pattern instead. A relly simple and good pattern is the Module Pattern

[jQuery] Fix for broken nextUntil

2009-03-25 Thread johan . borestad
); } } }); return this.pushStack( match, arguments ); } Best regards Johan Borestad

[jQuery] Re: window unload event too slow - delay when navigate away from the page

2009-03-25 Thread johan . borestad
Hi! If you have a lot of selectors, you should probably use Event Delegation and wait for the event to bubble instead. A good example is if you have a huge table and events on every row. Instead of using $('table a').bind('click', function(){ alert('do stuff!!') }) , you just bind ONE event on

[jQuery] Re: window unload event too slow - delay when navigate away from the page

2009-03-25 Thread johan . borestad
Typo error above, a lot of selectors should be a lot of events

[jQuery] Re: HowTo Select first two characters of an li and hide them

2009-03-25 Thread johan . borestad
Something like this maybe $('div.multiple_options li').each(function(){ var text = $(this).html() $(this).html( text.replace(/\d+\s+/,'') ) }) But please remove that ugly br inside your li tags and make them block elements instead to achieve the same effect. / Johan On 25 Mar, 14:03,

[jQuery] Re: Request for a simple basic Ajax call with loading gif

2008-02-18 Thread johan . borestad
var loader = $('div.ajaxloader').fadeIn(500) $('#ajax-placeholder').load('/content_to_load.php', function(){ // This is a callback function loader.fadeOut(500) }) Something like that. The div.ajaxloader is for you to style correctly with css to make it appear in the middle of the page, or