[jQuery] Re: [ANNOUNCE] Space gallery

2008-01-10 Thread Matthieu BARBE
Nice job...

2008/1/9, Stefan Petre [EMAIL PROTECTED]:


 Image gallery with perspective

 http://eyecon.ro/spacegallery/

 Regards,
 Stefan



[jQuery] Determine if element is fluid?

2008-01-10 Thread weepy

Hi

Does anyone know how to determine if an element is fluid or not ? -
i.e. whether it's width is fixed - or not.

Jonah


[jQuery] jquery.corner.js in Rails

2008-01-10 Thread Camacho


Hi,

Does anybody knows how to install jquery.corner.js in rails?

Thanks,
Pedro


[jQuery] cycle over URLs returned from JSON request

2008-01-10 Thread stoal


I am trying build a slide show using the Cycle plugin.

My (simple) code issues a JSON request (getJSON) to obtain the URLs of a few
images. The images are displayed but the cycle method does not work, ie. all
the images are displayed, no 'cycle' happens. Images are not hosted on the
same machine as the one that replies to the JSON request.

Am I missing something ?

Below is an excerpt of my code:

Thanks.



$(document).ready(function(){   
$.getJSON('http://localhost:8501/testing/wwf_broadcast_json_4.cfc?method=wwf_feedcount=4t_keyword='+word+'i_keyword='+word,
 
function(data) {
$('#images').empty;

var html = '';
$.each(data.img, function(i, item) {
html += ' ' + item.image + ' '
});
$('#images').append(html);
});
;

});

/script

/head

style
.pics {  
height:  232px;  
width:   232px;  
padding: 0;  
margin:  0;  
} 
 
.pics img {  
padding: 15px;  
border:  1px solid #ccc;  
background-color: #eee;  
width:  200px; 
height: 200px; 
top:  0; 
left: 0 
} 
/style


body
wwf_header_widget.jpg 
div id=images class=pics/div

script
$('#images').cycle('fade');
/script

/body






-- 
View this message in context: 
http://www.nabble.com/cycle-over-URLs-returned-from-JSON-request-tp14720960s27240p14720960.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] IE 6 select controls

2008-01-10 Thread [EMAIL PROTECTED]

I'm fairly new to using JQuery and JQuery UI and am having some
difficulty.

I'm trying to use a select control in a jquery dialog window $
(myDialog).dialog().  The problem arises in IE 6 when you have a
sufficient number of options that it requires scrolling of the select
control.  IE will not allow me to click on the scroll control to
scroll, for example, to the last option in the select control.  I
posted an example at http://www.oddreflector.com/work/ie/test.html  Of
course Firefox and Opera don't seem to have any issues with the select
control, just IE.

This doesn't appear to be the same issue as the select control
bleeding through other elements that I have read about elsewhere on
the list.

Has anyone else run into this issue and better yet have a solution?

Mike


[jQuery] Re: how can i access and manipulate iframe elements in ie6

2008-01-10 Thread dannyboy anak sa baboy

thank you for the suggestion, i tried using it but i keep getting the
error 'undefined' is null or not an object, i posted a comment at
http://ideamill.synaptrixgroup.com/?p=6 with my code too :)
 
On Wed, 2008-01-09 at 12:47 -0800, rgrwkmn wrote:
 Check out the $.frameReady jQuery plugin. I've been having trouble
 getting it to work properly with my site, but others have had great
 success and it works perfectly in the demo.
 http://ideamill.synaptrixgroup.com/?p=6
 
 On Jan 9, 4:13 am, sigbin dan [EMAIL PROTECTED] wrote:
  hi guys,
 
  im developing for internet explorer 6 and i am making a jquery
  generated iframe, now after making this iframe, i want to be able to
  insert 'onlick=(function())' this code on the body tag, of the page
  inside the iframe. is that possible?
 
  thanks,
 
  dan



[jQuery] Re: can only modify DOM via debugger

2008-01-10 Thread knairb01

Jeffrey,

Thanks for trying to help. I tried your suggestion and, with the
debugger running, the browser immediately followed the target of the
'get' in the code; the debugger didn't stop at any of the surrounding
breakpoints. Odd. In all my past experiences that I was able to view
with the debugger, when the browser followed the 'get' target, it
meant that the flow had been interrupted and the 'return false;'
statement had not been executed. So, I don't know what is causing the
error, but read my reply to Alexey if you're interested.

Brian


[jQuery] Re: can only modify DOM via debugger

2008-01-10 Thread knairb01

Alexey,

Ah, yes! It probably is asynchronous! I should've thought of that. I
restructured the code to look like this:

$(document).ready(function() {
$(a).click(function() {
var coursename = $(this)[0].attributes['coursename'].nodeValue;
var mydata = $.get(http://localhost:8080/course/; + coursename +
/, {}, function(mydata) {
   var str1 = mydata.substring(5,7);
   var textAreaNode=document.getElementById('test');
   textAreaNode.value += str1;
   return false;
   });
   return false;
});
});

It works. I'm not sure what you're suggesting when you say that I
should populate the textarea before assigning to str1, as str1 was
what I was populating the textarea with. Regardless, it works, and I'm
happy. Thanks.


[jQuery] ANDing selectors

2008-01-10 Thread mnbeer

What is the best way to select all elements with classX and not
classY?


[jQuery] close menu on mouseout

2008-01-10 Thread Ola

Hi,

I am using the accordion script on a site I have developed, and I'm
struggling to figure out how to close all items, when you're moving
the mouse outside the menu.

Any suggestions? I'm not that into jquery scripting yet. I guess its
just a quick code one must add in the accordion.js

Many thanks,
Ola


[jQuery] tags / links with jquery

2008-01-10 Thread Juan

Hi:

I'm a newbie with jquery.
I've seen forms in some websites that allows a user to enter data in
free form and links those attributes together.
For example in the area for 'interests', the user could enter stuff
like ' swimming, squash and running'.
Then hyperlinks appear under 'Swimming' 'Squash' and 'Running'. Once
you click on those links... people with those common interest are
returned.

I'm assuming that it does call a database, could this be achieved with
jquery ? if so how? or are there jquery libraries written already for
this operation.

Cheers
Juan


[jQuery] tags / links with jquery

2008-01-10 Thread Juan

Hi:

I'm a newbie with jquery.
I've seen forms in some websites that allows a user to enter data in
free form and links those attributes together.
For example in the area for 'interests', the user could enter stuff
like ' swimming, squash and running'.
Then hyperlinks appear under 'Swimming' 'Squash' and 'Running'. Once
you click on those links... people with those common interest are
returned.

I'm assuming that it does call a database, could this be achieved with
jquery ? if so how? or are there jquery libraries written already for
this operation.

Cheers
Juan


[jQuery] n00b q

2008-01-10 Thread s.ross

This is probably one of those asked-and-answered questions, but I
didn't turn it up in a Google search, doc search, or search of this
group. Here it is: I want to click a link to slide a div down and the
next click slide it back up. Toggle with an effect. Because I am not
triggering the effect off a click on the element whose visibility I
want to toggle, the Event.Toggle method doesn't seem to fit. Here's
the point I've reached, which doesn't quite work. I'm sure there is a
really easy way to do this but I'm not seeing it.

$('a#image').click(function(){
$('#image-drawer')
.filter(':hidden')
.slideDown()
.end()
.filter(':visible')
.slideUp()
;
return false;
});

Thanks,

--s


[jQuery] sort existing li elements

2008-01-10 Thread chrismarx

i'm looking for a plugin or code to sort an existing list of li
elements, without going back to the server. anyone seen this already?


[jQuery] Re: how can i access and manipulate iframe elements in ie6

2008-01-10 Thread dannyboy anak sa baboy

thank you but it did not detect the body of the document in the frame, i
just keep getting 'null' i read that generated iframes dont appear on
the frames collection 

On Wed, 2008-01-09 at 07:52 -0800, Miha wrote:
 Not sure if it is possible with jquery but in JS you can access doc
 body inside of iframe like this:
 
 ifDocBody=window.frames['frame-name'].document.body;
 
 Note that frame-name is set by iframe name parameter, not by id;
 
 regards,
 Miha
 
 On Jan 9, 11:13 am, sigbin dan [EMAIL PROTECTED] wrote:
  hi guys,
 
  im developing for internet explorer 6 and i am making a jquery
  generated iframe, now after making this iframe, i want to be able to
  insert 'onlick=(function())' this code on the body tag, of the page
  inside the iframe. is that possible?
 
  thanks,
 
  dan



[jQuery] Re: cycle over URLs returned from JSON request

2008-01-10 Thread Mike Alsup

 I am trying build a slide show using the Cycle plugin.

 My (simple) code issues a JSON request (getJSON) to obtain the URLs of a few
 images. The images are displayed but the cycle method does not work, ie. all
 the images are displayed, no 'cycle' happens. Images are not hosted on the
 same machine as the one that replies to the JSON request.

 Am I missing something ?

You need to put the cycle call in your json callback:

$.getJSON(url, function(data) {
var $images = $('#images').empty();
var html = '';
$.each(data.img, function(i, item) {
html += ' ' + item.image + ' '
});
$images.append(html).cycle();
});

At the time you invoke cycle, the slide elements *must* exist in the
DOM.  It's ok if images haven't been downloaded yet, but the elements
must be there otherwise cycle has nothing to work with.

Cheers.

Mike


[jQuery] Re: how can i access and manipulate iframe elements in ie6

2008-01-10 Thread sigbin dan

thank you but it did not detect the body of the document in the frame,
i
just keep getting 'null' i read that generated iframes dont appear on
the frames collection

