Re: [jQuery] jQuery Powered Sites - The List Continues to Grow

2007-03-18 Thread Dominik Hahn

The domain laid waste so I launched http://validhtml.com - Enjoy! :)


dominik
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] jQuery Powered Sites - The List Continues to Grow

2007-03-18 Thread Dominik Hahn

The caching must have gone wrong, I thought that bug was sorted out. Thanks,
I'll keep an eye on that. :)
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] $(node).hasClass(...) function

2007-03-05 Thread Dominik Hahn

That'd be the best solution!

Thanks for the code, I was using if($(this).attr('class').search('selected')
!= -1) { // code } before. :-)

2007/3/5, John Resig [EMAIL PROTECTED]:


.hasClass() would just use .is() (or jQuery.filter) internally. Right
now we're quickly gaining filesize without even adding new features
(only dealing with bug fixes). For now, .is() will have to suit.

Another option would be to add an entry for .hasClass() in the
documentation, but in its details, point the user towards .is()
instead.

--John

On 3/4/07, Paul Bakaus [EMAIL PROTECTED] wrote:
 Absolutely Karl -
 the is() method is wonderful, I use it quite often. But there are often
more
 ways to achieve the same things, sometimes it's just a matter of taste.
 Anyway - a hasClass method would probably even save a few ms compared to
 is() in my opinion, because you don't need to parse stuff.

 2007/3/4, Karl Swedberg [EMAIL PROTECTED]:
 
 
  Maybe .hasClass() would be helpful, but keep in mind that .is() offers
 /more/ functionalities than .hasClass() would.
 
 
  For example ...
 
 
  $('.class').is('#my-id')
  $('p').is(':visible')
  $('div').is('[a]')
 
 
 
  I'm not necessarily opposed to having .hasClass(), but I really love
the
 flexibility of .is().
 
 
  --Karl
  _
  Karl Swedberg
  www.englishrules.com
  www.learningjquery.com
 
 
 
 
 
 
  On Mar 4, 2007, at 10:07 AM, Sébastien Pierre wrote:
 
 
  Hi,
 
 
  This is not very obvious, and I guess some people won't notice that
  is offers the same functionalities as a potential hasClass...
  from a developer friendly point of view, I think it would be better
  to have addClass/toggleClass/hasClass rather than addClass/
  toggleClass/is.
 
 
  Just my 2c ;)
 
 
-- Sébastien
 
 
  Le 07-03-02 à 13:30, John Resig a écrit :
 
 
 
  give this a try:
 
 
  $(node).is(.class)
 
 
  --John
 
 
  On 3/2/07, Sébastien Pierre  [EMAIL PROTECTED] wrote:
 
  Hi all,
 
 
  I was wondering if somebody would be interested in a hasClass(...)
  function for jQuery. I would definitely find it useful, and am
  willing to contribute it.
 
 
-- Sébastien
 
 
 
 
  ___
  jQuery mailing list
  discuss@jquery.com
  http://jquery.com/discuss/
 
  ___
  jQuery mailing list
  discuss@jquery.com
  http://jquery.com/discuss/
 
 



 --
 --
 Paul Bakaus
 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/



___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] how to filter a list

2007-02-15 Thread Dominik Hahn

My current code looks like this:

function filter(query) {
   if(query != '') {
   $(li).each(function(i){
$(this).removeClass('wanted').addClass('unwanted');
   });
   $.getJSON($homeadress/suche.php,
   { do: ajax, type: 'filter', what: 'all', query: query },
   function(data){

   for ( keyVar in data ) {
   var id = '#'+data[keyVar];
   $(id).addClass('wanted').removeClass('unwanted');
   }
   $('li').not('.wanted').addClass('unwanted');

   }
   );
   }
   else {
   // no real search
   $(li).each(function(i){
 $(this).removeClass('wanted').removeClass('unwanted');
   });
   }
}


Any thoughts on this? :-)


dominik
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] populate/generate selectbox on the fly?

2007-02-14 Thread Dominik Hahn

Jake: Thanks, I will try it out!

Karl: That would require a rewrite of my current code but jquery-select
looks like a clean method.


I'll will give both ideas a try, thank you guys!



Dominik



2007/2/14, Karl Rudd [EMAIL PROTECTED]:


Sam just released an update to his select box manipulation plugin that
should help you out. It has an ajaxAddOption method.

http://www.texotela.co.uk/code/jquery/select/

Karl Rudd

On 2/14/07, Dominik Hahn [EMAIL PROTECTED] wrote:
 Hello there!

 I've already searched for a plugin but I'm afraid that nobody has faced
