[jQuery] select after AJAX

2009-02-08 Thread Piotr

I am trying to make chained select. I have three selects: type,
category, product. I created ajax response conected to change of type
or category. When I change type select (list types is static, taking
from base by php), ajax give mi the list of category. It works. But
after this, when I want to change category (after taking of list of
category)  second  function AJAX don't responses and don't gives mi
the list of  the product.
It looks like the function $().html(html) don't refresh the DOM
structure.
How to refersh injection html to be parsed by JS.


[jQuery] Disabling behaviour definded in html

2008-12-28 Thread Piotr Jakubowski

Hi,

I do not have a huge experience with jquery and therefore my question
may seem a little bit childlish for you :). Nevertheless I have spend
so much time trying to find the solution that you are my last hope.

The problem is that I have the html element - let's say textfied with
specified onkeyup attribute.
Example

input id=text size=30 onkeyup=alert('hello')/

What I want to do is to have the function that under special
circumstances would disable behaviour defined in html.

Thanks in advance.




[jQuery] Re: 1.1 → 1.2. Interface's problems with j Query.dequeue

2007-09-16 Thread Piotr Petrus
Thanks Karl, I'll look into that.

To be honest, I don't like Interface at all. I admire knowledge of its
developers and I think that they have done tremendous work which had
to be done – but is this a buggy library… :(

I'm really looking forward to jQuery UI. It should be released today, right? :)
--
Piotr Petrus http://riddle.pl


[jQuery] Re: NEWS: jQuery 1.2 Released

2007-09-11 Thread Piotr Petrus

Can somebody throw me a link to jQuery Minified desc? :
--
Piotr Petrus http://riddle.pl


[jQuery] Re: Problem: Event on image load in IE

2007-09-10 Thread Piotr Petrus

Have you tried .bind('load', function() {})? Load() is also
responsible for ajax calls, maybe IE gets it wrong in this case
--
Piotr Petrus http://riddle.pl


[jQuery] Re: Expanding tree + styling

2007-09-10 Thread Piotr Petrus

jQuery is recursive by default. $('ul.parent  li').prepend(yourElement);
--
Piotr Petrus http://riddle.pl


[jQuery] Re: Expanding tree + styling

2007-09-10 Thread Piotr Petrus
Blah, I meant $('li.parent').prepend(……)
--
Piotr Petrus http://riddle.pl


[jQuery] Re: Firing function on any form element changing?

2007-09-10 Thread Piotr Petrus

You can use $(myform).find('input, textarea, select') but var
$('input, textarea, select', myform) is also correct. I'd seek an
answer in myform element. If it's undefined it means it doesn't exist,
so there's an error in your code or in algorithm.
--
Piotr Petrus http://riddle.pl


[jQuery] Re: [REMINDER] jQuery Detection Script

2007-09-09 Thread Piotr Petrus

Is it possible to exclude pages where window.parent is defined? Take a
look how script behaves on GMail, I think it's too bloated way to do
checks.
-- 
Piotr Petrus http://riddle.pl


[jQuery] Re: $.css() values from jQuery created objects return undefined in Opera

2007-09-09 Thread Piotr Petrus

Address of website please? ;)
--
Piotr Petrus http://riddle.pl


[jQuery] Re: selected html include the selector tag?

2007-09-09 Thread Piotr Petrus

Eridius, use .outerHTML and its workaround for Gecko, from what you've
written it's clear that you need this. ;)
--
Piotr Petrus http://riddle.pl


[jQuery] Re: Quite big performance issue

2007-09-08 Thread Piotr Petrus
Hello everyone

I'd like to apologize for the way I presented my problem – as Charles
wrote, it'd be nicer to see just the node addition. It spawns a lot of
communication problems I think, because the keyup events working on
whole tree and session handlers are actually fast as hell, and the
only thing that is terribly slow is the addition of new nodes (in a
exponential way, mind you), as you can probably tell.

To prove it, I commented the event handlers with calcFields and so on,
leaving only main 3 event for adding nodes and deleting it. It's still
the same.

I'm quite worried because I tried to optimize css queries and it still
fails – adding 10th, 11th, 12th… node is still more and more slower.
It's not like I have to wait 1 sec because I do a lot of operation
there. It takes 5, 10, 29 and even 70 sec later and I'm afraid to see
how bad it can be later. I just don't get it how the change can be
exponential because I'm using quite simple code.

I'll try stripping down everything except my main problem and show it
to you later if the issue is still there. Thanks for your time though,
appreciate it.
--
Piotr Petrus http://riddle.pl


[jQuery] Re: Quite big performance issue

2007-09-08 Thread Piotr Petrus

Charles, when you make CSS for webpage and you use em values instead
of pixels, it's quite difficult to remember real (pixel) values,
because of em's nature.

body - you set font-size as 1em and it's 16px
within that body you have div#header and you set font-size to 0.5em
and that's 8px
within #header you have paragraph and you set font-size to 1em, but
it's not 16px. It's 8px.

That's why I need a tree. This tool is used by many people as I can
tell from incoming links, save count at del.icio.us and many mails.
More importantly - I created it beacuse I was tired of calculating
this stuff by myself and taking notes on paper. ;) You should read
about em values if you don't know why they're important :)

I guess I'll have to rewrite this tool to plain DOM methods again. Or
at least this frickin' node addition. :)
--
Piotr Petrus http://riddle.pl


[jQuery] Re: Find textNodes and wrapping it with a tag

2007-09-08 Thread Piotr Petrus

Wow, now that's big. I'd try just this:

$('ul  li').each(function() {
if (this.firstChild  this.firstChild.nodeType == 3) {
$(this.firstChild).wrap('a href=/a')
}
})
--
Piotr Petrus http://riddle.pl


[jQuery] Re: Find textNodes and wrapping it with a tag

2007-09-08 Thread Piotr Petrus

jQuery originally works on element nodes, but text nodes are rightful
members of DOM too. :)
Glad I could help.
-- 
Piotr Petrus http://riddle.pl


[jQuery] Re: code not working in IE... don't know why

2007-09-07 Thread Piotr Petrus

Have you tried replacing

window.onload = function() {}

with

$(window).bind('load', function() {})

?
-- 
Piotr Petrus http://riddle.pl


[jQuery] Re: Quite big performance issue

2007-09-07 Thread Piotr Petrus

Hi Charles,

Thanks for taking your time to investigate my issue

However, the site you see is not a demo, it's fully functional
calculator for css dimensions. :) When you start typing, you fire
different events, and - yes - they affect whole tree  that's
intentional.

But the thing that only bugs me is adding new nodes. I'll try
optimizing filters more aggresively, but unfortunately I did similar
thing before and it didn't make a difference.

About other things that you've said: I don't get the JSLint comment;
and my code don't need to be wrapped in closure because it's not a
plugin and it won't be used anywhere else. :)

-- 
Piotr Petrus http://riddle.pl