On Jan 9, 11:52 pm, Miha [EMAIL PROTECTED] wrote:
 Not sure if it is possible with jquery but in JS you can access doc
 body inside ofiframelike this:

 ifDocBody=window.frames['frame-name'].document.body;

 Note that frame-name is set byiframename parameter, not by id;

 regards,
 Miha

 On Jan 9, 11:13 am, sigbin dan [EMAIL PROTECTED] wrote:

  hi guys,

  im developing for internet explorer 6 and i am making a jquery
 generatediframe, now after making thisiframe, i want to be able to
  insert 'onlick=(function())' this code on the body tag, of the page
  inside theiframe. is that possible?

  thanks,

  dan


[jQuery] Re: how can i access and manipulate iframe elements in ie6

2008-01-10 Thread sigbin dan

thank you for the suggestion, i tried using it but i keep getting the
error 'undefined' is null or not an object, i posted a comment at
http://ideamill.synaptrixgroup.com/?p=6 with my code too :)

On Jan 10, 4:47 am, rgrwkmn [EMAIL PROTECTED] wrote:
 Check out the $.frameReady jQuery plugin. I've been having trouble
 getting it to work properly with my site, but others have had great
 success and it works perfectly in the 
 demo.http://ideamill.synaptrixgroup.com/?p=6

 On Jan 9, 4:13 am, sigbin dan [EMAIL PROTECTED] wrote:

  hi guys,

  im developing for internet explorer 6 and i am making a jquery
 generatediframe, now after making thisiframe, i want to be able to
  insert 'onlick=(function())' this code on the body tag, of the page
  inside theiframe. is that possible?

  thanks,

  dan


[jQuery] jqModal and cleaning up after itself

2008-01-10 Thread Matt Craig

Perhaps this is a non-standard way to use jqModal, but I use it pretty
much exclusively for dynamic form popups.  My modal DIVs are
dynamically generated and have iframes for content.

My use case is:
1) open Modal_1 (generates a div with id=div_order containing an
iframe with id=if_order)

2) close Modal_1

3) open another new copy of Modal_1 (page now has two iframes with
id=if_order)

