[jQuery] Basic custom Plugin not working

2010-01-06 Thread morraine
Hi guys i have tried to create my first plugin but its giving me some
odd behaviour.

what im trying to achieve is to put default text in an empty input
field and hide it when the field has focus and then show it again if
nothing was entered into the field on blur. This i have done pretty
easy but the problem start when i use the plugin on more than one
input filed per page and it treats all field like the last one in the
sequence. so if i focus the first field the text in the last filed in
the sequence will disappear ?!?!

This is my code for this simple plugin
Can anyone see the glaring mistake that i must have made

function($){
   jQuery.fn.showhideinput = function(options) {

  var defaults = {
 text: dd/mm/
};
  var options = $.extend(defaults, options);
  return this.each(function(index) {
obj = $(this);
 objid = '#'+obj.attr('id');
 var inputtext = obj.val();
 if (inputtext == ''){
obj.val(options.text);
inputtext = options.text;
 }
 obj.focus(function () {
//alert(objid + ' focus');
if (obj.val() == inputtext){
   $(objid).val('');
}
 });
 obj.blur(function () {
//alert(objid + ' blur');
if (obj.val() == ''){
   $(objid).val(inputtext);
}
 });
  });
   };
})(jQuery);


[jQuery] Pass object to function

2010-01-06 Thread knal
Hi there,

I have a function which controls my interface. If people click on a
link with the class 'less' i would like a dive to slide up.
My code roughly looks like this:

$(a.less).livequery( 'click', function() {
var cur_project_id = ( $(this).closest( div.project ).attr
( id ) );
$( #+cur_project_id ).closeProject( cur_project_id );
return false;
});

$.fn.extend({
closeProject: function( projectID ) {
$( #+projectID+ .morebody ).slideUp('normal')
}
});


It works, but as you can see i pass the object twice to the function,
but i know i shouldn't have to and be able to only write something
like:

$( #+$(this).closest( div.project ).attr( id ) ).closeProject
(); // -- nothing between last brackets!

I hope this is clear and makes sense!

Thanks in advance,
Knal


[jQuery] Expectetd identifier, string on number

2010-01-06 Thread youradds
Hi,

Got a bit of a weird issue in IE 8 with this code:

 jQuery.getJSON(/v.f, {  do: wiki_ajax, id:  jQuery
(this).val(), field: 1 }, function(j){

The whole function is:

 jQuery.noConflict();


 jQuery(function(){
 jQuery(select#article_is_in_1).change(function(){
 jQuery.getJSON(/v.f, {  do: wiki_ajax, id:  jQuery
(this).val(), field: 1 }, function(j){

 clear_further_up(2);

 jQuery('#article2').hide();
 jQuery('#article3').hide();
 jQuery('#article4').hide();
 jQuery('#article5').hide();
 jQuery('#article6').hide();
 jQuery('#article7').hide();
 jQuery('#article8').hide();
 jQuery('#article9').hide();
 jQuery('#article10').hide();
 jQuery('#article11').hide();
 jQuery('#article12').hide();
 jQuery('#article13').hide();
 jQuery('#article14').hide(); ;


 var options = '';
 for (var i = 0; i j.length; i++) {
 options += 'option value=' + j
[i].optionValue + '' + j[i].optionDisplay + '/option';
 }
 jQuery(#article_is_in_2).html(options);
 jQuery('#article_is_in_2 option:first').attr
('selected', 'selected');

 if (j.length  1) {
   jQuery('#article2').show();
 }


 })
 });
});

Can anyone suggest what is wrong with it? Works perfectly fine in FF
and Chrome :/

TIA

Andy


[jQuery] Re: Expectetd identifier, string on number

2010-01-06 Thread youradds
Ah never mind - found it:

do: wiki_ajax,

For some reason it doesn't like do: , so I renamed to wiki_do, and its
fine now

Wonder why that is?

TIA

Andy


On Jan 6, 11:46 am, youradds andy.ne...@gmail.com wrote:
 Hi,

 Got a bit of a weird issue in IE 8 with this code:

                  jQuery.getJSON(/v.f, {  do: wiki_ajax, id:  jQuery
 (this).val(), field: 1 }, function(j){

 The whole function is:

  jQuery.noConflict();

  jQuery(function(){
          jQuery(select#article_is_in_1).change(function(){
                  jQuery.getJSON(/v.f, {  do: wiki_ajax, id:  jQuery
 (this).val(), field: 1 }, function(j){

                                                  clear_further_up(2);

                                  jQuery('#article2').hide();
                          jQuery('#article3').hide();
                          jQuery('#article4').hide();
                          jQuery('#article5').hide();
                          jQuery('#article6').hide();
                          jQuery('#article7').hide();
                          jQuery('#article8').hide();
                          jQuery('#article9').hide();
                          jQuery('#article10').hide();
                          jQuery('#article11').hide();
                          jQuery('#article12').hide();
                          jQuery('#article13').hide();
                          jQuery('#article14').hide(); ;

                          var options = '';
                          for (var i = 0; i j.length; i++) {
                                  options += 'option value=' + j
 [i].optionValue + '' + j[i].optionDisplay + '/option';
                          }
                          jQuery(#article_is_in_2).html(options);
                          jQuery('#article_is_in_2 option:first').attr
 ('selected', 'selected');

                          if (j.length  1) {
                                jQuery('#article2').show();
                          }

                  })
          });

 });

 Can anyone suggest what is wrong with it? Works perfectly fine in FF
 and Chrome :/

 TIA

 Andy


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

2010-01-06 Thread Paul Collins
That works Johan, thanks very much.

Doesn't validate, but I guess that's not the end of the world...

Thanks again.
Paul


2010/1/6 Johan Borestad johan.bores...@gmail.com

 Hi Paul!
 This is a case where you really don't even should use Javascript,
 unless you're trying to do some fancy animations. Rely entirely on CSS
 with a simple css-rule

 #thumbs li.selected {
   filter:alpha(opacity=50);
   opacity:0.50;
 }

 This will also be much much faster than any other solutions.
 / Johan


 On Jan 5, 7:50 pm, Paul Collins pauldcoll...@gmail.com wrote:
  Sorry, the test page:http://paulcollinslondon.com/test/test.html
 
  2010/1/5 Paul Collins pauldcoll...@gmail.com
 
   Thanks very much for your help Brian. That works, but I think the
 problem
   may go deeper than I thought! I've put up a test page.
 
   I'm using the JQuery Opacity Rollover Script as a part of the
 Gallerific
   plugin  http://www.twospy.com/galleriffic/#1
 
   To try and keep this simple, when you hover over a thumbnail, it
 originally
   went from dark to light. I've reversed the order of this in
   mouseOutOpacity  mouseOverOpacity on the scripts.js 
   jquery.opacityrollover.js, so now they are full opacity by default and
 half
   when you hover over. There is a selected class applied when you click
 on a
   thumbnail and I want to make the opacity stay at half when you click on
 it.
 
   There seems to be a default on all list items of the thumbs ul of
   opacity: 1; I want to change it to 0.5 when an item has a class of
 selected,
   but can't get it to work.
 
   I've tried removing the inline style first using
 
   $(#portfolio #thumbs li.selected).removeAttr(style);
 
   But this doesn't work.
 
   Sorry for the long windedness of this post, but if anyone could even
 give
   me a hint of where to start looking, I would be really grateful.
 
   Thanks
 
   2010/1/5 brian zijn.digi...@gmail.com
 
   Just put the class in the selector instead of testing for it first:
 
   $(#portfolio #thumbs li.selected).css('opacity','0.5');
 
   If the class doesn't exist, jQuery will do nothing (instead of
   throwing an undefined error or similar).
 
   On Tue, Jan 5, 2010 at 12:45 PM, Paul Collins pauldcoll...@gmail.com
 
   wrote:
Hi all
 
I've been stuck on this for four hours, and I still can't solve it!
 
I am trying to check if a list item has a class of selected, then is
 so
change the opacity to 0.5. Here is my code:
 
if ($(#portfolio #thumbs ul li).hasClass(.selected)) {
$(this).css('opacity','0.5');
}
 
It seems that the this part isn't working, is it to do with
 putting it
   in
an event?
 
Would appreciate any help



[jQuery] How do i get this mega dropdown with jQuery??

2010-01-06 Thread 123gotoandplay
Hi all,

I am trying to get this mega dropdown menu:
see textielmuseum.nl/

So far i have:
bldd.nl/prototypes/megamenu/test2.html

But i can´t get the hoverIntent to work?
here´s my try W.I.P
bldd.nl/prototypes/megamenu/test4.html

Any tips, ideas how i to get my mega dropdown to work on hover and
hide it???

Regards,


[jQuery] Re: Pass object to function

2010-01-06 Thread Šime Vidas
why not just

$(a.less).live('click', function() {
$(this).closest(.project).find(.morebody).slideUp
(normal);
return false;
});

??


[jQuery] Re: iTunes Style Slider

2010-01-06 Thread MorningZ
it's been coded in jQuery before, like

http://www.blarnee.com/projects/coverflow/

i recall that one of the people on the jQuery UI team was messing
around with that effect as well

On Jan 5, 10:22 pm, Matt Quackenbush quackfu...@gmail.com wrote:
 Hello,

 I found an iTunes style slider/rotator that has been done in
 blasphemyMooTools/blasphemy, demoed 
 here:http://www.outcut.de/MooFlow/example-ajax.html.  I was wondering if 
 either
 a) such a thing already existed in a jQuery plugin, or b) if there was a
 jQuery master who could port it in quick fashion?  If b), please contact me
 off-list and let me know how much you would charge and what the turnaround
 time would be.  :-)

 Thanks in advance!


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

2010-01-06 Thread Scott Sauyet
On Jan 5, 9:43 am, Bruce brucejin...@gmail.com wrote:
 Is there a jQuery way of doing this Prototype bind?

I don't know about built-in means, but here is one that Google
provides:

http://groups.google.com/group/jquery-en/msg/0980e113f097720a

  -- Scott


[jQuery] Re: Pass object to function

2010-01-06 Thread knal
Because i'm using the slide effect on multiple places so i would like
to create a function for it.
I just seem to be unable to get the object passed into the function
the way it 'should'...

Thanks for your reply though!

On Jan 6, 2:54 pm, Šime Vidas sime.vi...@gmail.com wrote:
 why not just

     $(a.less).live('click', function() {
         $(this).closest(.project).find(.morebody).slideUp
 (normal);
         return false;
     });

 ??


[jQuery] jQuery parent remove

2010-01-06 Thread Lone Wolf
Hi,

I am having problem with this function.

$(document).ready(function(){
$('table.small td img.delete').click(function(){
  $.get('ajax/update-callback.php', {doaction: 'remove', callbackid: $
(this).attr('id')},
function(data){
alert($(this).attr('id'));
$(this).remove();
  });
});
});


update-callback.php is called and the function is performed by php.
However, in the callback function of the jQuery, $(this) is not
available as alerting its attr('id') gives undefined which it happily
added in the GET of the update-callback.php. Can you tell me what I
could be doing wrong.

Kind Regards,


[jQuery] Re: Expectetd identifier, string on number

2010-01-06 Thread MorningZ
Wonder why that is? 

https://developer.mozilla.org/En/Core_JavaScript_1.5_Reference/Reserved_Words

it's just that browsers other than IE handle it (much) more
gracefully  :-)

Also just a quick tip on your code in general... if you know the ID of
something, then use *just* the ID for the selector... so in your code

 jQuery(select#article_is_in_1);

should be

 jQuery(#article_is_in_1)

the first is slower because it is like find all select objects on the
page, then find the one with this ID

the second is faster because it'll use document.getElementById, which
is very fast   :-)

if you want to read more: http://www.componenthouse.com/article-19


All the multiple .hide() calls could be cleaned up too... even if it's
just a loop if it has to be 2 through 14

for (var j=2; j = 14) {
jQuery('#article' + j).hide();
}




On Jan 6, 6:47 am, youradds andy.ne...@gmail.com wrote:
 Ah never mind - found it:

 do: wiki_ajax,

 For some reason it doesn't like do: , so I renamed to wiki_do, and its
 fine now

 Wonder why that is?

 TIA

 Andy

 On Jan 6, 11:46 am, youradds andy.ne...@gmail.com wrote:

  Hi,

  Got a bit of a weird issue in IE 8 with this code:

                   jQuery.getJSON(/v.f, {  do: wiki_ajax, id:  jQuery
  (this).val(), field: 1 }, function(j){

  The whole function is:

   jQuery.noConflict();

   jQuery(function(){
           jQuery(select#article_is_in_1).change(function(){
                   jQuery.getJSON(/v.f, {  do: wiki_ajax, id:  jQuery
  (this).val(), field: 1 }, function(j){

                                                   clear_further_up(2);

                                   jQuery('#article2').hide();
                           jQuery('#article3').hide();
                           jQuery('#article4').hide();
                           jQuery('#article5').hide();
                           jQuery('#article6').hide();
                           jQuery('#article7').hide();
                           jQuery('#article8').hide();
                           jQuery('#article9').hide();
                           jQuery('#article10').hide();
                           jQuery('#article11').hide();
                           jQuery('#article12').hide();
                           jQuery('#article13').hide();
                           jQuery('#article14').hide(); ;

                           var options = '';
                           for (var i = 0; i j.length; i++) {
                                   options += 'option value=' + j
  [i].optionValue + '' + j[i].optionDisplay + '/option';
                           }
                           jQuery(#article_is_in_2).html(options);
                           jQuery('#article_is_in_2 option:first').attr
  ('selected', 'selected');

                           if (j.length  1) {
                                 jQuery('#article2').show();
                           }

                   })
           });

  });

  Can anyone suggest what is wrong with it? Works perfectly fine in FF
  and Chrome :/

  TIA

  Andy


[jQuery] (autocomplete) Half of page disappears in IE7 when autocomplete list shows

2010-01-06 Thread Rune
Hi

I use autocomplete newest version on

http://www.kle-online.dk/stage

Things work great in FF and IE8 but in IE7 half of the page disappears
when the autocomplete list shows. Try to type benz in the search
field and problem should be easy to see.

Cheers,
Rune


[jQuery] Re: How do i get this mega dropdown with jQuery??

2010-01-06 Thread Chris
I wouldn't really call that a mega dropdown. All it is is 2 divs,
the second one hidden and sliding into view when you mouseover the
first. The menu items themselves appear to be completely irrelevant as
far as the dropdown effect is concerned.

On Jan 6, 8:37 am, 123gotoandplay wesweatyous...@gmail.com wrote:
 Hi all,

 I am trying to get this mega dropdown menu:
 see textielmuseum.nl/

 So far i have:
 bldd.nl/prototypes/megamenu/test2.html

 But i can´t get the hoverIntent to work?
 here´s my try W.I.P
 bldd.nl/prototypes/megamenu/test4.html

 Any tips, ideas how i to get my mega dropdown to work on hover and
 hide it???

 Regards,


[jQuery] ajax image

2010-01-06 Thread Mean Mike
ok so I figured out that you can put in image in your page using .load
(imageloader.php) but is there a way to load an image using regular
ajax call .

alittle more explanation of what I'm trying to do

in my php I use imagejpeg function  which outputs the image using gd
great!

and in my html i use to just go img src=imageloader.php?
dir=directoryname=filename / and that worked except now I don't
want to pass that info in the query string I want to post the info AND
I want all my ajax calls to run through the same ajax function which
is why I don't want to use .load

any thoughts or suggestions

mean mike


[jQuery] Re: ajax image

2010-01-06 Thread MorningZ
 I want all my ajax calls to run through the same ajax function

What same ajax function?


On Jan 6, 10:29 am, Mean Mike mcgra...@gmail.com wrote:
 ok so I figured out that you can put in image in your page using .load
 (imageloader.php) but is there a way to load an image using regular
 ajax call .

 alittle more explanation of what I'm trying to do

 in my php I use imagejpeg function  which outputs the image using gd
 great!

 and in my html i use to just go img src=imageloader.php?
 dir=directoryname=filename / and that worked except now I don't
 want to pass that info in the query string I want to post the info AND
 I want all my ajax calls to run through the same ajax function which
 is why I don't want to use .load

 any thoughts or suggestions

 mean mike


[jQuery] XPath for Attribute Selection Criteria

2010-01-06 Thread Richard Collette
The jQuery documentation states that it uses a combination of both CSS
and XPath selectors.

Does that mean that I should be able to select attributes using the
syntax:

[attName=Val1 or attName=val2]

since XPath criteria allow OR's like this?

If not, exactly what parts of XPath are supported?



[jQuery] form validation

2010-01-06 Thread John Albright
Is it possible to use the jquery form validation plugin (http://
bassistance.de/jquery-plugins/jquery-plugin-validation/) to validate a
form that was inserted into the page via javascript? What I'm trying
to do is display a person's address, which is contained in a span tag,
and give them the option to edit it. If they click the edit button,
I'm changing the span to a form tag with jQuery and turning the parts
of the address into text boxes with the values filled in. The problem
I'm having is that since the form doesn't exist from the very
beginning, the validate function isn't getting assigned to it, and
when the form is created and submitted, it doesn't get validated. Can
I somehow make the plugin assign the validate function to the form
when the edit button is clicked, or is that not possible?


[jQuery] Help with change event

2010-01-06 Thread NotionCommotion


I am interested in the event change, and am looking at
http://docs.jquery.com/Events/change.

 $(select).change(function () {
  var str = ;
  $(select option:selected).each(function () {
str += $(this).text() +  ;
  });
  $(div).text(str);
})
.change();

It all makes sense except for the very last change().  Can anyone
explain the purpose of this line?

Thank you


[jQuery] jQuery Version

2010-01-06 Thread Cyberdog
Hi,
I have a website which has jQuery JavaScript Library v1.3.2 installed.
Should i update this to the latest, or would this cause problems to
the site.

Thanks
Dave.


[jQuery] Cycle and softedge

2010-01-06 Thread exlibris
Howdy,

I have jquery.cycle.min.2.72.js up and running, but am having trouble
integrating it with another javascript image manipulation package:
softedge.js (http://cssglobe.com/post/1344/soft-edge-technique-soft-
edges-and-opacity-gradients-for).

Basically, I would like images to fade in and out while rotating.  But
when displayed, I would like them to have their edges faded to
transparency.

What happens instead, is that only the initial image has the faded
edge, and only that faded area rotates.

Does anybody know how to either better integrate the softedge.js
library, or achieve a fade / feathered edge within the jquery / cycle
framework?

Many thanks,

Andrew


[jQuery] Re: ajax image

2010-01-06 Thread Mean Mike
basically all ajax calls go through

$.ajax({.});

I made a function that gets passed all the parameters that I want in
the ajax call

oddly enough i can't get load to work right either i just get Array
returned


On Jan 6, 10:33 am, MorningZ morni...@gmail.com wrote:
  I want all my ajax calls to run through the same ajax function

 What same ajax function?

 On Jan 6, 10:29 am, Mean Mike mcgra...@gmail.com wrote:

  ok so I figured out that you can put in image in your page using .load
  (imageloader.php) but is there a way to load an image using regular
  ajax call .

  alittle more explanation of what I'm trying to do

  in my php I use imagejpeg function  which outputs the image using gd
  great!

  and in my html i use to just go img src=imageloader.php?
  dir=directoryname=filename / and that worked except now I don't
  want to pass that info in the query string I want to post the info AND
  I want all my ajax calls to run through the same ajax function which
  is why I don't want to use .load

  any thoughts or suggestions

  mean mike


[jQuery] Re: ajax image

2010-01-06 Thread MorningZ
So you are trying to use jQuery's .load() functionality with an
actual image (i assume that your php sets the content type to image/
jpeg, image/gif, etc and writes out the actual binary image data) ?

that's not going to work, as the .load() loads the result of the
Ajax call into the innerHtml of DOM object

I don't know though, you're talking same function but have posted
about three different functions so far, $.ajax, .load, and your custom
function  but bottom line is, the $.ajax call which ultimately
gets called wouldn't be a replacement for img src=your.php /,
*unless* you wanted to use data url vales as image sources (like:
http://www.websiteoptimization.com/speed/tweak/inline-images/), but
the problem with that, like almost all cool ideas like that link
shows, is it doesn't work with IE

On Jan 6, 10:48 am, Mean Mike mcgra...@gmail.com wrote:
 basically all ajax calls go through

 $.ajax({.});

 I made a function that gets passed all the parameters that I want in
 the ajax call

 oddly enough i can't get load to work right either i just get Array
 returned

 On Jan 6, 10:33 am, MorningZ morni...@gmail.com wrote:

   I want all my ajax calls to run through the same ajax function

  What same ajax function?

  On Jan 6, 10:29 am, Mean Mike mcgra...@gmail.com wrote:

   ok so I figured out that you can put in image in your page using .load
   (imageloader.php) but is there a way to load an image using regular
   ajax call .

   alittle more explanation of what I'm trying to do

   in my php I use imagejpeg function  which outputs the image using gd
   great!

   and in my html i use to just go img src=imageloader.php?
   dir=directoryname=filename / and that worked except now I don't
   want to pass that info in the query string I want to post the info AND
   I want all my ajax calls to run through the same ajax function which
   is why I don't want to use .load

   any thoughts or suggestions

   mean mike


[jQuery] Re: Form submit success method not being called

2010-01-06 Thread Mike Alsup
What you have there should be working.  Perhaps the json response is
not properly formatting.  Try adding an error callback, or using the
global ajaxError hook, and see if that's the problem.

Mike

On Jan 5, 8:20 pm, Scott Brady dsbr...@gmail.com wrote:
 I'm having an issue using the jquery form plug-in.  The form gets
 submitted just fine (I can see the response in Firebug).  However, it
 looks like my success callback method isn't being called.

 Here's the basic JS code for the form submit in the document.ready section.:
                // Add form binding
                var addOptions =
                {
                        dataType: 'json',
                        resetForm: true,
                        success: processAdd
                };

                $(#addForm).ajaxForm(addOptions);

 And, here's the callback function:
 function processAdd(responseData, statusText)
 {
 alert(responseData);

 }

 I've tried changing the success be an inline function declaration
 (success: function(responseText){ ... etc) but that didn't change it.

 Would using ajaxSubmit() rather than ajaxForm() work better?  Or, is
 there something I'm actually doing wrong that you can see?

 --
 -
 Scott Brady


[jQuery] Position div accounting for screen size/resize

2010-01-06 Thread kevinkace
Can you change a position of a div, based on screen size/resize with
jquery? Something like

if (browser= sitecontainerwidth)
{
left:50%;
margin-left: 20px;
}
else
{
left: 0%;
margin-left: 600px;
}

I have a centered layout (div{margin: top auto;}) with a BG image.
There's another div (with a background design) that needs to overlay
on the BG, but off center.

Figure of what the problem: http://www.kacevisual.com/files/Div-difficulties.gif


[jQuery] Re: ajax image

2010-01-06 Thread Mean Mike

   So you are trying to use jQuery's .load() functionality with an
   actual image (i assume that your php sets the content type to
image/
   jpeg, image/gif, etc and writes out the actual binary image
data) ?

YES ! that is correct.

   that's not going to work, as the .load() loads the result of the
   Ajax call into the innerHtml of DOM object

I'm assuming thats why I get Array

   I don't know though, you're talking same function but have
posted
   about three different functions so far, $.ajax, .load, and your
custom
   function
mmm sorry for the confusion

I wanted to see if i could just get it to work with load that's why I
mentioned it ..

   but bottom line is, the $.ajax call which ultimately
   gets called wouldn't be a replacement for img src=your.php /,

bummer 8 ^ (

   *unless* you wanted to use data url vales as image sources
(like:http://www.websiteoptimization.com/speed/tweak/inline-images/),
but
   the problem with that, like almost all cool ideas like that link
   shows, is it doesn't work with IE

neat concept but not doable trying to stick with ajax

Thanks for your help
Mean Mike


[jQuery] (treeview) add html instead of text, async notify on load

2010-01-06 Thread JW
In the async extension the the jquery treeview plugin, I would like to
request that an event trigger be sent each time a new branch of the
tree is loaded. It could be as simple as adding $(container).trigger
('treeviewLoaded'); to the async extension.

Additionally, I would like to request that HTML may be async'ly added
to the tree instead of just simple text strings. The JSON response for
async'ly updating the tree currently has a text: 'text' tag that
sets the tree text inside of a span tag. I would like to also see a
html: tags type JSON tag that could be used alternatively, where
tags are not placed inside of a span.

The reason for doing these two enhancements is that I would like to
add checkboxes to certain elements of my tree. Then when the tree
loads, an external event handler would be added to the checkboxes
after each new treeviewLoaded trigger is externally received.

I would be willing to help develop the code, or gladly use anything
that is developed.


[jQuery] Re: Pass object to function

2010-01-06 Thread Šime Vidas
$(a.less).livequery( 'click', function() {
$(this).closest(.project).closeProject();
return false;
});

$.fn.extend({
closeProject: function() {
return this.each() {
$(this).find(.morebody).slideUp('normal');
}
}

});


Re: [jQuery] XPath for Attribute Selection Criteria

2010-01-06 Thread Karl Swedberg


On Jan 6, 2010, at 10:13 AM, Richard Collette wrote:


The jQuery documentation states that it uses a combination of both CSS
and XPath selectors.

Does that mean that I should be able to select attributes using the
syntax:

[attName=Val1 or attName=val2]

since XPath criteria allow OR's like this?

If not, exactly what parts of XPath are supported?




Earlier versions of jQuery supported a mix of CSS 1-3 and a subset of  
XPath, but the XPath selector syntax support has been removed for  
quite some time. Can you please point me to the URL in the  
documentation where it says that both are supported so I can correct it?


To answer your question, this should work:

$('[attName=Val1], [attName=val2]')

I'd put something (like a tag name) before each of those attribute  
selectors, though. For example:

$('input[attName=Val1], input[attName=val2]')


--Karl


Karl Swedberg
www.englishrules.com
www.learningjquery.com



[jQuery] Re: How do i get this mega dropdown with jQuery??

2010-01-06 Thread 123gotoandplay
tx, for answering

Any example how to do this??

I am stuck with the hover and the dropdown div

Highly appreciated

On Jan 6, 4:24 pm, Chris chriss...@gmail.com wrote:
 I wouldn't really call that a mega dropdown. All it is is 2 divs,
 the second one hidden and sliding into view when you mouseover the
 first. The menu items themselves appear to be completely irrelevant as
 far as the dropdown effect is concerned.

 On Jan 6, 8:37 am, 123gotoandplay wesweatyous...@gmail.com wrote:

  Hi all,

  I am trying to get this mega dropdown menu:
  see textielmuseum.nl/

  So far i have:
  bldd.nl/prototypes/megamenu/test2.html

  But i can´t get the hoverIntent to work?
  here´s my try W.I.P
  bldd.nl/prototypes/megamenu/test4.html

  Any tips, ideas how i to get my mega dropdown to work on hover and
  hide it???

  Regards,


[jQuery] Re: jQuery parent remove

2010-01-06 Thread Scott Sauyet
On Jan 6, 4:42 am, Lone Wolf khura...@gmail.com wrote:
 $(document).ready(function(){
         $('table.small td img.delete').click(function(){
           $.get('ajax/update-callback.php', {doaction: 'remove', callbackid: $
 (this).attr('id')},
                 function(data){
                         alert($(this).attr('id'));
                         $(this).remove();
           });
         });

 });

 update-callback.php is called and the function is performed by php.
 However, in the callback function of the jQuery, $(this) is not
 available as alerting its attr('id') gives undefined which it happily
 added in the GET of the update-callback.php. Can you tell me what I
 could be doing wrong.

The this reference in your callback function does not refer back to
the this in your outer function. [1]

You need to save a reference to it to use in the callback.

This is untested, but might do it:

$(document).ready(function(){
$('table.small td img.delete').click(function(){
var deleteImg = $(this);
$.get('ajax/update-callback.php', {/* ... */},
function(data){
alert(deleteImg.attr('id'));
deleteImg.remove();
}
);
});
});

Cheers,

  -- Scott

[1] According to the docs, this refers to the options for your ajax
request


[jQuery] Re: How do i get this mega dropdown with jQuery??

2010-01-06 Thread 123gotoandplay
is this a good solution:
bldd.nl/prototypes/megamenu/test9.html

On Jan 6, 5:41 pm, 123gotoandplay wesweatyous...@gmail.com wrote:
 tx, for answering

 Any example how to do this??

 I am stuck with the hover and the dropdown div

 Highly appreciated

 On Jan 6, 4:24 pm, Chris chriss...@gmail.com wrote:

  I wouldn't really call that a mega dropdown. All it is is 2 divs,
  the second one hidden and sliding into view when you mouseover the
  first. The menu items themselves appear to be completely irrelevant as
  far as the dropdown effect is concerned.

  On Jan 6, 8:37 am, 123gotoandplay wesweatyous...@gmail.com wrote:

   Hi all,

   I am trying to get this mega dropdown menu:
   see textielmuseum.nl/

   So far i have:
   bldd.nl/prototypes/megamenu/test2.html

   But i can´t get the hoverIntent to work?
   here´s my try W.I.P
   bldd.nl/prototypes/megamenu/test4.html

   Any tips, ideas how i to get my mega dropdown to work on hover and
   hide it???

   Regards,


[jQuery] Re: Cycle and softedge

2010-01-06 Thread Scott Sauyet
On Jan 6, 10:17 am, exlibris exlib...@visi.com wrote:
 Does anybody know how to either better integrate the softedge.js
 library,

I don't think it will work when the cycle plug-in is used directly on
the images, as the softedge technique replaces an image with a stack
of images in the same location with increasing opacities and
decreasing clip size.

But I think if you put your images in some containers and use the
cycle plug-in on those containers, it might work.

Good luck,

  -- Scott


Re: [jQuery] jQuery Version

2010-01-06 Thread Joe Moore
There's no way for us to determine whether updating the jQuery library will
affect your site. Too many variables.
- Review the Release notes for the version to see if there are any known
issues.
- Review any plugins that you have to determine if they will work.
- Update the library and test your site.

Good luck!

Joe

On Wed, Jan 6, 2010 at 10:04 AM, Cyberdog daviddmiddle...@btinternet.comwrote:

 Hi,
 I have a website which has jQuery JavaScript Library v1.3.2 installed.
 Should i update this to the latest, or would this cause problems to
 the site.

 Thanks
 Dave.



[jQuery] Superfish Nav-bar Joomla issue

2010-01-06 Thread Jason
I'm using the superfish module for joomla 1.5 all options except Nav-
bar seem to work fine i have a fix menu area width 705px the 1st and
3rd levels are fine however the second level does not fill the entire
705px and instead folds into a 3rd line any ideas on how to get it to
fill out the width?


[jQuery] AJAX Gallery w/ Accordion Effect Possible?

2010-01-06 Thread cbaone
Hello all! I have what I think is a complicated gallery to build.
Being new to JS I was told that jQuery is the place to start. I'm
hoping this is possible... Well, I realize that most things are
possible with enough time and effort. But, what I really need to know
is if I can build something like this myself. Here's what I need to
do:

There is a main gallery page with a grid of projects - each row will
have four thumbnails to represent the gallery. Well, what I need to
have happen is when someone clicks on a project thumbnail the projects
div will slide down to reveal that project's gallery pulled in via
AJAX. Also, I need a Next and Previous button so users can move
through the project galleries without having to go back to the main
projects page. Along with that I need to have Return to Projects
Page link on each gallery page that will cause the projects page to
slide up and cover the gallery. Does this make sense?

I realize I may be asking a broad question and it may be a lot to ask,
but I was hoping somebody could help me map out how I need to do this.
Thank you.


[jQuery] superfish

2010-01-06 Thread Grzegorz Domaradzki
is it possible to link superfish menu with virtuemart?

regards


Re: [jQuery] Re: Form submit success method not being called

2010-01-06 Thread Scott Brady
Thanks! I'll try that.

I have an idea what it might be, but that code is at home.  I think I
might not be getting rid of the prefix ColdFusion adds to json
responses -- I'll have to see if there's a preprocessing directive
like jquery's built in ajax calls have.

Scott

On Wed, Jan 6, 2010 at 9:08 AM, Mike Alsup mal...@gmail.com wrote:
 What you have there should be working.  Perhaps the json response is
 not properly formatting.  Try adding an error callback, or using the
 global ajaxError hook, and see if that's the problem.

 Mike

 On Jan 5, 8:20 pm, Scott Brady dsbr...@gmail.com wrote:
 I'm having an issue using the jquery form plug-in.  The form gets
 submitted just fine (I can see the response in Firebug).  However, it
 looks like my success callback method isn't being called.

 Here's the basic JS code for the form submit in the document.ready 
 section.:
                // Add form binding
                var addOptions =
                {
                        dataType: 'json',
                        resetForm: true,
                        success: processAdd
                };

                $(#addForm).ajaxForm(addOptions);

 And, here's the callback function:
 function processAdd(responseData, statusText)
 {
 alert(responseData);

 }

 I've tried changing the success be an inline function declaration
 (success: function(responseText){ ... etc) but that didn't change it.

 Would using ajaxSubmit() rather than ajaxForm() work better?  Or, is
 there something I'm actually doing wrong that you can see?

 --
 -
 Scott Brady




-- 
-
Scott Brady
http://www.scottbrady.net/


Re: [jQuery] Re: How do i get this mega dropdown with jQuery??

2010-01-06 Thread audiofreak9
This guy has a mega-drop-down how to with CSS and jQuery

http://www.sohtanaka.com/web-design/mega-drop-downs-w-css-jquery/

 Corey
camwebdesign.com



On Wed, Jan 6, 2010 at 11:54 AM, 123gotoandplay wesweatyous...@gmail.comwrote:

 is this a good solution:
 bldd.nl/prototypes/megamenu/test9.html

 On Jan 6, 5:41 pm, 123gotoandplay wesweatyous...@gmail.com wrote:
  tx, for answering
 
  Any example how to do this??
 
  I am stuck with the hover and the dropdown div
 
  Highly appreciated
 
  On Jan 6, 4:24 pm, Chris chriss...@gmail.com wrote:
 
   I wouldn't really call that a mega dropdown. All it is is 2 divs,
   the second one hidden and sliding into view when you mouseover the
   first. The menu items themselves appear to be completely irrelevant as
   far as the dropdown effect is concerned.
 
   On Jan 6, 8:37 am, 123gotoandplay wesweatyous...@gmail.com wrote:
 
Hi all,
 
I am trying to get this mega dropdown menu:
see textielmuseum.nl/
 
So far i have:
bldd.nl/prototypes/megamenu/test2.html
 
But i can´t get the hoverIntent to work?
here´s my try W.I.P
bldd.nl/prototypes/megamenu/test4.html
 
Any tips, ideas how i to get my mega dropdown to work on hover and
hide it???
 
Regards,



[jQuery] next release?

2010-01-06 Thread johnantoni
hi, any idea when the next version of jQuery is to be released?


Re: [jQuery] Re: iTunes Style Slider

2010-01-06 Thread Matt Quackenbush
Z, thanks for the reply.  I found that project yesterday after I had
posted.  I also found a couple of others.  The problem is that they either
a) only work in Firefox (like the one you found) or b) are not full-featured
like the MooTools one.  The closest I have found - which seems to be the
only one that has good cross-browser support - is this one:

http://paulbakaus.com/lab/js/coverflow/

Anyways, thanks again for your reply.  It is much appreciated. :-)


[jQuery] Re: next release?

2010-01-06 Thread MorningZ
A post from just 2 days ago  :-)

http://groups.google.com/group/jquery-en/browse_thread/thread/a9fcfc8e8deb0106?hl=en#

On Jan 6, 12:47 pm, johnantoni indieh...@gmail.com wrote:
 hi, any idea when the next version of jQuery is to be released?


[jQuery] Re: Pass object to function

2010-01-06 Thread knal
Great!! I got it working!

Thanks you very much!!!

BTW It also works without the  return this.each() {  part!

On 6 jan, 17:32, Šime Vidas sime.vi...@gmail.com wrote:
 $(a.less).livequery( 'click', function() {
         $(this).closest(.project).closeProject();
         return false;

 });

 $.fn.extend({
         closeProject: function() {
                 return this.each() {
                         $(this).find(.morebody).slideUp('normal');
                 }
         }

 });


[jQuery] Selectors Trouble

2010-01-06 Thread Pedro Vidal
Hello guys, I'm doing a pagination for my site, and I'm having some problems
with my selectors...
In my site I have a #box div and inside this div I call by ajax my
guestbook, which contains a pagination, it's already working, but I'm having
TWO problems:
#1 - My #loading div seems that's not appearing when I open the #box div (It
should appears while loading the data)
#2 - I could not highlight the current page which is displaying the messages
(If user is at page 1, the link for the page 1 should have a different
color, and other stuff)
I'm testing all locally, in my Apache server.

Here goes the code for my INDEX.PHP file:

div id=box
!-- ajax will load the content... --
div id=loadingimg src=imgs/loader.gif alt=carregando /Carregando
dados.../div
/div!-- End boxes area --

INDEX.PHP also contains this js:

$('a.menuGuestbook').click(function() {
$('#box').show('slow');
 $('#box').load('guestbook/guestbook.php?page=1', Hide_Load());
return false;
});
 $('#close').live('click', function() {
$('#box').hide('slow');
return false;
 });
// --- show and hide loading -
//Display Loading Image
 function Display_Load() {
$('#box #loading').fadeIn('slow');
$('#box #loading').html();
 }
//Hide Loading Image
function Hide_Load() {
$('#box #loading').fadeOut('slow');
 }
// -- ajax' calls -
//Default Starting Page Results
 $(#paginacao li:first)
.css({'color' : '#FF0084'}).css({'border' : 'none'});
 Display_Load();
//Pagination Click
$('#pagination li').live('click',function() {
 Display_Load();
//CSS Styles
$(#pagination li)
.css({'border' : 'solid #DDD 1px'})
 .css({'color' : '#0063DC'});
 $(this)
.css({'color' : '#FF0084'})
 .css({'border' : 'none'});
 //Loading Data
var pageNum = this.id;
 $(#box).load(guestbook/guestbook.php?page=+pageNum, Hide_Load());
});

Inside my GUESTBOOK.PHP file I have a div called paginacao, here goes the
code:

div id=paginacao
?php
$per_page = 2;
 $sql = select * from tb_guestbook;
$result = mysql_query($sql);
$count = mysql_num_rows($result);
 $pages = ceil($count/$per_page)
?
ul id=pagination
?php
 //Pagination Numbers
for($i=1; $i=$pages; $i++) {
echo 'li id='.$i.''.$i.'/li';
 }
?
/ul
/div

Thanks for help!!


[jQuery] Go through XML nodes only 1 level deep

2010-01-06 Thread Frank Peterson
I'm grabbing an XML file with jQuery like this:

$(document).ready(function(){
$.ajax({
type: GET,
url: http://ipinfodb.com/ip_query.php?ip=74.125.45.100;,
dataType: xml,
success: function(xml) {
//$(xml).find().each(function(){
var city = $(xml).find(City).text();
/*
$('div class=items id=link_'+id+'/div').html
('a href='+url+''+title+'/a').appendTo('#page-wrap');
$(this).find('desc').each(function(){
var brief = $(this).find('brief').text();
var long = $(this).find('long').text();
$('div class=brief/div').html(brief).appendTo
('#link_'+id);
$('div class=long/div').html(long).appendTo
('#link_'+id);
});
*/
alert(city)
//});
}
});
});

The XML file looks like this
?xml version=1.0 encoding=UTF-8?
Response
Ip74.125.45.100/Ip
StatusOK/Status
CountryCodeUS/CountryCode
CountryNameUnited States/CountryName
RegionCode06/RegionCode
RegionNameCalifornia/RegionName
CityMountain View/City
ZipPostalCode94043/ZipPostalCode
Latitude37.4192/Latitude
Longitude-122.057/Longitude
Timezone-8/Timezone
Gmtoffset-8/Gmtoffset
Dstoffset-7/Dstoffset
/Response

But I can't get it to pull the data out.


[jQuery] Re: Pass object to function

2010-01-06 Thread Scott Sauyet
On Jan 6, 2:17 pm, knal knalp...@gmail.com wrote:
 BTW It also works without the  return this.each() {  part!

Yes, but that allows you to continue chaining, i.e.

$(this).closest(.project).closeProject().css({color: blue});

or whatever.  This is the usual technique with jQuery plug-ins.

  -- Scott


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

2010-01-06 Thread Jordan
Thanks for the insight Johan! When I implemented that though, it just
added the hover cross fade to the other div as well. I am looking for
a way to make the 2nd div JUST trigger the first. I was looking at the
page you linked to and I am messing around with something like the
following... although I can't get it to work. Any thoughts?

$(document).ready(function () {
$('div.tv, div.desk, div.phone').hover(function () {
//hover in
var div = $(' div', this);

if (div.is(':animated')) {
div.stop().fadeTo(500, 1);
} else {
div.fadeIn(250);
}
}, function () {
// hover out
var div = $(' div', this);
if (div.is(':animated')) {
div.stop().fadeTo(1000, 0);
} else {
div.fadeOut(1000);
}
});
  $(div.tvbutton).hover(function () {
  $(div.tv).trigger('hover');

});



On Jan 5, 4:33 pm, Johan Borestad johan.bores...@gmail.com wrote:
 Hi!
 There are a number of nice implementations you could use for this.
 Example the jQuery trigger.http://docs.jquery.com/Events/trigger
 But for now, the simpliest solution is just to add another selector
 like this

 $('div.example, div.tv').hover( .

 / Johan

 On Jan 5, 8:33 pm, Jordan jscottphil...@gmail.com wrote:

  I recently implemented the Image Cross Fade Transition (http://
  jqueryfordesigners.com/image-cross-fade-transition/)

  It works great, and I'm hoping to add to the code to enhance the
  functionality. Currently, if I hover over the image, it runs the cross
  fade transition, which I would like to keep. I have another div on the
  page that I would like to trigger the first instance when hovered over
  as well. Is there a good way to add this?

  Here's what I'm using for the first instance:

  $(document).ready(function () {
          $('div.tv').hover(function () {
                  //hover in
                  var div = $(' div', this);

                  if (div.is(':animated')) {
                          div.stop().fadeTo(500, 1);
                  } else {
                          div.fadeIn(250);
                  }
          }, function () {
                  // hover out
                  var div = $(' div', this);
                  if (div.is(':animated')) {
                          div.stop().fadeTo(1000, 0);
                  } else {
                          div.fadeOut(1000);
                  }
          });


[jQuery] jQuery animations VS Mootools animations

2010-01-06 Thread Acaz Souza
MooTools:http://www.jsfiddle.net/4vnya/
jQuery: http://www.jsfiddle.net/eFbwJ/36/
(Compare the code, the effects. You decide.)

Why mootools is more smooth than jquery?


[jQuery] Re: Why mootools animations is more smooth than jquery?

2010-01-06 Thread Acaz Souza
MooTools:http://www.jsfiddle.net/4vnya/
jQuery: http://www.jsfiddle.net/eFbwJ/36/
(Compare the code, the effects. You decide.)

Why mootools is more smooth than jquery?


Re: [jQuery] jQuery animations VS Mootools animations

2010-01-06 Thread Rey Bango
They both seem to run equally smooth to me. I saw occasional jumpiness
on both demos.

Seriously, you've been on this specific topic since early November and
just doing a Google search shows that you've asked a ton of people the
same question. If you feel that jQuery's effects could be smoother, I
urge you to help out the project by investing the time to tackle
whatever concerns you have. Doing that will not only ease your
concerns but helps out everyone in the community.

Rey...

On Wed, Jan 6, 2010 at 3:43 PM, Acaz Souza acazso...@gmail.com wrote:
 MooTools:http://www.jsfiddle.net/4vnya/
 jQuery: http://www.jsfiddle.net/eFbwJ/36/
 (Compare the code, the effects. You decide.)

 Why mootools is more smooth than jquery?



[jQuery] Re: Why mootools animations is more smooth than jquery?

2010-01-06 Thread Scott Sauyet
On Jan 6, 3:44 pm, Acaz Souza acazso...@gmail.com wrote:
 MooTools:http://www.jsfiddle.net/4vnya/
 jQuery:http://www.jsfiddle.net/eFbwJ/36/
 (Compare the code, the effects. You decide.)

 Why mootools is more smooth than jquery?

It's not, at least not in my FF3.5.6 on Win XP.

Haven't you been here asking this question before?  Are you trying to
get information or prove some obscure point?

  -- Scott


Re: [jQuery] Re: Why mootools animations is more smooth than jquery?

2010-01-06 Thread Paul Kim
It is, at least in my FF 3.5.7 on Win 7, but I haven't the slightest clue as
to why. Thanks for sharing those demos.



On Wed, Jan 6, 2010 at 1:29 PM, Scott Sauyet scott.sau...@gmail.com wrote:

 On Jan 6, 3:44 pm, Acaz Souza acazso...@gmail.com wrote:
  MooTools:http://www.jsfiddle.net/4vnya/
  jQuery:http://www.jsfiddle.net/eFbwJ/36/
  (Compare the code, the effects. You decide.)
 
  Why mootools is more smooth than jquery?

 It's not, at least not in my FF3.5.6 on Win XP.

 Haven't you been here asking this question before?  Are you trying to
 get information or prove some obscure point?

  -- Scott



RE: [jQuery] Re: Why mootools animations is more smooth than jquery?

2010-01-06 Thread Jeffrey Kretz
They seem about the same to me as well, FF3.5.6 on Win7


-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Scott Sauyet
Sent: Wednesday, January 06, 2010 1:29 PM
To: jQuery (English)
Subject: [jQuery] Re: Why mootools animations is more smooth than jquery?

On Jan 6, 3:44 pm, Acaz Souza acazso...@gmail.com wrote:
 MooTools:http://www.jsfiddle.net/4vnya/
 jQuery:http://www.jsfiddle.net/eFbwJ/36/
 (Compare the code, the effects. You decide.)

 Why mootools is more smooth than jquery?

It's not, at least not in my FF3.5.6 on Win XP.

Haven't you been here asking this question before?  Are you trying to
get information or prove some obscure point?

  -- Scott



[jQuery] Re: jQuery animations VS Mootools animations

2010-01-06 Thread mslade
The two versions have a number of subtle but remarkable differences
that makes it difficult to do a side-by-side comparison.  One's
faster, one rotates the photographs, one bounces them around a bit
upon reaching their destination.  For what it's worth, running XP Pro
SP 3 / FF 3, I prefer the implementation using jQuery.

On Jan 6, 3:58 pm, Rey Bango r...@reybango.com wrote:
 They both seem to run equally smooth to me. I saw occasional jumpiness
 on both demos.

 Seriously, you've been on this specific topic since early November and
 just doing a Google search shows that you've asked a ton of people the
 same question. If you feel that jQuery's effects could be smoother, I
 urge you to help out the project by investing the time to tackle
 whatever concerns you have. Doing that will not only ease your
 concerns but helps out everyone in the community.

 Rey...

 On Wed, Jan 6, 2010 at 3:43 PM, Acaz Souza acazso...@gmail.com wrote:
  MooTools:http://www.jsfiddle.net/4vnya/
  jQuery:http://www.jsfiddle.net/eFbwJ/36/
  (Compare the code, the effects. You decide.)

  Why mootools is more smooth than jquery?


[jQuery] jQuery BlockUI Plugin (v2) add onBlock()

2010-01-06 Thread WR
Hi all,
  in this plug-in I need a function like onUnblock but on completed
fadein..
can Add this function?

tks


[jQuery] superfish navbar submenu

2010-01-06 Thread Anne
Hi all,

I am brand new to this.  I have downloaded the sample files.  I added
the navbar css to the example.html file.  Everything works.  My
problem is that the submenu is visible when I first load the page
before I have hovered over anything.  Before I get into this any
further, is there a way to fix that?

Thanks for your help.

Anne.


[jQuery] Open Ajax jQuery remote contract-6 weeks

2010-01-06 Thread Laura Hunter
Hello,

I hope it's OK to post this here.  If not, please let me know as I
don't want to disrespect the group in a any way.

If so, here is an exciting contract for about 6 weeks that can be done
remotely.  My client in NYC needs a full time Ajax jQuery resource.
They are trying to get ready to release to beta users on Feb 15 (they
are currently in alpha testing) and we have many bugs to close before
that time. They are looking for someone to start right away. The
resource would be working with the main Ajax resource that is out of
St. Louis.  This position can work remotely of course.

Here’s something about the project:
My client is creating an online research site, providing case law,
news, expert commentary, legal forms and checklists and other legal
research material targeted to the NY litigation market.
Subscription product designed to be an efficient tool for litigators
to easily access core legal content critical to their practice of law.
Establish a research alternative to the major legal research database
companies Lexis/Nexis and West.
Any interested parties will please feel free to submit their resumes
to me at laura.hun...@vividresources.com or call me at 424-237-2602.

Thank you!
Laura


[jQuery] ie8 and title text value

2010-01-06 Thread navtis
Hi

I'm trying to read the lt;titlegt; value from a page head. All
browsers I've tried are happy with $('title').text() apart from ie8
which returns nothing. Am I doing something wrong, or is it IE8 that's
wrong? Is there a workaround?

Thanks
Graham


[jQuery] Re: ie8 and title text value

2010-01-06 Thread Dave Methvin

I think document.title works on all browsers.


[jQuery] Re: jQuery BlockUI Plugin (v2) add onBlock()

2010-01-06 Thread Mike Alsup
 Hi all,
   in this plug-in I need a function like onUnblock but on completed
 fadein..
 can Add this function?

ok.

http://www.malsup.com/jquery/block/#download


Re: [jQuery] Re: ajax image

2010-01-06 Thread John Arrowwood
So, why can't you just create a new img node with a src attribute?  It
will automatically download the image in the background, much like with
AJAX.  Is the problem that you want to ensure that the image is fully
downloaded before you try to display it?  Have you tried
$(imgTag).ready(...)?  (Don't know if that works or not, never tried it)

On Wed, Jan 6, 2010 at 8:14 AM, Mean Mike mcgra...@gmail.com wrote:


   So you are trying to use jQuery's .load() functionality with an
   actual image (i assume that your php sets the content type to
 image/
   jpeg, image/gif, etc and writes out the actual binary image
 data) ?

 YES ! that is correct.

   that's not going to work, as the .load() loads the result of the
   Ajax call into the innerHtml of DOM object

 I'm assuming thats why I get Array

   I don't know though, you're talking same function but have
 posted
   about three different functions so far, $.ajax, .load, and your
 custom
   function
 mmm sorry for the confusion

 I wanted to see if i could just get it to work with load that's why I
 mentioned it ..

   but bottom line is, the $.ajax call which ultimately
   gets called wouldn't be a replacement for img src=your.php /,

 bummer 8 ^ (

   *unless* you wanted to use data url vales as image sources
 (like:http://www.websiteoptimization.com/speed/tweak/inline-images/),
 but
   the problem with that, like almost all cool ideas like that link
   shows, is it doesn't work with IE

 neat concept but not doable trying to stick with ajax

 Thanks for your help
 Mean Mike




-- 
John Arrowwood
John (at) Irie (dash) Inc (dot) com
John (at) Arrowwood Photography (dot) com
John (at) Hanlons Razor (dot) com
--
http://www.irie-inc.com/
http://arrowwood.blogspot.com/


Re: [jQuery] Help with change event

2010-01-06 Thread John Arrowwood
The last .change() fires the event.

On Wed, Jan 6, 2010 at 6:43 AM, NotionCommotion villasc...@gmail.comwrote:



 I am interested in the event change, and am looking at
 http://docs.jquery.com/Events/change.

  $(select).change(function () {
  var str = ;
  $(select option:selected).each(function () {
str += $(this).text() +  ;
  });
  $(div).text(str);
})
.change();

 It all makes sense except for the very last change().  Can anyone
 explain the purpose of this line?

 Thank you




-- 
John Arrowwood
John (at) Irie (dash) Inc (dot) com
John (at) Arrowwood Photography (dot) com
John (at) Hanlons Razor (dot) com
--
http://www.irie-inc.com/
http://arrowwood.blogspot.com/


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

2010-01-06 Thread Johan Borestad
I think you just forgot the last brackets on your hover method:

$(div.tvbutton).hover(function () {
  $(div.tv).trigger('hover');
})  --- Forgotten

This could be optimized a little better by using id's, or at last
saving a a reference to the div.tv, so that you don't have to make
search for the div every time (unless you're using ajax ofcourse), but
this should work now at last :-)

/ Johan

On Jan 6, 9:42 pm, Jordan jscottphil...@gmail.com wrote:
 Thanks for the insight Johan! When I implemented that though, it just
 added the hover cross fade to the other div as well. I am looking for
 a way to make the 2nd div JUST trigger the first. I was looking at the
 page you linked to and I am messing around with something like the
 following... although I can't get it to work. Any thoughts?

 $(document).ready(function () {
         $('div.tv, div.desk, div.phone').hover(function () {
                 //hover in
                 var div = $(' div', this);

                 if (div.is(':animated')) {
                         div.stop().fadeTo(500, 1);
                 } else {
                         div.fadeIn(250);
                 }
         }, function () {
                 // hover out
                 var div = $(' div', this);
                 if (div.is(':animated')) {
                         div.stop().fadeTo(1000, 0);
                 } else {
                         div.fadeOut(1000);
                 }
         });
           $(div.tvbutton).hover(function () {
           $(div.tv).trigger('hover');

     });

 On Jan 5, 4:33 pm, Johan Borestad johan.bores...@gmail.com wrote:

  Hi!
  There are a number of nice implementations you could use for this.
  Example the jQuery trigger.http://docs.jquery.com/Events/trigger
  But for now, the simpliest solution is just to add another selector
  like this

  $('div.example, div.tv').hover( .

  / Johan

  On Jan 5, 8:33 pm, Jordan jscottphil...@gmail.com wrote:

   I recently implemented the Image Cross Fade Transition (http://
   jqueryfordesigners.com/image-cross-fade-transition/)

   It works great, and I'm hoping to add to the code to enhance the
   functionality. Currently, if I hover over the image, it runs the cross
   fade transition, which I would like to keep. I have another div on the
   page that I would like to trigger the first instance when hovered over
   as well. Is there a good way to add this?

   Here's what I'm using for the first instance:

   $(document).ready(function () {
           $('div.tv').hover(function () {
                   //hover in
                   var div = $(' div', this);

                   if (div.is(':animated')) {
                           div.stop().fadeTo(500, 1);
                   } else {
                           div.fadeIn(250);
                   }
           }, function () {
                   // hover out
                   var div = $(' div', this);
                   if (div.is(':animated')) {
                           div.stop().fadeTo(1000, 0);
                   } else {
                           div.fadeOut(1000);
                   }
           });


[jQuery] Re: Help with change event

2010-01-06 Thread NotionCommotion
Thanks John,

The last .change() fires the event.

Looking through the other documentation, it appears that the other
event methods do not need a similar trailing method to fire the event,
only change.  I've even did a test where I didn't include the last
change(), and it appeared to work.

Could you please elaborate on what by fires the event.

Thanks!


[jQuery] Re: How do i get this mega dropdown with jQuery??

2010-01-06 Thread Šime Vidas
Here, use this:
http://vidasp.net/jquery-example7.html

The HTML code is super-simple - only ULs and two wrapper DIVs

Also, the menu streches to the full (available) width automatically
(like a table)


[jQuery] Re: Help with change event

2010-01-06 Thread Šime Vidas

Hehe :)
Look, event methods work like this you pass in a function, and
that function will be executed then the event occurs...

$(select).change(function() {
// code that gets executed when change event the occurs on any
SELECT element
});

But, if you leave out the argument, then the change method does
something completely different... it triggers the event... (as if you
changed the selected OPTION(s) yourself)

$(select).change();

What the guys at jQuery did in that example is, they first defined the
onchange handler, and then triggered it right away... So you got that
red Candy Caramel text on page load without having to change the
SELECT...


Re: [jQuery] highlighting

2010-01-06 Thread brian
$target.css('...')

Or, better:

$target.addClass('SomeClassName');

On Tue, Jan 5, 2010 at 10:35 AM, metalmini metalm...@gmail.com wrote:
 Hi guys and galls,

 Im not really a jquery programmer but i build lots of sites and i love
 the jquery plugins that i can easily copy and paste. So anyway im
 building a new site and i am using alot of jquery to emprove
 usability.

 So i am using a little script that scrolls easy to the a name=p1/
 a html tag.

 [code]

 $(document).ready(function(){
  $('a[href*=#]').click(function() {
    if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^
 \//,'')
     location.hostname == this.hostname) {
      var $target = $(this.hash);
      $target = $target.length  $target
      || $('[name=' + this.hash.slice(1) +']');
      if ($target.length) {
        var targetOffset = $target.offset().top;
        $('html,body')
        .animate({scrollTop: targetOffset}, 1000);
       return false;
      }
    }
  });
 });

 [/code]

 This is not my own code, i found it. As i said im not a jquery pro.

 Anyway i was wondering if it is possible to somehow highlight the div
 class with a background color to make it stand out more? Something
 that i can add to this little piece of code?

 If there are things that i should include please let me know.

 Thank you very much in advance.

 Kind regards,

 Michael



Re: [jQuery] Re: urgent help

2010-01-06 Thread brian
Or, at minimum, an example or two of the errors encountered.

On Wed, Jan 6, 2010 at 7:13 AM, MOZ pbe...@gmail.com wrote:
 link to demo?

 On Jan 6, 3:49 am, Sugi sugi...@gmail.com wrote:
 I am using Jquery plugins like flowplayer,fancy plugin for image and
 video stuffs...It creates lot of erros with IE 6. Can any one help to
 fix compatability issue with IE6? Please reply..Very urgent



Re: [jQuery] form validation

2010-01-06 Thread brian
Set up the handler when the form is created:

$(#the_form_id).validate();

You might also want to have a look at the Jeditable plugin:

http://www.appelsiini.net/projects/jeditable


On Wed, Jan 6, 2010 at 10:25 AM, John Albright trumpetman...@gmail.com wrote:
 Is it possible to use the jquery form validation plugin (http://
 bassistance.de/jquery-plugins/jquery-plugin-validation/) to validate a
 form that was inserted into the page via javascript? What I'm trying
 to do is display a person's address, which is contained in a span tag,
 and give them the option to edit it. If they click the edit button,
 I'm changing the span to a form tag with jQuery and turning the parts
 of the address into text boxes with the values filled in. The problem
 I'm having is that since the form doesn't exist from the very
 beginning, the validate function isn't getting assigned to it, and
 when the form is created and submitted, it doesn't get validated. Can
 I somehow make the plugin assign the validate function to the form
 when the edit button is clicked, or is that not possible?



Re: [jQuery] Position div accounting for screen size/resize

2010-01-06 Thread brian
Bind a handler for the resize event like so:

$(window).bind('resize', function() { ...});

Have a look at this thread:

http://groups.google.com/group/jquery-en/browse_thread/thread/4a00d513c63f5c00?pli=1

On Wed, Jan 6, 2010 at 11:08 AM, kevinkace kevinacame...@gmail.com wrote:
 Can you change a position of a div, based on screen size/resize with
 jquery? Something like

 if (browser= sitecontainerwidth)
 {
 left:50%;
 margin-left: 20px;
 }
 else
 {
 left: 0%;
 margin-left: 600px;
 }

 I have a centered layout (div{margin: top auto;}) with a BG image.
 There's another div (with a background design) that needs to overlay
 on the BG, but off center.

 Figure of what the problem: 
 http://www.kacevisual.com/files/Div-difficulties.gif



[jQuery] Re: ie8 and title text value

2010-01-06 Thread Šime Vidas
The, html() method works in all browsers...

text() = returns the concatenated innerHTML properties of all matched
elements
html() = returns the innerHTML property of the first matched element

Generally you don't use text() to retreive the contents of an
element...

BUT, if you want to write to the innerHTML property, then ...

html(blablabla) = sets the innerHTML property to the given string on
every matched element
text(blablabla) = sets the innerHTML property to the given string on
every matched element, AND escapes  and 


[jQuery] Need help learning

2010-01-06 Thread Inquisitive
I have been reading and playing around with jQuery and can do
somethings, but making a plugin is hurting my brain. Here is what I
have.

(function($) {
$.fn.myPlugin = function() {

this.each(function() {
alert(this.id)
$.get(return.php,function(data) {
alert(this.id);
//do something with this  the data
});
});
return this;
};
})(jQuery);

$(document).ready(function(){
  $(div).myPlugin();
});

div id=myID/div

Here is what I don't understand. The first alert shows the id, but the
second one does not, It alerts undefined. I want to be able to
modify the object (this) after receiving the data from the ajax.


[jQuery] Re: jQuery animations VS Mootools animations

2010-01-06 Thread weixi...@gmail.com
I was wondering why jquery was smoother than mootools


[jQuery] Re: Need help learning

2010-01-06 Thread Šime Vidas

this refers to different objects depending on where we are in the
code...

(function($) {
$.fn.myPlugin = function() {

// here this refers to the jQuery object on which the myPlugin
method was called upon

this.each(function() {

// here this refers to the matched elements in the jQuery object...
in your example, you matched every DIV element, so this refers to
each node in the DOM tree that has
type = ELEMENT_NODE
nodeName = DIV

alert(this.id)
$.get(return.php,function(data) {

// here this refers to the options object for the AJAX request
you may print it out with this code:

for (prop in this) {
$(div).append(prop +  =  + this[prop] + br);
}
alert(this.id);
//do something with this  the
data
});
});
return this;
};

})(jQuery);


[jQuery] Re: Need help learning

2010-01-06 Thread Šime Vidas
If you want to manipulate with the DIV inside the $.get function, you
can declare a local variable and put the reference to DIV in it...

(function($) {
$.fn.myPlugin = function() {

this.each(function() {
alert(this.id);

var that = this;

$.get(return.php,function(data) {
// now this is that
alert(that.id);
//do something with this  the
data
});
});
return this;
};

})(jQuery);


You don't have to call the variable that, but it's a nice name,
isn't it? :)


[jQuery] Re: Go through XML nodes only 1 level deep

2010-01-06 Thread Jules
For some reason, it works on firefox (3.5.6) and doesn't work in ie
6.0 and 8.0

On Jan 7, 6:39 am, Frank Peterson fictionalper...@gmail.com wrote:
 I'm grabbing an XML file with jQuery like this:

 $(document).ready(function(){
     $.ajax({
         type: GET,
         url: http://ipinfodb.com/ip_query.php?ip=74.125.45.100;,
         dataType: xml,
         success: function(xml) {
             //$(xml).find().each(function(){
                 var city = $(xml).find(City).text();
                 /*
                 $('div class=items id=link_'+id+'/div').html
 ('a href='+url+''+title+'/a').appendTo('#page-wrap');
                 $(this).find('desc').each(function(){
                     var brief = $(this).find('brief').text();
                     var long = $(this).find('long').text();
                     $('div class=brief/div').html(brief).appendTo
 ('#link_'+id);
                     $('div class=long/div').html(long).appendTo
 ('#link_'+id);
                 });
                 */
                 alert(city)
             //});
         }
     });

 });

 The XML file looks like this
 ?xml version=1.0 encoding=UTF-8?
 Response
         Ip74.125.45.100/Ip
         StatusOK/Status
         CountryCodeUS/CountryCode
         CountryNameUnited States/CountryName
         RegionCode06/RegionCode
         RegionNameCalifornia/RegionName
         CityMountain View/City
         ZipPostalCode94043/ZipPostalCode
         Latitude37.4192/Latitude
         Longitude-122.057/Longitude
         Timezone-8/Timezone
         Gmtoffset-8/Gmtoffset
         Dstoffset-7/Dstoffset
 /Response

 But I can't get it to pull the data out.


[jQuery] jquery google map namespace conflict?

2010-01-06 Thread shameless
I am toying with this plugin  (http://www.mayzes.org/
googlemaps.jquery.html#examples) and have found what I think is a
namespace conflict (I am by no means expert and I could be wrong...)

Here is how to see it.

I am using Google api loader thus:

script src=http://www.google.com/jsapi?key=mykey;/script
script type=text/javascript charset=utf-8
google.load(maps, 2);
google.load(jquery, 1);
/script

I have some code that was working previously that used loader and was
doing an address lookup using the Geocoder object, like this:

function showAddress(address) {
geocoder = new google.maps.ClientGeocoder();
  if (geocoder) {
geocoder.getLatLng(
  address,
  function(point) {
if (!point) {
  alert(address +  not found);
} else {
alert('point--'+point);
}
  }
);
  }
}


This worked great.  What I am now trying to do is use the plugin to
handle the map update and display.  I have a reference to the plugin
and can instantiate it.  I know this 'cause I have an alert near the
top of the plugin like so:

jQuery.fn.googleMaps = function(options) {
if (!window.GBrowserIsCompatible || !GBrowserIsCompatible())

alert('is compat');
...

The issue seems to be that if I leave google.load(maps, 2); the
plugin will not load and I will not get my is compat alert.  If I
comment out  // google.load(maps, 2); then I get the is compat
message but I cannot perform my reverse lookup.

Any insight that anyone can provide on overcoming this conflict would
be appreciated.  I have spent the last several hours scouring the web
to see if this is a common jquery / google maps issue and cannot seem
to find any other complaints.

TIA.



[jQuery] jQuery and IE 8

2010-01-06 Thread Mauricio Cirelli
Hello guys,

I'm developing a web site for a friend and I'm worried about a
problem.
The Url is: http://www.futuragames.com.br/radioboy

As you will see, it works perfectly on Firefox and Google Chrome, but
I get a mysterious when running on IE 8.

The error message is: Invalid argument on line 53 of the jQuery
library file. I don't know what does it mean and how can I figure it
out. Can anyone help me, please?

Thanks!


Re: [jQuery] Re: Need help learning

2010-01-06 Thread Mark Tank
Thank you, you have help out so much

On Jan 6, 2010, at 6:14 PM, Šime Vidas wrote:

 If you want to manipulate with the DIV inside the $.get function, you
 can declare a local variable and put the reference to DIV in it...
 
 (function($) {
$.fn.myPlugin = function() {
 
this.each(function() {
alert(this.id);
 
var that = this;
 
$.get(return.php,function(data) {
// now this is that
alert(that.id);
//do something with this  the
 data
});
});
return this;
};
 
 })(jQuery);
 
 
 You don't have to call the variable that, but it's a nice name,
 isn't it? :)



[jQuery] Re: Why mootools animations is more smooth than jquery?

2010-01-06 Thread Acaz Souza
I'm using Windows 7 Firefox 3.5, mootools is great, is more smoth, is
more sweet than jquery animations, i don't know why.

I'm tested in Chrome and the animations was great for both, but in
firefox not.

And Opera, mootools is more sweet than jquery.

Scott Sauyet: I'm trying to get information.

Is just for learning this interesting point.

What the matematics logic of both in animation framework.

They use the same logic?

IS JUST FOR LEARNING THIS INTERESTING POINT.

On Jan 6, 7:38 pm, Jeffrey Kretz jeffkr...@hotmail.com wrote:
 They seem about the same to me as well, FF3.5.6 on Win7

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

 Behalf Of Scott Sauyet
 Sent: Wednesday, January 06, 2010 1:29 PM
 To: jQuery (English)
 Subject: [jQuery] Re: Why mootools animations is more smooth than jquery?

 On Jan 6, 3:44 pm, Acaz Souza acazso...@gmail.com wrote:
  MooTools:http://www.jsfiddle.net/4vnya/
  jQuery:http://www.jsfiddle.net/eFbwJ/36/
  (Compare the code, the effects. You decide.)

  Why mootools is more smooth than jquery?

 It's not, at least not in my FF3.5.6 on Win XP.

 Haven't you been here asking this question before?  Are you trying to
 get information or prove some obscure point?

   -- Scott


[jQuery] Re: jQuery animations VS Mootools animations

2010-01-06 Thread Acaz Souza
Rey Bango:
Ok, i understand you, i not want to resolve that, IS JUST FOR
LEARNING, we need to observe and study that in group.
Now, answer me a question: Do you know exactly diference features in
animation frameworks in both?

Is hard to me study code by code, its hard mathematics. You is the
developer in framework.

In past jquery uses moo.fx for animation is true? I see in jquery code
the comment of john resign: 'This is a modification of moo.fx'.

Ok. its a modification, but the logic I supose is same. What do you
say?

And Now, i don't know how is the jquery animation code. Help me if is
possible?

IS JUST FOR LEARNING.

On Jan 6, 6:58 pm, Rey Bango r...@reybango.com wrote:
 They both seem to run equally smooth to me. I saw occasional jumpiness
 on both demos.

 Seriously, you've been on this specific topic since early November and
 just doing a Google search shows that you've asked a ton of people the
 same question. If you feel that jQuery's effects could be smoother, I
 urge you to help out the project by investing the time to tackle
 whatever concerns you have. Doing that will not only ease your
 concerns but helps out everyone in the community.

 Rey...





 On Wed, Jan 6, 2010 at 3:43 PM, Acaz Souza acazso...@gmail.com wrote:
  MooTools:http://www.jsfiddle.net/4vnya/
  jQuery:http://www.jsfiddle.net/eFbwJ/36/
  (Compare the code, the effects. You decide.)

  Why mootools is more smooth than jquery?


[jQuery] Need your opinion you ALL!!!

2010-01-06 Thread Erik R. Peterson
Hello everyone,

Someone wants me to use FULL DIRECTORY PATHS for every page and script for a 
website I just completed.  I argued that it would slow down the website for 
users...  I prefer relative paths such as /src/ and /img/.

Am I wrong to say this?

Is there really a difference in performance with speed whether I use absolute 
or relative paths?

Love to hear your opinion...

Thanks.

Erik

BTW - the website was transferred from WINDOWS SERVER to a UNIX...  I actually 
preferred Windows.  I'm dealing
with a Network Admin that doesn't know web design...


Re: [jQuery] Re: Go through XML nodes only 1 level deep

2010-01-06 Thread Steven Yang
just making sure

you are not able to parse the xml at all right?
i believe for IE you have to make sure you server returns the correct
content type like text/xml to client inorder for you to parse

hope this help

On Thu, Jan 7, 2010 at 9:30 AM, Jules jwira...@gmail.com wrote:

 For some reason, it works on firefox (3.5.6) and doesn't work in ie
 6.0 and 8.0

 On Jan 7, 6:39 am, Frank Peterson fictionalper...@gmail.com wrote:
  I'm grabbing an XML file with jQuery like this:
 
  $(document).ready(function(){
  $.ajax({
  type: GET,
  url: http://ipinfodb.com/ip_query.php?ip=74.125.45.100;,
  dataType: xml,
  success: function(xml) {
  //$(xml).find().each(function(){
  var city = $(xml).find(City).text();
  /*
  $('div class=items id=link_'+id+'/div').html
  ('a href='+url+''+title+'/a').appendTo('#page-wrap');
  $(this).find('desc').each(function(){
  var brief = $(this).find('brief').text();
  var long = $(this).find('long').text();
  $('div class=brief/div').html(brief).appendTo
  ('#link_'+id);
  $('div class=long/div').html(long).appendTo
  ('#link_'+id);
  });
  */
  alert(city)
  //});
  }
  });
 
  });
 
  The XML file looks like this
  ?xml version=1.0 encoding=UTF-8?
  Response
  Ip74.125.45.100/Ip
  StatusOK/Status
  CountryCodeUS/CountryCode
  CountryNameUnited States/CountryName
  RegionCode06/RegionCode
  RegionNameCalifornia/RegionName
  CityMountain View/City
  ZipPostalCode94043/ZipPostalCode
  Latitude37.4192/Latitude
  Longitude-122.057/Longitude
  Timezone-8/Timezone
  Gmtoffset-8/Gmtoffset
  Dstoffset-7/Dstoffset
  /Response
 
  But I can't get it to pull the data out.



Re: [jQuery] How to unsubscribe from this group?

2010-01-06 Thread Karl Swedberg


On Jan 5, 2010, at 7:47 PM, Chikkis Corner wrote:


Please unsubscribe me from this group.



Hi,

The following instructions are paraphrased from:
http://groups.google.com/support/bin/answer.py?hl=enanswer=46608

You can unsubscribe from a group through the web interface or via  
email. To unsubscribe through the web interface, just click the Edit  
my membership link on the right-hand side of the group's homepage at http://groups.google.com/group/jquery-en/ 
. Then click the Unsubscribe button on the page that appears.


To unsubscribe via email, send an email to 
jquery-en+unsubscr...@googlegroups.com

--Karl


Karl Swedberg
www.englishrules.com
www.learningjquery.com



[jQuery] Re: Go through XML nodes only 1 level deep

2010-01-06 Thread Jules
Ahah, too much stale eggnog.

var option = {
error: function(request, status, error) {
alert(error);
},
success: function(data, status) {

var xml = $(data);
alert(xml.find('City').text());
},
dataType: xml,
type: GET,
url: your url here
};

$.ajax(option);

This code works for me.

On Jan 7, 2:50 pm, Steven Yang kenshin...@gmail.com wrote:
 just making sure

 you are not able to parse the xml at all right?
 i believe for IE you have to make sure you server returns the correct
 content type like text/xml to client inorder for you to parse

 hope this help

 On Thu, Jan 7, 2010 at 9:30 AM, Jules jwira...@gmail.com wrote:
  For some reason, it works on firefox (3.5.6) and doesn't work in ie
  6.0 and 8.0

  On Jan 7, 6:39 am, Frank Peterson fictionalper...@gmail.com wrote:
   I'm grabbing an XML file with jQuery like this:

   $(document).ready(function(){
       $.ajax({
           type: GET,
           url: http://ipinfodb.com/ip_query.php?ip=74.125.45.100;,
           dataType: xml,
           success: function(xml) {
               //$(xml).find().each(function(){
                   var city = $(xml).find(City).text();
                   /*
                   $('div class=items id=link_'+id+'/div').html
   ('a href='+url+''+title+'/a').appendTo('#page-wrap');
                   $(this).find('desc').each(function(){
                       var brief = $(this).find('brief').text();
                       var long = $(this).find('long').text();
                       $('div class=brief/div').html(brief).appendTo
   ('#link_'+id);
                       $('div class=long/div').html(long).appendTo
   ('#link_'+id);
                   });
                   */
                   alert(city)
               //});
           }
       });

   });

   The XML file looks like this
   ?xml version=1.0 encoding=UTF-8?
   Response
           Ip74.125.45.100/Ip
           StatusOK/Status
           CountryCodeUS/CountryCode
           CountryNameUnited States/CountryName
           RegionCode06/RegionCode
           RegionNameCalifornia/RegionName
           CityMountain View/City
           ZipPostalCode94043/ZipPostalCode
           Latitude37.4192/Latitude
           Longitude-122.057/Longitude
           Timezone-8/Timezone
           Gmtoffset-8/Gmtoffset
           Dstoffset-7/Dstoffset
   /Response

   But I can't get it to pull the data out.


[jQuery] Re: (autocoplete) problem with fast typers:)

2010-01-06 Thread O.J. Tibi - @ojtibi
Hi Richard,

I'm not sure if this fits your bill, but maybe the reason people type
really fast is because they already know what they're searching for? I
mean I might sound a little simple minded but yes, I don't use the
autocomplete suggestions anymore when I know what I'm going to type.
(If you work with an autocomplete/intellisense IDE you'd know what I
mean)

Cheers,
OJ

On Jan 6, 10:10 am, Richard KLINDA rkli...@gmail.com wrote:
 Hello All!

 I have a problem with the autocomplete plugin, if one types fast enough
 to hit enter before the autocomplete suggestions show up (which is not
 hard at all), then autocomplete doesn't run the result handler (and it
 definitely should), so nothing happens.

 So when user types foo into the search input field, he has to wait for
 the suggestions to show up, only after this he can press enter to get
 the results.  Is there a workaround for that?

 Thanks,
 Richard


[jQuery] Firebug gives a $ is not defined error

2010-01-06 Thread elvis_wu

The same pages could be run correctly on both IE and Firefox untill
yesterday. Now on IE they can still run normally, but on Firefox I got a $
is not defined error. I didn't change the reference to the jquery library
in these pages and neither move the jquery library. I'm really confused.
Could any one tell me why?
-- 
View this message in context: 
http://old.nabble.com/Firebug-gives-a-%22%24-is-not-defined%22-error-tp27044083s27240p27044083.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



Re: [jQuery] How to gain reference to hyperlink that is clicked

2010-01-06 Thread CoffeeAddict

Ah, (this), I'm a newbie to that in jQuery.

Thanks.


Charlie Griefer wrote:
 
 input type=button id=addButton1 class=myButton /
 input type=button id=addButton2 class=myButton /
 
 script type=text/javascript
  $(document).ready(function() {
   $('.myButton').click(function() {
alert($(this).attr('id'));
// alert(this.id) -- should also work
   }
  });
 /script
 
 Notice that I added a class=myButton to each button element, and set the
 listener for $('.myButton').click(), which listens for a click event on
 any
 element that matches that selector.
 
 Within the function triggered by the click event, $(this) or this are both
 references to the element that triggered the click.
 
 On Tue, Jan 5, 2010 at 12:35 PM, CoffeeAddict dschin...@gmail.com wrote:
 

 I understand that I can use the .click() method on a hyperlink element.
  But
 how do I know which element was clicked?  First I have to gain reference
 to
 the hyperlink's ID.

 So lets say I have a page of hyperlinks like this in view source:

 ...someurl  somebutton
 ...someurl  somebutton
 ...someurl  somebutton
 ...someurl  somebutton

 when a user clicks addButton1, how do I know it's addButton1 that was
 referenced so that I can now apply a .click() event on it?
 --
 View this message in context:
 http://old.nabble.com/How-to-gain-reference-to-hyperlink-that-is-clicked-tp27026713s27240p27026713.html
 Sent from the jQuery General Discussion mailing list archive at
 Nabble.com.


 
 
 -- 
 Charlie Griefer
 http://charlie.griefer.com/
 
 I have failed as much as I have succeeded. But I love my life. I love my
 wife. And I wish you my kind of success.
 
 

-- 
View this message in context: 
http://old.nabble.com/How-to-gain-reference-to-hyperlink-that-is-clicked-tp27026713s27240p27046016.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: Firebug gives a $ is not defined error

2010-01-06 Thread MorningZ
FireBug (http://www.getfirebug.com) would be a huge help for you to
find out why

On Jan 6, 11:31 pm, elvis_wu w.s.q...@gmail.com wrote:
 The same pages could be run correctly on both IE and Firefox untill
 yesterday. Now on IE they can still run normally, but on Firefox I got a $
 is not defined error. I didn't change the reference to the jquery library
 in these pages and neither move the jquery library. I'm really confused.
 Could any one tell me why?
 --
 View this message in 
 context:http://old.nabble.com/Firebug-gives-a-%22%24-is-not-defined%22-error-...
 Sent from the jQuery General Discussion mailing list archive at Nabble.com.


[jQuery] ajax form plugin submit button

2010-01-06 Thread Alex
Hello everyone,

I have a problem submitting a form tag with submit buttons. many of
the scripts used in that page require the name of these submit buttons
to work correctly. I already read about the serialize function and
submit buttons so tried the form plugin as suggested on the jQuery
page but i can't get this to work.

On a single site there is no problem using the plugin but the site is
only loaded at the beginning, after that everything works with ajax
requests and the page is never reloaded. The response of nearly all
ajax requests is a new page which is loaded into a draggable div so
that the site works like an OS. My problem is that the form tags that
are contained in these responses aren't submitted by the plugin, they
have their normal function and reload the webpage which is
catastrophical for that layout.

If you need more information please let me know.
Sorry for my english ;-)


Re: [jQuery] ajax form plugin submit button

2010-01-06 Thread Dhruva Sagar
Please give us a demo page or code which can help us debug the problem.

Thanks  Regards,
Dhruva Sagar.




On Thu, Jan 7, 2010 at 12:36 PM, Alex alex.kasu...@googlemail.com wrote:

 Hello everyone,

 I have a problem submitting a form tag with submit buttons. many of
 the scripts used in that page require the name of these submit buttons
 to work correctly. I already read about the serialize function and
 submit buttons so tried the form plugin as suggested on the jQuery
 page but i can't get this to work.

 On a single site there is no problem using the plugin but the site is
 only loaded at the beginning, after that everything works with ajax
 requests and the page is never reloaded. The response of nearly all
 ajax requests is a new page which is loaded into a draggable div so
 that the site works like an OS. My problem is that the form tags that
 are contained in these responses aren't submitted by the plugin, they
 have their normal function and reload the webpage which is
 catastrophical for that layout.

 If you need more information please let me know.
 Sorry for my english ;-)



Re: [jQuery] ajax form plugin submit button

2010-01-06 Thread John Arrowwood
All of your forms must have an event handler associated with their onSubmit
event.  These event handlers need to do their AJAX stuff, and then stop the
browser from doing the default action by returning false.  Since you are
creating these forms AFTER the page has already loaded, you need to either
create this event handler as part of creating the form, or use $().live() in
order to capture the event for ALL forms, present or future.  However, I
don't know that .live will work for that, I haven't tried, you will have to
experiment.

On Wed, Jan 6, 2010 at 11:06 PM, Alex alex.kasu...@googlemail.com wrote:

 Hello everyone,

 I have a problem submitting a form tag with submit buttons. many of
 the scripts used in that page require the name of these submit buttons
 to work correctly. I already read about the serialize function and
 submit buttons so tried the form plugin as suggested on the jQuery
 page but i can't get this to work.

 On a single site there is no problem using the plugin but the site is
 only loaded at the beginning, after that everything works with ajax
 requests and the page is never reloaded. The response of nearly all
 ajax requests is a new page which is loaded into a draggable div so
 that the site works like an OS. My problem is that the form tags that
 are contained in these responses aren't submitted by the plugin, they
 have their normal function and reload the webpage which is
 catastrophical for that layout.

 If you need more information please let me know.
 Sorry for my english ;-)




-- 
John Arrowwood
John (at) Irie (dash) Inc (dot) com
John (at) Arrowwood Photography (dot) com
John (at) Hanlons Razor (dot) com
--
http://www.irie-inc.com/
http://arrowwood.blogspot.com/