this
 challenge before. :-(

 I have a lot of database entries and I want to make them selectable like
so:

 The first selectbox shows all available categories. This doesn't require
 jQuery - it's good old PHP. ;-)

 When I select Category A from that selectbox, jQuery should now generate
a
 new selectbox with the list of states in which the companies in the
selected
 category are.

 When I select a state it should generate a second selectbox with a list
of
 postal codes in which the companies in the selected state are so that a
user
 can select a nearby company.



 CATEGORY (select Category A, it generates a new selectbox)

 - STATE (contains the states of all companies that are listed under
 Category A, generates a new selectbox containing all postal codes of the
 companies that are listed in Category A and State X)

 -- POSTAL CODE (contains all postal codes of the companies that are
listed
 in Category A and State X, on select it prints out all companies that
are
 listed in Category A and State X,and with the postal code of 123)



 I hope you all got my  bad example! ;-)

 Do you now a good and simple way to do it?


 Thanks in advance,
 Dominik



 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/



___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] how to filter a list

2007-02-14 Thread Dominik Hahn

Today is not my day, I don't even the most simple things to work! :(

I have three unordered lists, each of them has around 10 list items. All
list items have an unique ID.

ul
li id=1/li
li id=2/li
li id=3/li
/ul
ul
li id=4/li
li id=5/li
li id=6/li
/ul
ul
li id=7/li
li id=8/li
li id=9/li
/ul



By using $.get I get a result from the server (PHP), this can be an array or
a string (whatever is easier for the next step):

Array
(
   [0] = 1
   [1] = 4
   [2] = 9
)

- or -

1,4,9


Now I want to have a function that highlights all list items with the ID of
1,4 and 9 and at the same time it should make all list items invisible that
don't have this ID.

I am not quite sure how to start. Selecting a single list item isn't a
problem but what do I have to do with the array/string of the items to hide?


As always, thanks for your help!


Dominik
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] how to filter a list

2007-02-14 Thread Dominik Hahn

I almost got it..

The problem now is, that I don't have the right selectors for the list
items.

Here's the code:
function filter(query) {
   if(query != '') {
   $.getJSON($homeadress/suche.php,
   { do: ajax, type: 'filter', what: 'all', query: query },
   function(data){
   for ( keyVar in data ) {
   var id = '#'+data[keyVar];
   $(id).css('font-size','150%');
   }
   }
   );
   }
   else {
   // no real search

   }
}


Now, grabbing all wanted list items to highlight isn't a big thing but how
can I also grab the rest of the list items (to remove them from the list).

Is

$(li).not(id).css('font-size','50%');


the right way or is there a better solution?


Yours,
Dominik
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] how to simplify this

2007-02-12 Thread Dominik Hahn

Hello,

I am looking for a way to simplify this chunk of code:


   $('li#normal').click(function() {
   $('#bereit').ScrollTo(800);
   $('li#normal dd').toggleClass('ausgewaehlt');
   $('li#standard dd').removeClass('ausgewaehlt');
   $('li#profi dd').removeClass('ausgewaehlt');

   $('label#label_radiobutton_1').toggleClass('ausgewaehlt');
   $('label#label_radiobutton_2').removeClass('ausgewaehlt');
   $('label#label_radiobutton_3').removeClass('ausgewaehlt');

   $('input#radiobutton_1').attr('checked','checked');
   $('input#radiobutton_2').attr('checked','');
   $('input#radiobutton_3').attr('checked','');
   });
   $('li#standard').click(function() {
   $('#bereit').ScrollTo(800);
   $('li#normal dd').removeClass('ausgewaehlt');
   $('li#standard dd').toggleClass('ausgewaehlt');
   $('li#profi dd').removeClass('ausgewaehlt');

   $('label#label_radiobutton_1').removeClass('ausgewaehlt');
   $('label#label_radiobutton_2').toggleClass('ausgewaehlt');
   $('label#label_radiobutton_3').removeClass('ausgewaehlt');

   $('input#radiobutton_1').attr('checked','');
   $('input#radiobutton_2').attr('checked','checked');
   $('input#radiobutton_3').attr('checked','');
   });
   $('li#profi').click(function() {
   $('#bereit').ScrollTo(800);
   $('li#normal dd').removeClass('ausgewaehlt');
   $('li#standard dd').removeClass('ausgewaehlt');
   $('li#profi dd').toggleClass('ausgewaehlt');

   $('label#label_radiobutton_1').removeClass('ausgewaehlt');
   $('label#label_radiobutton_2').removeClass('ausgewaehlt');
   $('label#label_radiobutton_3').toggleClass('ausgewaehlt');

   $('input#radiobutton_1').attr('checked','');
   $('input#radiobutton_2').attr('checked','');
   $('input#radiobutton_3').attr('checked','checked');
   });


It controls a list, when you click on one of the three items, it scrolls
down to a online form (first line), the item is highlighted (first three
lines), one of three radioboxes is checked (line 6-8) and the label for the
checked radiobox is also highlighted (last three lines).


Can you help me?

Thanks,
Dominik
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] Sortable Puzzle?

2006-10-03 Thread Dominik Hahn
Hello,Is it possible to create a Sortable Puzzle with jQuery (probably using Interface) to create something like this: http://wiki.script.aculo.us/scriptaculous/page/print/SortableFloatsDemothanks,Dominik___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/