4) try to refer to $(#if_order) and you get one confused browser
(Firefox) and plenty of undefineds ...

My problem arises because close() uses jqmHide() which does not
destroy/remove any of the modals it is done with.

Is there a way to make jqModal destroy a modal and its associated
stuff, rather than leaving all the now useless garbage cluttering up
the DOM?


[jQuery] Re: add changing URL string to address for AJAX a la Gmail 2

2008-01-10 Thread ScottBruin

Thanks much to both of you. Just what I was looking for.
--Scott

On Jan 8, 8:08 am, Morgan Allen [EMAIL PROTECTED] wrote:
 Give the history plugin a look, this will also allow you to get an ajaxish
 back button.

 http://www.mikage.to/jquery/jquery_history.html

 On Jan 7, 2008 10:19 PM, Scott Hulbert [EMAIL PROTECTED] wrote:



  Hi everyone,

  I'm working on a simple project and I'm going to use jQuery's .load
  function to switch between content pages so that the page does not have to
  unload and reload. I'm doing this because my page needs a flash music player
  on it and this allows for uninterrupted music. I'd like a way to do
  something similar to what Gmail does now.

  For example, when I click on a message the address in the address bar
  changes to: http://mail.google.com/mail/#inbox/11757de76c56c762;

  I just want something simple, like 
  domainname.com/home.php?page=about...orsomething more similar to gmail, a la
  domain.com/home.php#about. This isn't necessary but it is nice for the
  user and could eventually be used with PHP to redirect a user to a linked
  page.

  Thanks to anyone with any insight on how this would be done. I have a
  decent knowledge of jQuery but my javascript is a bit weak.

  --Scott Hulbert

 --http://morglog.alleycatracing.com
 Lets make up more accronyms!

 http://www.alleycatracing.com
 LTABOTIIOFR! ROFL! ROFL! ROFL!
 Upcoming alley cats, reviews, touring logs, and a general congregation of
 bike nerdity.


[jQuery] Re: Problem with jQuery plugin: validation

2008-01-10 Thread yabado

I am seeing that a couple of the examples do not work in Safari 3

The custom rules one does nothing.

The radio/checkbox one the same.

They both throw 'TypeError: Undefined Value'

These errors are from the js on the page, and not the js that is
linked in.

Any ideas? Anyone else seeing this?

On Nov 28 2007, 10:36 am, edav [EMAIL PROTECTED] wrote:
 On 27 nov, 16:22, Jörn Zaefferer [EMAIL PROTECTED] wrote:

  edav schrieb: Hi.

   First of all thanks for the great work!  I am using the jquery
  validateplugin and it works great insafari, firefox and ie7 but in
   ie6 it has a problem in line 1222, its the url validation regex. If I
   remove the entire rule then it works in ie6.

   I'm using jquery 1.2.1 and the plugin is 1.1.1

  That issue is fixed in the latest revision. Should be available as 1.2
  sometime soon.

 http://dev.jquery.com/view/trunk/plugins/validate/

 Thanks for the quick response.

 Erik


[jQuery] Re: match element based on CSS value

2008-01-10 Thread Sebastián V. Würtz





Glen Lipka escribi:
Whipped
up a demo.
  http://commadot.com/jquery/isCSSRule.php
  
  Hope this helps.
There might be another way.
  
  
  Glen
  
  On Jan 9, 2008 2:01 PM, [EMAIL PROTECTED]
[EMAIL PROTECTED]
wrote:
  
How can I select an element based on it's CSS style value?

For example, let's say I have an element absolute positioned at
top=100px.

How can I do something like the following?

$(top=100px)


thanks
Jason
  
  
  

I think theres not another way without using an each for comparation, a
for or something that cycle against "every" element in the DOM is a
heavy work i mean in cpu time, but im sure theres the only solution is
that $(...).each




[jQuery] autocomplete + bgiframe

2008-01-10 Thread badtant

Hi!

I'm currently trying out this autocomplete plugin:
http://code.google.com/p/jqac/
http://plugins.jquery.com/project/jqac

I have to add bgiframe functionality for IE6 and have some trouble
doing that. Here's my code:
http://www2.hemsida.net/badtant/test/auto/test.html

I've added this line:
$(.jqac-menu).bgiframe();

At a first glance it seems to work bet when scrolling in the
suggestion box the select behind it suddenly appears. How can I get
around this?

Thanks!
/Niklas


[jQuery] Re: File upload with AJAX

2008-01-10 Thread Alexandre Plennevaux
you can via the use of flash. Check jquploader plugin...

On Jan 8, 2008 8:40 PM, Mike Alsup [EMAIL PROTECTED] wrote:


 Technically, no, you can not upload files using ajax.  But the Form
 Plugin supports this in a manner that appears to use ajax.

 http://www.malsup.com/jquery/form/#code-samples

 Mike



 On Jan 8, 2008 11:35 AM, Jimmy Neph [EMAIL PROTECTED] wrote:
 
  Hello people.
 
  I want to know if is possible to send a file using the Ajax method.
  If it is possible, how I do this?
 
  Thanks!!
 




-- 
Alexandre Plennevaux
LAb[au]

http://www.lab-au.com


[jQuery] Re: invoking an element dinamically

2008-01-10 Thread Ariel Flesler

Could this be ?

function ofertaDetalle(idoferta){
   //this is quite odd, but should work
   if( ofertaDetalle.$element )//if one was hilited
   ofertaDetalle.$element.removeClass('hilightOn');//revert it to
normal

   var selector = '#puestoAspira'+idoferta;//this gets you the
selector to match that specific TD
   ofertaDetalle.$element = $(selector).addClass('hilightOn');//find
the new TD, highlight it and save it into ofertaDetalle.$element
};

Cheers.
Ariel Flesler

On Jan 9, 1:16 pm, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
 Hi everyone, I need assistance with some how-to.  I'm new to jq, so
 a little help would be much appreciated.

 I have a function that receives a value each  time an a href is
 clicked, for every click I get a different value, I want to use this
 value a ID in the td of a table, such td's are already ID'ed with
 the value I want, so I can later manipulate them, for things such as
 to hilight or remove the element from the DOM, etc.

 This is a piece of the code:

    function ofertaDetalle(idoferta){ // idoferta is the variable

       varID = puestoAspira+idoferta  //I wanted to concatenate some
 text to the id

       $(#varID).addClass(hilightOn);  //since I don't know how to do
 it, I was trying different things

       $(td:contains(varID)).toggle(
         function () {
           $(td:contains(varID)).addClass(hilightOn);
         },
         function () {
           $(td:contains(varID)).removeClass(hilightOn);
         }
       );


[jQuery] Re: ANDing selectors

2008-01-10 Thread Klaus Hartl

On Jan 10, 8:14 am, mnbeer [EMAIL PROTECTED] wrote:
 What is the best way to select all elements with classX and not
 classY?

Try:

$('.classX:not(.classY)')


--Klaus


[jQuery] Re: Determine if element is fluid?

2008-01-10 Thread Dave Methvin


 Does anyone know how to determine if an element is fluid or not ? -

I desperately wanted this when building the original corner plugin,
and never figured out a way.


[jQuery] Want to move content back and forth between containers with jquery

2008-01-10 Thread Bryank

Hi Everyone,

I will make this example as simple as possible.

I have  2 divs, each containing list items. When an item in box #1 is
clicked, I want to move it to box #2. When that same item is clicked
in box #2, I want to move it to box #1.

My co-worker and I are working on this and here is some code he put
together:
http://pastie.caboo.se/137728

My original method was using something like this:

$(document).ready(function() {

  $('#suggestedCategories ul li a').click(function() {
  $('#selectedCategoriesList').append('lia href=#
onclick=removeItem(this); return false;' + $(this).html() +  '/a/
li');
$(this.parentNode).remove();
});

});
 function removeItem(el) {
$('#suggestedCategories ul').append('lia href=#' + $(el).html()
+ '/a/li');
$(el.parentNode).remove();

 }

I want to know if there is a cleaner easier way to pull this off then
what was pasted at:
http://pastie.caboo.se/137728

Thanks,
Bryan


[jQuery] using jqueryimpromptu plugin and submit with validation

2008-01-10 Thread K Bouton

I am a jquery newbie who is trying to use the jquery impromptu plugin
to create an ok/Cancel button which does some validation before it
submits.
I currently have a working form which uses a standard javascript
confirm prompt - but I want it to be fancier -smile.
This is what I have - how do I convert it to the impromptu plugin?
Thanks
[code]
in header javascript...

function CheckYears(form) {
  var year = form.elements['year[]'];
  var numyearSelected = 0;
  for (var i = 0; i  year.length; i++) {
if (year[i].selected) numyearSelected++;
  }
  if (numyearSelected == 1  year.selectedIndex==0)   {
return confirm('Are you sure you want to search on ALL Years?\r
\nIt may take a while.\r\nClick OK to search or Cancel to start
again.');
  }
}
[/code]
in body
[code]
form name=queryForm action=test.php method=POST
onSubmit=return CheckYears(this)
select name=year[] multiple=multiple size=12
  option selected=selected value=AllAll Years/option
 option value=20072007/option
   ... etc
/selected
input type=submit name=submit value=Search  Availability/
  /form
[/code]

I know it has something to do withthecallback function - but I can't
get it to work...


[jQuery] [attribute=value] selector in ie7

2008-01-10 Thread mojo

hi.

in ff 2.0.0.11 the selector works as expected.
in ie7 it fails to select anything.

example on documentation page
http://docs.jquery.com/Selectors/attributeEquals
also look different in said browsers.

is this a bug?


[jQuery] How to remove duplicates from dropdown select box

2008-01-10 Thread artzone

I'm new to jquery but I'm lovin it so far.

Can anyone tell me the best way to remove duplicates from a dropdown
that looks like this:

form name=myform
select name=mylist id=mylist
optionSelect an option/option
option value=RodRod/option
option value=RodRod/option
option value=LineLine/option
option value=RodRod/option
option value=ReelReel/option
/select
/form

I can't change the the contents of the dropdown because they're
written by a CMS so I'd like to at least make sure that there are no
dupes in it.

Also, I'd like to jump to a new href based on the option chosen. I'm
using it to filter search results. Normally I'd use an  onchange
attached to the select but I know I can bind an event to the select in
jquery, I'm just not sure how to then use the value selected to jump
to my new url.

Many thanks in advance
Art



[jQuery] Re: Pretty XML?

2008-01-10 Thread bweaverusenet

Thanks, George. You know, anymore when I'm doing javascript I just
have jQuery on the brain, so naturally I posted what's mostly a
general javascript question to a jQuery group. Well, actually, I was
hoping to find some elegant jQuery voodoo or perhaps a plugin that
does this before reverting to something more rudimentary or rolling my
own. ;-)

Thanks again.

On Jan 10, 8:17 am, George [EMAIL PROTECTED] wrote:
 I'm not aware of any existing solution so I'd probably consider using
 regular expressions to add line feeds and tabs between elements. It
 will help alot if you can assume the xml will be well formed. Given
 the nature of this forum you might also consider a jQuery solution
 that iterates (recursively?) through the tree to copy element names
 and attributes as xml to a text string.

 George

 On Jan 9, 8:35 pm, bweaverusenet [EMAIL PROTECTED] wrote:

  Any ideas? Thanks! -bill


[jQuery] Re: Pretty Horizontal Rules with jQuery

2008-01-10 Thread John S

Very cool!

On Jan 9, 2:45 pm, Hamish Campbell [EMAIL PROTECTED] wrote:
 Hi all,

 Thought I'd share a little piece of code I whipped up this morning.
 This turns hr elements into pretty div based dividers. In action here:

 http://www.deft.co.nz

 Turn js on and off and compare!

 In the HTML:

 hr title=some text! /

 In the JS:

 $(document).ready(function(){
 $('hr').each(function() {
 var divText = $(this).attr('title');
 $(this).before('div class=HR_DIVIDER center' +
 'div class=HR_LEFTnbsp;/div' +
 'div class=HR_RIGHTnbsp;/div' +
 'div class=centerdiv class=HR_TEXT'+divText+'/div/
 div' +
 '/div').remove();
 });

 });

 In the CSS:

 /* HORIZONTAL RULES */
 .center {
 text-align: center;}

 .HR_LEFT {
 background-image: url(hr_left.png);
 background-repeat: no-repeat;
 background-position: left center;
 width: 30px; // width of the hr_left.png image
 float: left;}

 .HR_RIGHT {
 background-image: url(hr_right.png);
 background-repeat: no-repeat;
 background-position: right center;
 width: 30px; // width of the hr_right.png image
 float: right;}

 .HR_DIVIDER {
 margin-top: 15px;
 margin-bottom: 15px;
 background-image: url(hr_mid.png);
 background-repeat: repeat-x;
 background-position: center center;}

 .HR_TEXT {
 margin: auto;
 background-color: #FF;
 width: 120px;

 }


[jQuery] Re: Want to move content back and forth between containers with jquery

2008-01-10 Thread Karl Swedberg


Hi Bryan,

I threw something together pretty quickly, so I'm sure it could be  
further improved.


Here is a demo, based on your pastie code:

http://test.learningjquery.com/moveli.html

Here is the jQuery:

$(document).ready(function() {
  var moveLi = function() {
$('#suggestedCategories, #selectedCategories').find('li  
a').unbind('click').click(function() {
  var moveTo = $(this).parents('div')[0].id ==  
'suggestedCategories' ? '#selectedCategories ul' :  
'#suggestedCategories ul';

  $(this).parent().appendTo(moveTo);
  moveLi();
  return false;
});
  };
  moveLi();
});



--Karl
_
Karl Swedberg
www.englishrules.com
www.learningjquery.com



On Jan 10, 2008, at 10:13 AM, Bryank wrote:



Hi Everyone,

I will make this example as simple as possible.

I have  2 divs, each containing list items. When an item in box #1 is
clicked, I want to move it to box #2. When that same item is clicked
in box #2, I want to move it to box #1.

My co-worker and I are working on this and here is some code he put
together:
http://pastie.caboo.se/137728

My original method was using something like this:

$(document).ready(function() {

 $('#suggestedCategories ul li a').click(function() {
 $('#selectedCategoriesList').append('lia href=#
onclick=removeItem(this); return false;' + $(this).html() +  '/ 
a/

li');
$(this.parentNode).remove();
});

});
function removeItem(el) {
$('#suggestedCategories ul').append('lia href=#' + $(el).html()
+ '/a/li');
$(el.parentNode).remove();

}

I want to know if there is a cleaner easier way to pull this off then
what was pasted at:
http://pastie.caboo.se/137728

Thanks,
Bryan




[jQuery] Check/Uncheck all checkboxes

2008-01-10 Thread IschaGast

I have a page that looks like this:
div class=table-of-contents
div class=chapters-title
h3input type=checkbox id=chaper-01 /label
for=chapter-01Chapter title/label/h3
/div
ul class=pages-container
li
div class=pages
ul
liinput type=checkbox id=page-01 
/label
for=page-01Page title/label/li
liinput type=checkbox id=page-02 
/label
for=page-01Page title/label/li
liinput type=checkbox id=page-03 
/label
for=page-01Page title/label/li
liinput type=checkbox id=page-04 
/label
for=page-01Page title/label/li
/ul
/div
/li
/ul
/div

What I want is that when clicking the first checkbox in the h3 all
checkboxes are checked in the div class=pages But they have to be
unchecked when that same checkbox is clicked again.

I thought it would be simple but I tried some things now I am getting
crazy... it won't work. Maybe I am thinking to difficult?


[jQuery] Re: Problems with Interface Sortables

2008-01-10 Thread benjam

Anybody?


[jQuery] using serialize function on ul tag

2008-01-10 Thread David White

I'm pretty new to jQuery and have figured out how to make a sortable
list update to a database using Interface for jQuery 'http://
interface.eyecon.ro/docs/sort', but I want to see if the same
functionality is available with the jQuery UI.

I have most of the code completed I'm just stuck using the serialize
function as it only seems to return a string for a form element. Can
it be used to bring a list of list-items? Or is there an alternative
function I can use?

I'd prefer not to use Interface for jQuery as its pretty big in size.

Thanks for any help.

Dave


[jQuery] Re: n00b q

2008-01-10 Thread s.ross

On Jan 10, 2008, at 6:28 AM, Karl Swedberg wrote:


 On Jan 10, 2008, at 1:03 AM, s.ross wrote:

 This is probably one of those asked-and-answered questions, but I
 didn't turn it up in a Google search, doc search, or search of this
 group. Here it is: I want to click a link to slide a div down and the
 next click slide it back up. Toggle with an effect. Because I am not
 triggering the effect off a click on the element whose visibility I
 want to toggle, the Event.Toggle method doesn't seem to fit. Here's
 the point I've reached, which doesn't quite work. I'm sure there is a
 really easy way to do this but I'm not seeing it.

  $('a#image').click(function(){
  $('#image-drawer')
  .filter(':hidden')
  .slideDown()
  .end()
  .filter(':visible')
  .slideUp()
  ;
  return false;
  });

 Thanks,

 --s

 Hi S,

 In your code, it looks like you're first sliding the #image-drawer  
 element down, and then sliding it back up. I think a  
 simple .slideToggle() would work fine in this situation:

 $('#image').click(function() {
  $('#image-drawer').slideToggle();
 });

 Hope that helps.

 --Karl

Thanks for the quick reply, Karl. That is, indeed what was happening,  
and a slideToggle(); does solve the problem. So for me, the remaining  
question is: Say I wanted something nonstandard -- say a color or font  
size change -- to happen on click, and then on the next click have the  
element revert. I'm trying to get a sense of the idiom involved with  
getting jQuery to make a click toggle a binary state on another element.

Thx,

--s



[jQuery] Resizable only to specified width

2008-01-10 Thread thierry

Hello,

I would like to create a weekly calendar where people can select one
day, or more.
I would like it to work a bit like outlook.
So when someone selects a day, it should be possible to resize the
selection to include more days.
Problem is that the resize should snap  to a day, so that it is not
possible that someone resizes to the middle of a day.

When I look at the draggable feature, it is possible to add a grid
option, but I didn't see it for resizables.

Is this possible with the jquery ui plugin or perhaps with another
plugin?

Thank you.


[jQuery] Re: jqModal and cleaning up after itself

2008-01-10 Thread offsitestorage

Here is my solution.  Do everything inside Modal_1's iframe and use
the parent property instead of trying to do things inside the main
browser window.

This is suboptimal because for some of my forms it is nice to have a
sizable modal open and this forces any modals that open inside the
iframe to be as small as the iframe.

anyway, now if $.post() and the server would stop ending their
conversation at the Loading... stage and actually load some data :-)


On Jan 9, 9:07 pm, Matt Craig [EMAIL PROTECTED] wrote:
 Perhaps this is a non-standard way to use jqModal, but I use it pretty
 much exclusively for dynamic form popups.  My modal DIVs are
 dynamically generated and have iframes for content.

 My use case is:
 1) open Modal_1 (generates a div with id=div_order containing an
 iframe with id=if_order)

 2) close Modal_1

 3) open another new copy of Modal_1 (page now has two iframes with
 id=if_order)

 4) try to refer to $(#if_order) and you get one confused browser
 (Firefox) and plenty of undefineds ...

 My problem arises because close() uses jqmHide() which does not
 destroy/remove any of the modals it is done with.

 Is there a way to make jqModal destroy a modal and its associated
 stuff, rather than leaving all the now useless garbage cluttering up
 the DOM?


[jQuery] Re: Cornerz - Bullet Proof Curved Corners using Canvas/VML

2008-01-10 Thread John S

Section headers in the demos not working in Opera 9.25 on Windows XP
Pro.
Margins on top and left sides of corner image.

On Jan 10, 8:32 am, Andy Matthews [EMAIL PROTECTED] wrote:
 Demo works flawlessly in IE7. Good job weepy!

 -Original Message-
 From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On

 Behalf Of weepy
 Sent: Thursday, January 10, 2008 3:42 AM
 To: jQuery (English)
 Subject: [jQuery] Re: Cornerz - Bullet Proof Curved Corners using Canvas/VML

 Great stuff Olaf

 I am putting together a test page with all the display/position options
 together so we can test it properly.

 version 0.1 is here:www.parkerfox.co.uk/cornerz/0.1version 0.2 is 
 here:www.parkerfox.co.uk/cornerz/

 I am thinking of reverting back to 0.1 IE html rendering except when the
 layout is fluid.
 0.1 only breaks in IE when the widths and heights are odd (which is not so
 much of a problem for fixed dimensions as padding can be added) However
 version 0.2 doesn't seem to work so well for display: inline

 On Jan 10, 1:27 am, Olaf Bosch [EMAIL PROTECTED] wrote:
  Olaf Bosch schrieb:

   In my FooterBoxes work the Workaround with padding-bottom not in all
   boxes, one have the 1px border ever :(

   All have the same Styles, quirks IE ;)

  Haha, I write this and i have the idea, great.
  The boxes have all a UL in, I change the margin-top +1px and all is
  fine, without the paddingHack.

  GreatPlugin i ever see, my best wishes to you :)

  --
  Viele Grüße, Olaf

  ---
  [EMAIL PROTECTED]://olaf-bosch.dewww.akitafreund.dehttp://oho
  rn.info
  ---


[jQuery] Re: Want to move content back and forth between containers with jquery

2008-01-10 Thread Bryank

I just posted 2 demos to check out, one using the pastie up above, and
another one using modified code.

http://btk.name/jquery/move_items/move_items.html

http://btk.name/jquery/move_items/move_items2.html
Here is the pastie for move_items2.html: http://pastie.caboo.se/137756

Thanks,
Bryan

On Jan 10, 10:13 am, Bryank [EMAIL PROTECTED] wrote:
 Hi Everyone,

 I will make this example as simple as possible.

 I have  2 divs, each containing list items. When an item in box #1 is
 clicked, I want to move it to box #2. When that same item is clicked
 in box #2, I want to move it to box #1.

 My co-worker and I are working on this and here is some code he put
 together:http://pastie.caboo.se/137728

 My original method was using something like this:

 $(document).ready(function() {

   $('#suggestedCategories ul li a').click(function() {
   $('#selectedCategoriesList').append('lia href=#
 onclick=removeItem(this); return false;' + $(this).html() +  '/a/
 li');
 $(this.parentNode).remove();

 });
 });

  function removeItem(el) {
 $('#suggestedCategories ul').append('lia href=#' + $(el).html()
 + '/a/li');
 $(el.parentNode).remove();

  }

 I want to know if there is a cleaner easier way to pull this off then
 what was pasted at:http://pastie.caboo.se/137728

 Thanks,
 Bryan


[jQuery] Re: selector in ie7

2008-01-10 Thread Cloudream

next() is broken in IE, not attr selector.

On Jan 10, 10:57 pm, mojo [EMAIL PROTECTED] wrote:
 hi.

 in ff 2.0.0.11 the selector works as expected.
 in ie7 it fails to select anything.

 example on documentation pagehttp://docs.jquery.com/Selectors/attributeEquals
 also look different in said browsers.

 is this a bug?


[jQuery] Re: Want to move content back and forth between containers with jquery

2008-01-10 Thread Bryank

I have posted 2 links as demos that offer different versions for the
Jquery code

http://btk.name/jquery/move_items/move_items.html

http://btk.name/jquery/move_items/move_items2.html

and for the code only on move_items2.html: http://pastie.caboo.se/137756

Thanks,
Bryan

On Jan 10, 10:13 am, Bryank [EMAIL PROTECTED] wrote:
 Hi Everyone,

 I will make this example as simple as possible.

 I have  2 divs, each containing list items. When an item in box #1 is
 clicked, I want to move it to box #2. When that same item is clicked
 in box #2, I want to move it to box #1.

 My co-worker and I are working on this and here is some code he put
 together:http://pastie.caboo.se/137728

 My original method was using something like this:

 $(document).ready(function() {

   $('#suggestedCategories ul li a').click(function() {
   $('#selectedCategoriesList').append('lia href=#
 onclick=removeItem(this); return false;' + $(this).html() +  '/a/
 li');
 $(this.parentNode).remove();

 });
 });

  function removeItem(el) {
 $('#suggestedCategories ul').append('lia href=#' + $(el).html()
 + '/a/li');
 $(el.parentNode).remove();

  }

 I want to know if there is a cleaner easier way to pull this off then
 what was pasted at:http://pastie.caboo.se/137728

 Thanks,
 Bryan


[jQuery] Check/Uncheck all checkboxes

2008-01-10 Thread IschaGast

I have a page that looks like this:
div class=table-of-contents
div class=chapters-title
h3input type=checkbox id=chaper-01 /label
for=chapter-01Chapter title/label/h3
/div
ul class=pages-container
li
div class=pages
ul
liinput type=checkbox id=page-01 
/label
for=page-01Page title/label/li
liinput type=checkbox id=page-02 
/label
for=page-01Page title/label/li
liinput type=checkbox id=page-03 
/label
for=page-01Page title/label/li
liinput type=checkbox id=page-04 
/label
for=page-01Page title/label/li
/ul
/div
/li
/ul
/div

What I want is that when clicking the first checkbox in the h3 all
checkboxes are checked in the div class=pages But they have to be
unchecked when that same checkbox is clicked again.

I thought it would be simple but I tried some things now I am getting
crazy... it won't work. Maybe I am thinking to difficult?


[jQuery] Re: selector in ie7

2008-01-10 Thread John S

Fails in various degrees in everything (IE7, Safari, Opera) except FF.

On Jan 10, 8:57 am, mojo [EMAIL PROTECTED] wrote:
 hi.

 in ff 2.0.0.11 the selector works as expected.
 in ie7 it fails to select anything.

 example on documentation pagehttp://docs.jquery.com/Selectors/attributeEquals
 also look different in said browsers.

 is this a bug?


[jQuery] Bug with dimensions height() fn in IE7

2008-01-10 Thread [EMAIL PROTECTED]

This is a cross post from the UI mailing list -- I mistakenly put it
there when it should have been here. Sorry about that!

I have a div that has a height of 80%, and this line:

$('.class:first').height()

works fine in firefox, but when I try to use it in IE7 it always
returns 1.

Is there a known workaround for this?


[jQuery] Re: n00b q

2008-01-10 Thread Josh Nathanson


You want to use the toggle method, which takes two functions as arguments. 
Example:


$(#link).toggle(
   function() { $(#div).css(color,red); },
   function() { $(#div).css(color,blue); }
);

-- Josh


- Original Message - 
From: s.ross [EMAIL PROTECTED]

To: jquery-en@googlegroups.com
Sent: Thursday, January 10, 2008 9:06 AM
Subject: [jQuery] Re: n00b q




On Jan 10, 2008, at 6:28 AM, Karl Swedberg wrote:



On Jan 10, 2008, at 1:03 AM, s.ross wrote:


This is probably one of those asked-and-answered questions, but I
didn't turn it up in a Google search, doc search, or search of this
group. Here it is: I want to click a link to slide a div down and the
next click slide it back up. Toggle with an effect. Because I am not
triggering the effect off a click on the element whose visibility I
want to toggle, the Event.Toggle method doesn't seem to fit. Here's
the point I've reached, which doesn't quite work. I'm sure there is a
really easy way to do this but I'm not seeing it.

$('a#image').click(function(){
$('#image-drawer')
.filter(':hidden')
.slideDown()
.end()
.filter(':visible')
.slideUp()
;
return false;
});

Thanks,

--s


Hi S,

In your code, it looks like you're first sliding the #image-drawer
element down, and then sliding it back up. I think a
simple .slideToggle() would work fine in this situation:

$('#image').click(function() {
 $('#image-drawer').slideToggle();
});

Hope that helps.

--Karl


Thanks for the quick reply, Karl. That is, indeed what was happening,
and a slideToggle(); does solve the problem. So for me, the remaining
question is: Say I wanted something nonstandard -- say a color or font
size change -- to happen on click, and then on the next click have the
element revert. I'm trying to get a sense of the idiom involved with
getting jQuery to make a click toggle a binary state on another element.

Thx,

--s





[jQuery] Re: Bug with dimensions height() fn in IE7

2008-01-10 Thread Brandon Aaron

The width and height methods are actually found in the core. If you
are able ... Try using the latest SVN version (jQuery 1.2.2 beta2).
There have been lots of improvements to the width/height methods.

--
Brandon Aaron


On Jan 10, 11:20 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
 This is a cross post from the UI mailing list -- I mistakenly put it
 there when it should have been here. Sorry about that!

 I have a div that has a height of 80%, and this line:

 $('.class:first').height()

 works fine in firefox, but when I try to use it in IE7 it always
 returns 1.

 Is there a known workaround for this?


[jQuery] accessing 2d array

2008-01-10 Thread Umshanks

Hi ,
I have just started writing php code. One of my friends suggested I
use jQuery framework. I am using the jQuery.get( url, data, callback )
as:

$.get(../../trial1.php, {checkID: checkBoxID, radioID:
radioButtonID, sDate: startDate, eDate: endDate},
function(data, data1){
alert(Data Loaded:  + data);
}

and what the php returns is a 2-d array.

I would like to know if its possible to receive a 2d array and how I
can access it.

Any information would be appreciated.

Thank you
Umshanks


[jQuery] Re: Check/Uncheck all checkboxes

2008-01-10 Thread IschaGast

I have it working right now but I am wondering if this is the best
way?

$('.chapters-title [EMAIL PROTECTED]').click(function(){
$(this).parents('.chapters-title').next('.pages-
container').find('[EMAIL PROTECTED]').attr('checked',
this.checked);
},function(){
$(this).parents('.chapters-title').next('.pages-
container').find('[EMAIL PROTECTED]').attr('checked', '');
});


[jQuery] Autocomplete does not trigger onchange javascript code in input element.

2008-01-10 Thread dustyt

I am trying to replace a previous bit of html that managed input by
both an input and a select box with a single input field using
jquery.autocomplete.js, but I have not been able to get autocomplete
to use the onchange JavaScript code used by that previous bit of html.
I have gotten autocomplete to display and select all the values
correctly in multiple analogous fields on the same form, but I do not
know how to have it trigger the code that was previously run under an
onchange event. Unfortunately, I do not understand much of the jquery
and autocomplete code, and I am only moderately more familiar with
JavaScript.

I am sorry if this is somewhat of a duplicate message. I posted a
message last night under the same nickname, dustyt, but from a
different account, [EMAIL PROTECTED] I cannot now access the
group from this account (I can read messages--although I do not see my
posting from last night--but the group wants me to join before
posting, yet I am already a member) due to some weirdness with Google
and signing in. When I joined the group last night, it gave me access
to the Members, but now says that I must be a manager to do so or that
jquery_en is not a group. More weirdness.

Here is a bit of the current relevant code:
  input class=text id=city%=addID% type=text
name=city%=addID% size=30 maxlength=120 value=c:out value=$
{partyAddress.city}/ onchange=javascript: updatePartyAddress(this,
%=addID%); 
...
var idList  = %=addIDStringBuffer.toString()%;
var idArray = idList.split(,);

$(document).ready(function() {
  for(var i=0; i idArray.length; i++) {
$(#city+idArray[i]).autocompleteArray(
  [
%=cityList.toString()%
  ],
  {
delay:10,
minChars:1,
matchSubset:1,
onItemSelect:selectItem,
onFindValue:findValue,
autoFill:true,
maxItemsToShow:10
  }
);
  }
});



Perhaps something to do with selectItem is needed?
Any help would be appreciated. Thanks.

Mark R. Thompson


[jQuery] Re: Want to move content back and forth between containers with jquery

2008-01-10 Thread Todd

Karl,

How does this look for an improved version?  (im bryan's coworker that
he spoke of)

$(document).ready(function() {
 var moveLi = function(el) {
if(!el){
$('#suggestedCategories ul li a')
.click(function() {

$(this).parent().appendTo('#selectedCategories ul');
moveLi($(this));
return false;
   });
} else {
$(el).unbind('click')
.click(function() {
var moveTo = 
$(this).parents('div')[0].id ==
'suggestedCategories' ? '#selectedCategories ul' :
'#suggestedCategories ul';
$(this).parent().appendTo(moveTo);
moveLi($(this));
return false;
  });
}
};
moveLi(null);
});

I added the 'el' parameter so that we dont go back an unbind and
rebind the event handlers on every one of the 'li a' elements each
time only one is clicked.  It'll only unbind and rebind the exact one
that was clicked.

Also, I ran Firebug's profiler using the first version of mine that
bryan posted and this new one, and theres not much of a performance
gain.  Specifically I was looking at the increase in memory after
'swapping' content 50 times and the number of calls that get made on a
single 'swap'.  Both methods made somewhere around 200 JS calls.
Around 70-80 of those were directly to jQuery.

Here's another method that I tried and saw more of a boost.  Only
around 112 calls, 52 of which were to jQuery.

$('#suggestedCategories ul li a').click(function() {
$('#selectedCategoriesList').append('lia href=#
onclick=removeItem(this, \'sel\');' + $(this).text() + '/a/
li');
$(this.parentNode).remove();
});

 });

 function removeItem(el, type) {
switch(type){
case 'sel':
$('#suggestedCategories ul').append(lia href=\#\ 
onclick=
\removeItem(this, 'sug');\ + $(el).text() + /a/li);
break;
case 'sug':
$('#selectedCategoriesList').append(lia href=\#\ 
onclick=
\removeItem(this, 'sel');\ + $(el).text() + /a/li);
break;
}
$(el.parentNode).remove();
 }

Im pretty new to jQuery but i would imagine all the jQuery selections
and chained calls are whats behind the increased number of JS calls
that im seeing.  Would I be correct in thinking this?

And also, theres at least 4 ways we've shown how to get the job done
here, so I think its really down to a Performance vs. Code Readability/
Reusability/Maintenance issue now.

On Jan 10, 12:20 pm, Karl Swedberg [EMAIL PROTECTED] wrote:
 Hi Bryan,

 I threw something together pretty quickly, so I'm sure it could be
 further improved.

 Here is a demo, based on your pastie code:

 http://test.learningjquery.com/moveli.html

 Here is the jQuery:

 $(document).ready(function() {
var moveLi = function() {
  $('#suggestedCategories, #selectedCategories').find('li
 a').unbind('click').click(function() {
var moveTo = $(this).parents('div')[0].id ==
 'suggestedCategories' ? '#selectedCategories ul' :
 '#suggestedCategories ul';
$(this).parent().appendTo(moveTo);
moveLi();
return false;
  });
};
moveLi();

 });

 --Karl
 _
 Karl Swedbergwww.englishrules.comwww.learningjquery.com

 On Jan 10, 2008, at 10:13 AM, Bryank wrote:



  Hi Everyone,

  I will make this example as simple as possible.

  I have  2 divs, each containing list items. When an item in box #1 is
  clicked, I want to move it to box #2. When that same item is clicked
  in box #2, I want to move it to box #1.

  My co-worker and I are working on this and here is some code he put
  together:
 http://pastie.caboo.se/137728

  My original method was using something like this:

  $(document).ready(function() {

   $('#suggestedCategories ul li a').click(function() {
   $('#selectedCategoriesList').append('lia href=#
  onclick=removeItem(this); return false;' + $(this).html() +  '/
  a/
  li');
  $(this.parentNode).remove();
  });

  });
  function removeItem(el) {
 $('#suggestedCategories ul').append('lia href=#' + $(el).html()
  + '/a/li');
 $(el.parentNode).remove();

  }

   I want to know if there is a cleaner easier way to pull this off then
  what was pasted at:
 http://pastie.caboo.se/137728

  Thanks,
  Bryan


[jQuery] Inserting element into jQuery object

2008-01-10 Thread Josh Nathanson


I'm having a devil of a time doing something that would seem to be pretty 
basic.


I have a jQuery object with two elements, and I want to insert a new element 
in between them - not altering the DOM, but just the jQuery object.


So if my original jQuery object looks like this when logged in the console:
[ div1, div2 ]

I want it ultimately to look like this, inserting newdiv manually:
[ div1, newdiv, div2 ]

?

-- Josh




[jQuery] Re: Inserting element into jQuery object

2008-01-10 Thread Jonathan Sharp
Hi Josh,

Most likely you'll have to create a new jQuery object. Take a look at the
slice method to grab your elements:
var divs = $('selector'); // [div1, div2]
var divs = $( [ divs.slice(0, 1), newdiv, divs.slice(1, 2) ] );
// divs = [div1, newdiv, div2]

Cheers,
-Jonathan


On 1/10/08, Josh Nathanson [EMAIL PROTECTED] wrote:


 I'm having a devil of a time doing something that would seem to be pretty
 basic.

 I have a jQuery object with two elements, and I want to insert a new
 element
 in between them - not altering the DOM, but just the jQuery object.

 So if my original jQuery object looks like this when logged in the
 console:
 [ div1, div2 ]

 I want it ultimately to look like this, inserting newdiv manually:
 [ div1, newdiv, div2 ]

 ?

 -- Josh





[jQuery] Re: Inserting element into jQuery object

2008-01-10 Thread Josh Nathanson
Aha, the trick is to use the array notation directly as the jQuery argument.  
That's what was tripping me up.

Thanks Jonathan!

-- Josh
  - Original Message - 
  From: Jonathan Sharp 
  To: jquery-en@googlegroups.com 
  Sent: Thursday, January 10, 2008 11:45 AM
  Subject: [jQuery] Re: Inserting element into jQuery object


  Hi Josh,

  Most likely you'll have to create a new jQuery object. Take a look at the 
slice method to grab your elements:
  var divs = $('selector'); // [div1, div2]
  var divs = $( [ divs.slice(0, 1), newdiv, divs.slice(1, 2) ] ); 
  // divs = [div1, newdiv, div2]

  Cheers,
  -Jonathan

   
  On 1/10/08, Josh Nathanson [EMAIL PROTECTED] wrote: 

I'm having a devil of a time doing something that would seem to be pretty
basic.

I have a jQuery object with two elements, and I want to insert a new 
element 
in between them - not altering the DOM, but just the jQuery object.

So if my original jQuery object looks like this when logged in the console:
[ div1, div2 ]

I want it ultimately to look like this, inserting newdiv manually: 
[ div1, newdiv, div2 ]

?

-- Josh






[jQuery] Re: n00b q

2008-01-10 Thread Josh Nathanson



Is there one version that is preferred idiomatically?


It depends on what you're trying to do.  For the standard sliding behavior, 
slideToggle is better (IMO) as it takes fewer lines.  For non-standard 
behavior, i.e. a custom function, you would need to use the toggle method.


-- Josh


- Original Message - 
From: s.ross [EMAIL PROTECTED]

To: jquery-en@googlegroups.com
Sent: Thursday, January 10, 2008 11:37 AM
Subject: [jQuery] Re: n00b q




Yes, this is exactly what I was originally trying to accomplish. The
finished code is:

$('a#image').toggle(
function() {$('#image-drawer').slideDown();},
function() {$('#image-drawer').slideUp();}
);

which is functionally equivalent to:

$('a#image').click(function(){
$('#image-drawer')
.slideToggle('fast')
;
return false;
})

Is there one version that is preferred idiomatically?

Thanks

On Jan 10, 2008, at 10:54 AM, Josh Nathanson wrote:



You want to use the toggle method, which takes two functions as
arguments. Example:

$(#link).toggle(
  function() { $(#div).css(color,red); },
  function() { $(#div).css(color,blue); }
);

-- Josh


- Original Message - From: s.ross [EMAIL PROTECTED]
To: jquery-en@googlegroups.com
Sent: Thursday, January 10, 2008 9:06 AM
Subject: [jQuery] Re: n00b q




On Jan 10, 2008, at 6:28 AM, Karl Swedberg wrote:



On Jan 10, 2008, at 1:03 AM, s.ross wrote:


This is probably one of those asked-and-answered questions, but I
didn't turn it up in a Google search, doc search, or search of this
group. Here it is: I want to click a link to slide a div down and
the
next click slide it back up. Toggle with an effect. Because I am
not
triggering the effect off a click on the element whose visibility I
want to toggle, the Event.Toggle method doesn't seem to fit. Here's
the point I've reached, which doesn't quite work. I'm sure there
is a
really easy way to do this but I'm not seeing it.

$('a#image').click(function(){
$('#image-drawer')
.filter(':hidden')
.slideDown()
.end()
.filter(':visible')
.slideUp()
;
return false;
});

Thanks,

--s


Hi S,

In your code, it looks like you're first sliding the #image-drawer
element down, and then sliding it back up. I think a
simple .slideToggle() would work fine in this situation:

$('#image').click(function() {
$('#image-drawer').slideToggle();
});

Hope that helps.

--Karl


Thanks for the quick reply, Karl. That is, indeed what was happening,
and a slideToggle(); does solve the problem. So for me, the remaining
question is: Say I wanted something nonstandard -- say a color or
font
size change -- to happen on click, and then on the next click have
the
element revert. I'm trying to get a sense of the idiom involved with
getting jQuery to make a click toggle a binary state on another
element.

Thx,

--s








[jQuery] Re: n00b q

2008-01-10 Thread s.ross

Yes, this is exactly what I was originally trying to accomplish. The  
finished code is:

$('a#image').toggle(
function() {$('#image-drawer').slideDown();},
function() {$('#image-drawer').slideUp();}
);

which is functionally equivalent to:

$('a#image').click(function(){
$('#image-drawer')
.slideToggle('fast')
;
return false;
})

Is there one version that is preferred idiomatically?

Thanks

On Jan 10, 2008, at 10:54 AM, Josh Nathanson wrote:


 You want to use the toggle method, which takes two functions as  
 arguments. Example:

 $(#link).toggle(
   function() { $(#div).css(color,red); },
   function() { $(#div).css(color,blue); }
 );

 -- Josh


 - Original Message - From: s.ross [EMAIL PROTECTED]
 To: jquery-en@googlegroups.com
 Sent: Thursday, January 10, 2008 9:06 AM
 Subject: [jQuery] Re: n00b q



 On Jan 10, 2008, at 6:28 AM, Karl Swedberg wrote:


 On Jan 10, 2008, at 1:03 AM, s.ross wrote:

 This is probably one of those asked-and-answered questions, but I
 didn't turn it up in a Google search, doc search, or search of this
 group. Here it is: I want to click a link to slide a div down and  
 the
 next click slide it back up. Toggle with an effect. Because I am  
 not
 triggering the effect off a click on the element whose visibility I
 want to toggle, the Event.Toggle method doesn't seem to fit. Here's
 the point I've reached, which doesn't quite work. I'm sure there  
 is a
 really easy way to do this but I'm not seeing it.

 $('a#image').click(function(){
 $('#image-drawer')
 .filter(':hidden')
 .slideDown()
 .end()
 .filter(':visible')
 .slideUp()
 ;
 return false;
 });

 Thanks,

 --s

 Hi S,

 In your code, it looks like you're first sliding the #image-drawer
 element down, and then sliding it back up. I think a
 simple .slideToggle() would work fine in this situation:

 $('#image').click(function() {
 $('#image-drawer').slideToggle();
 });

 Hope that helps.

 --Karl

 Thanks for the quick reply, Karl. That is, indeed what was happening,
 and a slideToggle(); does solve the problem. So for me, the remaining
 question is: Say I wanted something nonstandard -- say a color or  
 font
 size change -- to happen on click, and then on the next click have  
 the
 element revert. I'm trying to get a sense of the idiom involved with
 getting jQuery to make a click toggle a binary state on another  
 element.

 Thx,

 --s




[jQuery] Pagination stop propagation

2008-01-10 Thread Sebastián V. Würtz





Anyone have an idea why i cant cancel the the normal action of the
button in this example?

http://www.d-scribe.de/webtools/jquery-pagination/demo.htm

y download the page and modified it, only 

   function pageselectCallback(page_id, jq){
  $('#Searchresult').text("Showing search results
"+((page_id*10)+1)+"-"+((page_id*10)+10));
  return false;
 }
   
 $(document).ready(function(){
// Create pagination element
 $("#Pagination").pagination(300, {
 num_edge_entries: 2,
 num_display_entries: 8,
 link_to: "something.htm",
 callback: pageselectCallback
 });

>From the doc
(http://d-scribe.de/webtools/jquery-pagination/lib/jquery_pagination/README)


callback
	A callback function that is called when a user clicks on the link. the The 
	function receives two parameters: the new page id and the pagination 
	container (a DOM element). If the callback returns false, the event 
	propagation is stopped. Default value: ``function(){return false;}``



Thx,




[jQuery] Bigger Link Plugin

2008-01-10 Thread cfdvlpr

I want to do something like this:

a href=/test.cfm class=testBiggerLink
  div class=anotherClass
   Click Here
   to ... bgo here/b
   more text
   img src=/test.png /
  /div
/a

Is there anything wrong with the above HTML?
Is this what the bigger link plugin is designed for?

http://plugins.jquery.com/project/biggerlink


[jQuery] Re: Bigger Link Plugin

2008-01-10 Thread Jörn Zaefferer


cfdvlpr schrieb:

I want to do something like this:

a href=/test.cfm class=testBiggerLink
  div class=anotherClass
   Click Here
   to ... bgo here/b
   more text
   img src=/test.png /
  /div
/a

Is there anything wrong with the above HTML?
  
Yes, it is. A div is a block element, a a is inline element. The 
browser most likely inteprets that as this:


a/div/

Jörn


[jQuery] Re: Bigger Link Plugin

2008-01-10 Thread Smith, Allex

Not sure about the plug-in, but block level elements (div /) should
never go inside an inline element (a /). 

Validation will cringe and fail.

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of cfdvlpr
Sent: Thursday, January 10, 2008 3:45 PM
To: jQuery (English)
Subject: [jQuery] Bigger Link Plugin



I want to do something like this:

a href=/test.cfm class=testBiggerLink
  div class=anotherClass
   Click Here
   to ... bgo here/b
   more text
   img src=/test.png /
  /div
/a

Is there anything wrong with the above HTML?
Is this what the bigger link plugin is designed for?

http://plugins.jquery.com/project/biggerlink


[jQuery] Re: Bigger Link Plugin

2008-01-10 Thread cfdvlpr

That's what I thought too, but it actually seems to work for me in
Firefox 2, IE 6, and IE 7.

On Jan 10, 3:56 pm, Smith, Allex [EMAIL PROTECTED] wrote:
 Not sure about the plug-in, but block level elements (div /) should
 never go inside an inline element (a /).

 Validation will cringe and fail.



[jQuery] Re: Bigger Link Plugin

2008-01-10 Thread boermans

Your HTML is invalid (block level element div, inside an inline
element a).
Fortunately this is an excellent example what the biggerlink plugin
was created to do.

You can rearrange your HTML to something like:

div class=testBiggerLink
   a href=/test.cfmClick Here/a
   to ... bgo here/b
   more text
   img src=/test.png /
/div

Then your js would be something like:

$(function(){
$('.testBiggerLink').biggerlink();
});

The plugin code will find the contained link and make the div
'clickable'.

Hope this helps!
Cheers
Ollie

On Jan 11, 9:44 am, cfdvlpr [EMAIL PROTECTED] wrote:
 I want to do something like this:

 a href=/test.cfm class=testBiggerLink
   div class=anotherClass
Click Here
to ... bgo here/b
more text
img src=/test.png /
   /div
 /a

 Is there anything wrong with the above HTML?
 Is this what the bigger link plugin is designed for?

 http://plugins.jquery.com/project/biggerlink


[jQuery] Re: [ANNOUNCE] Cornerz - Bullet Proof Curved Corners using Canvas/VML

2008-01-10 Thread Olivier Percebois-Garve


Hi
On Opera 9.25 the corners of the green titles is not at the right 
position. Its something like 12 px too much to right and 4px too much down.


On the example BORDER: 1 DISPLAY: INLINE
the 4 corners seems to be too much inside of the block and should move 
of 2px approximativelly.



weepy wrote:

Hi I'd like to announce my latest jQuery plugin. I hope you'll find it
useful.

FEATURES:

# Antialiased
# Very Fast
# Support for any size radius and border width with minimal
performance increase
# No excanvas
# Current layout is maintained
# Works with all tested positions/display/floats
# Supports fluid layouts
# Original div still shows through, so can easily do hover/background
effects
# Script is only 4.0k uncompressed

Issues
# IE6 has some slight problems with the VML in some cases
# Mac/Safari doesn't work (Windows Safari is fine)

You can see it in action here :

http://www.parkerfox.co.uk/cornerz

Look forward to your comments

Jonah

  




[jQuery] Re: Inserting element into jQuery object

2008-01-10 Thread Ariel Flesler

I have a shorter and crazier way :)

var divs = $('selector'); // [div1, div2]
[].splice.call( divs, 1, 0, newdiv );// [div1, newdiv, div2]

Cheers
Ariel Flesler

On 10 ene, 17:52, Josh Nathanson [EMAIL PROTECTED] wrote:
 Aha, the trick is to use the array notation directly as the jQuery argument.  
 That's what was tripping me up.

 Thanks Jonathan!

 -- Josh



   - Original Message -
   From: Jonathan Sharp
   To: jquery-en@googlegroups.com
   Sent: Thursday, January 10, 2008 11:45 AM
   Subject: [jQuery] Re: Inserting element into jQuery object

   Hi Josh,

   Most likely you'll have to create a new jQuery object. Take a look at the 
 slice method to grab your elements:
   var divs = $('selector'); // [div1, div2]
   var divs = $( [ divs.slice(0, 1), newdiv, divs.slice(1, 2) ] );
   // divs = [div1, newdiv, div2]

   Cheers,
   -Jonathan

   On 1/10/08, Josh Nathanson [EMAIL PROTECTED] wrote:

     I'm having a devil of a time doing something that would seem to be pretty
     basic.

     I have a jQuery object with two elements, and I want to insert a new 
 element
     in between them - not altering the DOM, but just the jQuery object.

     So if my original jQuery object looks like this when logged in the 
 console:
     [ div1, div2 ]

     I want it ultimately to look like this, inserting newdiv manually:
     [ div1, newdiv, div2 ]

     ?

     -- Josh- Ocultar texto de la cita -

 - Mostrar texto de la cita -


[jQuery] Re: [ANNOUNCE] jQuery.Collection released

2008-01-10 Thread Ariel Flesler

Hi
  I made a small upgrade and released 1.0.1.
Although there aren't many changes, there is one that is IMO quite
interesting ( the function implement ).
I think many people didn't quite understand what is this plugin about,
I removed the demo, and moved the examples to the project page, added
a few more, and wrote a small API.
I really think this can be used for cool stuff. For example you can
pretend you are extending the prototype of native types (like
Prototype does) without committing any sin :), you can manipulate many
strings or arrays with only one function call. One could even
manipulate different jQuery objects together.

Please give it a chance :)
The small API I mentioned, is linked in the project page as the
documentation.
Project page: http://plugins.jquery.com/project/Collection

Ariel Flesler

On 9 ene, 19:38, Ariel Flesler [EMAIL PROTECTED] wrote:
 Hi Jorn

 Metaplugin sounds like a good name to describe the concept. I' added
 the plugin to the Metaplugin category so... YAY, I'm the first
 one :)
 I didn't quite get the you could implement yourself with jQuery
 item.

 Sounds like they are not very complex plugins.
 As for the second item. I dunno if it surely applies to all
 metaplugins (utilitary plugins that extend jQuery's core as I see it).
 It doesn't apply to jQuery.Collection.

 Thanks for checking Jorn

 Ariel Flesler

 On 9 ene, 19:16, Jörn Zaefferer [EMAIL PROTECTED] wrote:



  Hi Ariel,

  it looks like your plugin fits the term metaplugin quite well. I've
  created that term to describe plugins that:
  - you* could implement yourself with jQuery
  - it can be difficult to implement across browsers
  - users won't notice them

  Seehttp://www.slideshare.net/joern.zaefferer/the-onion-147705forthe
  presentation mentioning metaplugins.

  I've just added a category Metaplugin so you can be the first to
  actually present a metaplugin labeled as one.

  Regards
  Jörn

  * the user of the plugin- Ocultar texto de la cita -

 - Mostrar texto de la cita -


[jQuery] clueTip activate

2008-01-10 Thread motob

I want to use the clueTip plugin to give helpful advice or help to
users filling out a specific form field. But I only want the clueTip
to display if they type invalid characters.

For example, I only want numbers to be typed into a field. If they
type letters, or any other special characters, I want a clueTip to
display suggesting that they fix it.

I don't want the tip to appear when the user hovers over the field or
clicks on it. Is it possible to disable clueTip's activate option and
only have the tip display when triggered by another script?

I'm using Denny Ferrassoli's (www.dennydotnet.com) typeWatch plugin to
pattern match the user's input and if its invalid, I want to display
the clueTip over the particular field.

Any ideas?

Thanks



[jQuery] File - initial path

2008-01-10 Thread Joel Lobo

I need to select initial path in the dialog box in a input file. This
is possible?

var input = $(:file).css({ADD HERE});

Tks,
Joel Lobo


[jQuery] Re: sort existing li elements

2008-01-10 Thread chrismarx

ok, i found this page, what a useful plugin!!

http://groups.google.com/group/jquery-en/browse_thread/thread/e0d6c199552dd1f7/2f05ad6d400dd962?lnk=gstq=array+sorting#2f05ad6d400dd962

and created this function, which fades out the ul container, sorts the
li's, and shows everything again. very sweet!
sort:function(){
$(#csorttype).change(function(){
if($(this).val() == diggs){
$(#c-rply-to0).animate({opacity:0,
backgroundColor:lightyellow},500);
var afterSort = jQuery.aop.after( {target: $, 
method: 'appendTo'},
function(){
$(#c-rply-to0).animate({opacity:1, 
backgroundColor:white},
500);
afterSort.unweave();
});
$(#c-rply-to0 
li:not([author='backup'])).sort(function(a,b){
return a.getAttribute(rate)  
b.getAttribute(rate) ? 1 : -1;
}).appendTo(#c-rply-to0)
}
})
}

On Jan 9, 11:42 pm, chrismarx [EMAIL PROTECTED] wrote:
 i'm looking for a plugin or code to sort an existing list of li
 elements, without going back to the server. anyone seen this already?


[jQuery] html character encode

2008-01-10 Thread acesfull9

I have a form that on submit is doing an update/insert to a database
via ajax.  When it is an insert and it is successful I append a row to
a table with the elements they entered (they are not sent back from
the server, just a success, error result is returned).

Maybe I have to send them back in the response to properly do this? I
dont know.

Is there any function in javascript/jquery to convert characters such
as  and  to their html code equivalents or must I write a
function to do this myself(I know this is possible just looking for a
better route).  Basically I need a javascript equivalent of
htmlspecialchars($string) in PHP.  Any help or suggestions would be
greatly appreciated.
Thanks!


[jQuery] Re: $.load() javascript problems in IE and Safari

2008-01-10 Thread fuzziman


I was wondering if anyone could tell me why firefox still runs the scripts,
even though they are not explicitly evaluated... the appendChild by itself
seems to be enough to get firefox to run inline scripts which are not on the
top level.


Jim Marion wrote:
 
 
 The eval is in the domManip. It looks like $.load calls .html which
 calls .append. append calls domManip. The only problem is that the
 code doesn't do a deep search for script tags in IE. Therefore, for
 IE, you script tags have to be at the top level. They don't appear to
 get evaluated if they are buried deeper in the document.
 
 

-- 
View this message in context: 
http://www.nabble.com/%24.load%28%29-javascript-problems-in-IE-and-Safari-tp12597156s27240p14744781.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: Bug with dimensions height() fn in IE7

2008-01-10 Thread [EMAIL PROTECTED]

Thanks for the reply!

Do you mean this bit of code:

jQuery.each( [ height, width ], function(i,n){
jQuery.fn[ n ] = function(h) {
return h == undefined ?
( this.length ? jQuery.css( this[0], n ) : null ) :
this.css( n, h.constructor == String ? h : h + px );
};
});

Got it from here:

http://dev.jquery.com/browser/branches/1.2/src/jquery/jquery.js



On Jan 10, 2:30 pm, Brandon Aaron [EMAIL PROTECTED] wrote:
 The width and height methods are actually found in the core. If you
 are able ... Try using the latest SVN version (jQuery 1.2.2 beta2).
 There have been lots of improvements to the width/height methods.

 --
 Brandon Aaron

 On Jan 10, 11:20 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:

  This is a cross post from the UI mailing list -- I mistakenly put it
  there when it should have been here. Sorry about that!

  I have a div that has a height of 80%, and this line:

  $('.class:first').height()

  works fine in firefox, but when I try to use it in IE7 it always
  returns 1.

  Is there a known workaround for this?


[jQuery] problems to animate in IE

2008-01-10 Thread MrGubu


Why this doesn't work in IE?

$(#nav  ul  li  a).hover(function () {
$(this).animate({ 
marginTop: -3px,

}, 200 );
},function(){
$(this).animate({ 
marginTop: 0,

}, 200 );
});

-- 
View this message in context: 
http://www.nabble.com/problems-to-animate-in-IE-tp14746811s27240p14746811.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: Attribute selector (^=) problem with multiple values

2008-01-10 Thread truent

Im seeing this too.

This Works.

$(document).ready(

function() {

$(input).each(

function(i){
alert('hi');
}

);




This does not:

$(document).ready(

function() {

$(input[id]).each(

function(i){
alert('hi');
}

);



php webpage snippit




fieldset class= collapsiblelegendCategories/legenddiv
class=form-item
 label for=edit-taxonomy-8Aid Year: span class=form-required
title=This field is required.*/span/label
 select name=taxonomy[8][] multiple=multiple  class=form-select
required id=edit-taxonomy-8  size=4option value=23
selected=selected2006-07/optionoption value=202007-08/
optionoption value=212008-09/optionoption value=222009-10/
option/select

 div class=descriptionSelect one or more aid years (hold down
[Ctrl] to select more than one year)./div
/div
div class=form-item
 label for=edit-taxonomy-5Product: /label
 select name=taxonomy[5] class=form-select id=edit-taxonomy-5
option value=0lt;nonegt;/optionoption value=25Batch
Program/optionoption value=24Desktop Application/optionoption
value=26Electronic Data Interchange/optionoption
value=13PeopleSoft/optionoption value=15-Modules/
optionoption value=16-Reports/optionoption value=14Web
Applications/option/select

/div
div class=form-item
 label for=edit-taxonomy-9Eqiupment Request: /label
 select name=taxonomy[9] class=form-select id=edit-taxonomy-9
option value=0lt;nonegt;/optionoption value=32Laptop/
optionoption value=34Projector/optionoption
value=33Videoconference Setup/option/select
/div
/fieldset




Im trying to grab those taxonomy selects...




On Dec 20 2007, 2:22 am, Nicolas Le Thierry d'Ennequin
[EMAIL PROTECTED] wrote:
 Hi jQuery group,

 The simple piece of code below is designed to highlight table cells
 whose class name is that of the currently hovered one (to visually
 group them). In my example the class name itself is film + id (film1,
 film2, etc) so I use the [attribute^=value] selector. OK to that
 point, but if the class attribute happens to have whitespace-separated
 extra content for css purposes (eg class=film1 small ), the
 selector doesn't capture the element. More generally it seems to dodge
 any attribute value ending with a white-space + another char. Any idea
 why?

 code
 $(document).ready(function() {
   $([class^='film']).bind(mouseover,function() {
 $
 (.+this.attributes['class'].value).css({cursor:pointer,background-
 color:#FFCC99});
   });
   $([class^='film']).bind(mouseout,function() {
 $
 (.+this.attributes['class'].value).css({cursor:pointer,background-
 color:transparent});
   });
 /code

 Thanks.


[jQuery] Sorting numerically based on number of occurrences

2008-01-10 Thread 1man

Hello,

Hopefully someone can give me a few pointers on how to impliment this,
i'm not sure if its a jquery only or some sort of jquery / standard
javascript hybrid solution that is needed.

I'm looking to grab a set of 10 to 20 names from a XML file, and then
sort them based on the number of times the occur in the XML file. So
say i have

xml
nameJohn/name
nameSmith/name
nameJones/name
nameDoe/name
nameJones/name
nameSmith/name
nameJones/name
/xml

I want to pull these names into an object / array then sort them by
number of occurrences on a page. They would output on the page like
so..

Jones(3)
Smith(2)
Doe(1)
John(1)

Now i have managed to pull the names in fine, and created an array of
all the names, i'm just a little unsure on what to do next with the
sorting issue, and how to do this.

Any input on the problem would be greatly appreciated.
Thanks
1man


[jQuery] htmlspecialchars($string) equivalent

2008-01-10 Thread acesfull9

is there a javascript/jQuery equivalent to htmlspecialchars($string)
in PHP


[jQuery] reload of main page

2008-01-10 Thread [EMAIL PROTECTED]

Hello,

How can i make it happen, that after closing thickbox or something
else the page reloads?
my problem is that after loggin in the menu should get an other
content..
i hope you understand what i mean...

thx.


[jQuery] Re: [ANOUNNCE] Comet

2008-01-10 Thread Morgan Allen
Couple updates. Batch control, start of transport management, working out
better event handling. I think everything is in place for the chat demo to
completely work, but I have not had time yet to rewrite the whole thing.
Feed back appreciated as usual.


On Jan 9, 2008 10:17 AM, Morgan Allen  [EMAIL PROTECTED] wrote:

 Thanks. Peter, I agree with your suspicions for transport issues. That is
 the second major goal for me after I am sure the protocol portions are
 working. I will then start implementing cross domain calls.


 On Jan 8, 2008 9:11 PM, Peter E Higgins [EMAIL PROTECTED] wrote:

 
  On Tuesday 08 January 2008, Morgan Allen wrote:
   I have been working on implementing the Bayeux protocol in jQuery and
  with
   the recent talk on the list about LIVE ajax and server pushing I
  thought
   now would be a good time to release the early work and start getting
  some
   feedback. It will work on Jettys Cometd Echo Demo. To get it to work,
   remove all the dojo scripts, and jquery and this plugin. In your on
  ready
   add $.comet.init('/cometd'). Bind a listener to an element listening
  for
   '/service/echo' and publish ($.comet.publish) a message to the echo
  service
   $.comet.publish('/service/echo', {msg: 'what ever message'}). The
  second
   param of the event trigger will be that data return from the Cometd
  server.
   Subscriptions are a bit shaky at the moment, I am rewriting the
  chatroom
   demo to ensure it is working. Check out the code at
   http://morglog.alleycatracing.com/wordpress/?p=20
   and the project page at
   http://plugins.jquery.com/project/Comet
 
  Thats great!  I'm anxious to see this evolve, so please keep us/me
  informed.
  The first limitation I suspect is the single transport forcing
  same-domain/same-port xhr-limitations ... i'd also suggest implementing
  an
  unsubsribe method, because you won't always want to be be polling on
  some
  channels.  Awesome stuff though.  Looking forward to seeing where you
  can
  take it. I am a big fan of comet.
 
  Regards,
  Peter Higgins
 



 --
 http://morglog.alleycatracing.com
 Lets make up more accronyms!

 http://www.alleycatracing.com
 LTABOTIIOFR! ROFL! ROFL! ROFL!
 Upcoming alley cats, reviews, touring logs, and a general congregation of
 bike nerdity.




-- 
http://morglog.alleycatracing.com
Lets make up more accronyms!

http://www.alleycatracing.com
LTABOTIIOFR! ROFL! ROFL! ROFL!
Upcoming alley cats, reviews, touring logs, and a general congregation of
bike nerdity.


[jQuery] get value of checked checkboxes into a list

2008-01-10 Thread Duncan
All,

I am lost right now, still pretty green with jQuery. I have a number of
checkboxes on a page

input type=checkbox name=listProductID value=2
input type=checkbox name=listProductID value=3
input type=checkbox name=listProductID value=4
input type=checkbox name=listProductID value=5

and a button at the end.

button name=editOptions id=editOptionsEdit /button

I would like to have the value of alll checked checkboxes put into a list
for use in a variable.

how would I go about this?

$().ready(function() {
$('#editOptions').click(function(){
alert($('#listProductID').val());//returns only the first value,
selected or not
});
});

Thanks

-- 
Duncan I Loxton
[EMAIL PROTECTED]


[jQuery] Ajax links not working

2008-01-10 Thread 700lbGorilla

Hello,

I'm having a problem running a function on links inserted with Ajax at
the following address http://tinyurl.com/3crrvv

I have three unordered lists a main, sub, and sub-sub. When a link in
the main is clicked it retrieves the corresponding sublinks and
inserts them into the sub list. Then for test purposes if I click a
link in the sub list a sub sub list appears. For test purposes the sub-
sub list is prepopulated just to see it show. However my function
won't run when the second lists links are inserted. But if those ones
are hardcoded in to start it works fine. So for whatever reason the
links retrieved from ajax won't run the click function.

Code:

startval = '';
$('#submenu').hide();
$('#subsubmenu').hide();
$('#topmenu li a').click(function() {
linkval = $(this).text();
if(startval == linkval)
{
alert(Same Link idiot!);
} else {
$.ajax({
type: GET,
url: menu.php?name=+escape(linkval),
dataType: html,
success: function(msg){
$('#submenu').html(msg);
}
});
$('#topmenu li a').removeClass('on');
$('#topmenu li a').addClass('off');
$(this).removeClass(off);
$(this).addClass(on);
$('#submenu').show();
//startval = linkval;
}
return false;
});
$('#submenu li a').click(function() {
$('#submenu li a').removeClass('on');
$('#submenu li a').addClass('off');
$(this).removeClass(off);
$(this).addClass(on);
$('#subsubmenu').show();
return false;
});
});

HTML:

ul id=topmenu
lia class=off href=#Current Projects/a/li
lia class=off href=#Previous Work/a/li
lia class=off href=#Writing/a/li
lia class=off href=#Current News/a/li
lia class=off href=#Lectures and Teaching/a/li
lia class=off href=#Presentation Info/a/li
lia class=off href=#Bio/a/li
lia class=off href=#Press/a/li
lia class=off href=#Store/a/li
/ul

ul id=submenu
li/li
/ul

ul id=subsubmenu
lia href=#Test/a/li
lia href=#Test/a/li
/ul

Hope I explained it alright, right now on the site the first two links
retrieve the sub ones, which works. But clicking the new links won't
bring up the hidden #subsublist.