[jQuery] Re: How to select one of the many forms i have

2009-04-27 Thread RobG



On Apr 25, 6:09 am, funkyasl amritas...@gmail.com wrote:
 Hi all,
 I'm a jquery newbie. I've been searching around the web a lot, but
 could not find an answer.

 My page has multiple forms (forma, formb, formc, etc). I want to
 select one particular form, say formb, without assigning an id to it,
 just by its name itself. How can i achieve this?
 I've tried:
 $(forms[name=formb])
 but it doesnt work.

You may be thinking of:

  var form = document.forms['formb'];

where formb is the form's name.


--
Rob


[jQuery] Re: Cycle Plugin - Can't Get Pause To Work

2009-04-27 Thread Nic Hubbard

Really?  No one knows why the cycle pause is not working?  Someone
must be using this!

On Apr 24, 8:25 am, Nic Hubbard nnhubb...@gmail.com wrote:
 Anyone?

 On Apr 23, 9:44 pm, Nic Hubbard nnhubb...@gmail.com wrote:

  Shawn,

  Yes, I havepauseon hover set, and this is correctly working.  It is
  when the overlay comes up, and it is suppose topausethe current
  image, which, my code seems to be correct to do so $
  ('#artistCycleParent').cycle('pause'); but it just keeps cycling and
  does not honor thepause.

  I have it in my click function, and everything in the click function
  does work, but not thepause.  Once the user clicks off of the
  overlay, it should resume.

  On Apr 23, 9:22 pm, Shawn sgro...@open2space.com wrote:

  Pauseis working for me, with a catch.

   If my mouse is not over the image, it cycles.  Placing my mouse over the
   image pauses the cycling.

   Clicking the link brings up an overlay (?) and a form - at this point
   the mouse is not over the image, but over the overlay/form.  So the
   image cycles as it should.

   I don't think you want thepauseoption here.  I think you want to
   progamatically start/stop the cycling.  See the section Manually
   Pausing a slideshow athttp://malsup.com/jquery/cycle/int2.html.

   HTH.

   Shawn

   Nic Hubbard wrote:
I am using thecycleplugin, but for some reason I can't get thepause
feature to work.  I am showing a hidden div, and when I do, I need to
   pausethe slideshow.
Here is what I am using:

   $('#artistCycleParent').cycle({
           fx:      'fade',
           speed:    3000,
           timeout:  5000,
           pause:  1,
           next:   '#artworkNext',
           prev:   '#artworkPrev'
   });

   //Pausethecycle
   $('#pauseButton').click(function() {
           $('#artistCycleParent').cycle('pause');
           $(this).hide();
           $('#resumeButton').show();
           return false;
   });

   // Resume thecycle
   $('#resumeButton').click(function() {
           $('#artistCycleParent').cycle('resume');
           $(this).hide();
           $('#pauseButton').show();
           return false;
   });

The code looks ok to me, but it just does not seem topause.

Example:http://www.caldwellsnyder.com/artists/montoya-ortiz/view-artworks
Click on Contact about artwork

Thanks.


[jQuery] Detect if drag outside of parent using jQuery UI Draggable

2009-04-27 Thread cohq82

Hi, I am making a inner DIV to be draggable using jQuery UI Draggable.
The inner DIV can only move horizonally and fit within the outer DIV
(parent). I want to have some detection mechanism so that if the inner
DIV moved further left or right of the outer DIV, I will show
something ( and  arrow).

Is there any way to do this? Thanks


[jQuery] Re: detect quicktime?

2009-04-27 Thread bjorsq


Jack,

I've used the following code in the past and found it to work - it is from
http://www.dithered.com/javascript/quicktime_detect/index.html where you can
check out documentation, use cases, and download it (along with a
redirection script if you need one). It is quite old, but should work. I
used it once as a basis for a port of flashObject
(http://blog.deconcept.com/flashobject/) to do the same for Quicktime, but
unfortunately I can't find what I did any more...

// Quicktime Detection  v1.0
// documentation:
http://www.dithered.com/javascript/quicktime_detect/index.html
// license: http://creativecommons.org/licenses/by/1.0/
// code by Chris Nott (chris[at]dithered[dot]com)


var quicktimeVersion = 0;
function getQuicktimeVersion() {
var agent = navigator.userAgent.toLowerCase(); 

// NS3+, Opera3+, IE5+ Mac (support plugin array):  check for Quicktime
plugin in plugin array
if (navigator.plugins != null  navigator.plugins.length  0) {
  for (i=0; i  navigator.plugins.length; i++ ) {
 var plugin =navigator.plugins[i];
 if (plugin.name.indexOf(QuickTime)  -1) {
quicktimeVersion = parseFloat(plugin.name.substring(18));
 }
  }
}
   
// IE4+ Win32:  attempt to create an ActiveX object using VBScript
else if (agent.indexOf(msie) != -1  parseInt(navigator.appVersion) 
= 4
 agent.indexOf(win)!=-1  agent.indexOf(16bit)==-1) {
  document.write('scr' + 'ipt language=VBScript\ \n');
document.write('on error resume next \n');
document.write('dim obQuicktime \n');
document.write('set obQuicktime =
CreateObject(QuickTimeCheckObject.QuickTimeCheck.1) \n');
document.write('if IsObject(obQuicktime) then \n');
document.write('   if obQuicktime.IsQuickTimeAvailable(0) then 
\n');
document.write('  quicktimeVersion =
CInt(Hex(obQuicktime.QuickTimeVersion) / 100) \n');
document.write('   end if \n');
document.write('end if \n');
document.write('/scr' + 'ipt\ \n');
  }

// Can't detect in all other cases
else {
quicktimeVersion = quicktimeVersion_DONTKNOW;
}

return quicktimeVersion;
}

quicktimeVersion_DONTKNOW = -1;


Jack Killpatrick wrote:
 
 
 Hi All,
 
 I'm looking for a jquery plugin (or vanilla method) for detecting 
 quicktime, so I can decide whether to embed a QT movie or not. Did some 
 googling, but most of the methods seems really old and I didn't see any 
 jQuery plugins dedicated to detection.
 
 Any links/advice?
 
 Thanks!
 
 - Jack
 
 
 

-- 
View this message in context: 
http://www.nabble.com/detect-quicktime--tp23248106s27240p23251745.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: [autocomplete] Search Page Replacement

2009-04-27 Thread Matthew Vickery
Hi Tom,
Thanks for your reply.  I see what you mean about the tab key...  I hope
someone offers you some advice so you can use the plugin without branching.
 If you do find a solution I'd be glad to hear it too.  Did you see my
response re; 'selectFirst: false' ?  I don't know if this would help your
problem but it solved mine.  Also I found a list of all the autocomplete
options here:

http://docs.jquery.com/Plugins/Autocomplete/autocomplete#url_or_dataoptions

(Click the 'options' tab to the right of the 'overview' tab.  The 'options'
link further down goes somewhere else.)

Regards,

Matthew

2009/4/27 Tom Worster f...@thefsb.org

 On 4/26/09 9:12 AM, mattvick vickery.matt...@gmail.com wrote:

  I need the list of results to appear without any of them highlighted
  so hitting the return key submits the form without updating the text
  in the search field.  I still need the search field to update, and the
  form submit, if any of the results in the list are highlighted and
  clicked manually.

 this is one of two counter-intuitive keyboard behaviors i'm aware of. the
 other is tab, which most users would expect to get them to the next form
 element.


  Will someone please point me in the right direction or even better
  post an example so others can also benefit.

 i don't know for sure but i suspect that in most cases, changing the
 autocomplete keystroke behaviors requires changing the plugin code.

 which is a bit of a problem. i'd really like to use autocomplete in my app
 but without support (the author hasn't answered any email about
 autocomplete
 this month, afaict), seems like making it behave in a way that users won't
 complain about is going to mean branching.





-- 
Email: vickery.matt...@gmail.com
Land line: +44 (0)20 8123 3798


[jQuery] How to get this to work in jQ 1.3.x?

2009-04-27 Thread 123gotoandplay

Hi there,

I got a problem with jQuery 1.3.2 and IE when i use this for a menu

$(#manageHome).click(function() {
$(#content).css(overflow-y, scroll);
$(#content).load(manageText.php?action=showonderdeel=home);
});

When i downgrade jQuery to 1.2.6 it seems to work.

How can i fix this? And where is a list of changes between 1.2.6 and
1.3.2

Grtz,
Barry


[jQuery] Please help me to create a page scroll

2009-04-27 Thread Nibohs

I have to create a page scroller like in latest version of yahoo mail
list scroll. Can I create that kind of scolling effect by using js. If
any body can help me please please replay me.


[jQuery] Re: Form plugin: input elements excluded

2009-04-27 Thread dth

Aha!

I guess it must be because the dialog is moved to be the last element
of the body element, and thus outside of the form.

I guess that's necesarry for absolute placement  etc.

I'll see if I manually can pick up the extra field values. Suggestions
are welcome :)

-dennis

On Apr 27, 11:11 am, dth dennis.thry...@gmail.com wrote:
 According to firebug not much is altered, and the fields should be
 included in the form as far as I can tell. But they aren't :/


[jQuery] Re: Form plugin: input elements excluded

2009-04-27 Thread dth

Hi,

Is there someone on the list with detailed knowledge of how browsers
handle input fields. Or somebody that knows in detail what the jquery-
ui plugin actually does to a div.

According to firebug not much is altered, and the fields should be
included in the form as far as I can tell. But they aren't :/

Thanks,

-dennis

On Apr 26, 2:13 pm, dth dennis.thry...@gmail.com wrote:
 As far as I can tell they should all be just fine. If I disable the
 jquery-ui-dialog and just display the fields (in tabs) in the page,
 they work just fine.

 So it must be caused by the dialog plugin somehow.

 I have text inoput fields and checkboxes. They all have names. None
 are disabled (unless the dialog plugin is doing that).

 Hmm. How odd.

 The source is here:http://pastebin.com/m6243ec55

 The dialog is identified as #horseOptionsDialog.

 -dennis

 On 26 Apr., 14:07, Mike Alsup mal...@gmail.com wrote:

  No, hidden form fields are not excluded.  What does your markup look
  like?  There are several reasons that inputs would not be submitted:

  - the input does not have a name attribute
  - the input is disabled
  - the input is a checkbox or radio and is not checked

  Only successful[1] form elements are submitted.


[jQuery] div contains li - select div but NOT li

2009-04-27 Thread gostbuster

Hi everyone,

I would appreciate some help with what I wanna do.

I explain my problem :

I want to do a map-like: It means a div with background images, and
some elements on it (a bit like in google map : you have the map in
background, and stuff you can click over it.

well i have this code :


div id=plan
   ul
   li/li
   li/li
   li/li
  /ul
/div


I would like to select #plan but NOT the li element inside.

I tried some stuff but didn't succeed.

I'm sure experts from here will solve this problem in less in a
second.

Thank you VERY MUCH in advance.



[jQuery] Re: http://wiki.jqueryui.com/ style navigator

2009-04-27 Thread Richard D. Worth
The menu you're seeing is part of PBWiki, which powers wiki.jqueryui.com.
Filament Group has created a similar menu:

http://www.filamentgroup.com/lab/jquery_ipod_style_and_flyout_menus/

The jQuery UI Team is working on making this a jQuery UI plugin:

http://wiki.jqueryui.com/Menu

- Richard

On Sun, Apr 26, 2009 at 10:13 PM, Veeru swamyve...@gmail.com wrote:


 Hi there,
  I was wondering if there is any plugin or technique to achieve
 something similar to the http://wiki.jqueryui.com/ site. The navigator
 to the right of the page looks pretty amazing, i would like to know
 how it can be done or if its already done and available.

 Thanks
 Vru


[jQuery] Re: div contains li - select div but NOT li

2009-04-27 Thread Charlie





your question isn't very clear . If you are trying to select based on
what is inside the div these should help:

$("div:contains("Some Text")).// do something
or 
$("div:has(li[class=something])").// do something

http://docs.jquery.com/Selectors


need to be more specific what you are trying to do. The way your
question is written " $("plan"). //do something " would work


gostbuster wrote:

  Hi everyone,

I would appreciate some help with what I wanna do.

I explain my problem :

I want to do a map-like: It means a div with background images, and
some elements on it (a bit like in google map : you have the map in
background, and stuff you can click over it.

well i have this code :


div id="plan"
   ul
   li/li
   li/li
   li/li
  /ul
/div


I would like to select #plan but NOT the li element inside.

I tried some stuff but didn't succeed.

I'm sure experts from here will solve this problem in less in a
second.

Thank you VERY MUCH in advance.


  






[jQuery] Re: - max validation with float values

2009-04-27 Thread JesperDK

Hi all,

Is there someone who have any ideas of how that could be solved?

Thanks in advance.

/Jesper

On 26 Apr., 20:01, JesperDK jespersoren...@gmail.com wrote:
 Hi all,

 I use the validation 
 fromhttp://bassistance.de/jquery-plugins/jquery-plugin-validation/
 and have a problem with float values on the validation.

 I have implemented the following on my page:

 ..

 script src=/admincustomers/js/jquery-1.3.2.min.js type=text/
 javascript/script
 script src=/admincustomers/js/validate/jquery.metadata.js
 type=text/javascript/script
 script src=/admincustomers/js/validate/jquery.validate.js
 type=text/javascript/script
 script src=js/validate/cmxforms.js type=text/javascript/script

 script type=text/javascript
 $(document).ready(function() {
         $(#commentForm).validate({meta: validate});});

 /script

 

 p
 label for=camountreportedRedeem/label
 input id=camountreported name=amountreported class={validate:
 {required:true,numberDE:true,max:6.06}} /
 /p

 The problem is that the user enters his values in 4, 5,25, 6,00 or
 6,05 etc.. (using the , sign) and the max validation only takes
 integers.

 How can I still make the max validation with the , sign and float
 values? The users isn't allowed to submit the form if the value is
 greater than the max value specifyed.

 I hope some one can help me :-)

 Thanks in advance.

 /Jesper


[jQuery] Re: div contains li - select div but NOT li

2009-04-27 Thread gostbuster

Okay I'll try to explain better.


Imagine an image, it's a rectangle.

you can have a div with this image for background :

like this :

div id=plan

/div


Then, with CSS, you can do this :

#plan{
background:url(my image url);
width : image width;
height: image height
}

Well, my image is representing a map.

over my map, I have little icons (like in google map : you have the
map and spots)

that's why I have something like this :


div id=plan -- this is the map ID, with the map image for
background
   ul
   li/li
   li/li -- each li represents a spot. the spot is an
image displayed at the spot position in the map --
   li/li
  /ul
/div


I want to be able to click on the map (on the div #plan) but NOT on a
li element.

Is it more understandable ?

Thank you very much


On 27 avr, 13:55, Charlie charlie...@gmail.com wrote:
 your question isn't very clear . If you are trying to select based on what is 
 inside the div these should help:
 $(div:contains(Some Text)).// do something
 or
 $(div:has(li[class=something])).// do 
 somethinghttp://docs.jquery.com/Selectors
 need to be more specific what you are trying to do. The way your question is 
 written  $(plan). //do something  would work
 gostbuster wrote:Hi everyone, I would appreciate some help with what I wanna 
 do. I explain my problem : I want to do a map-like: It means a div with 
 background images, and some elements on it (a bit like in google map : you 
 have the map in background, and stuff you can click over it. well i have this 
 code : div id=plan ul li/li li/li li/li /ul 
 /div I would like to select #plan but NOT the li element inside. I tried 
 some stuff but didn't succeed. I'm sure experts from here will solve this 
 problem in less in a second. Thank you VERY MUCH in advance.


[jQuery] Re: [validate] - max validation with float values

2009-04-27 Thread Jörn Zaefferer

You need to add a custom method:
http://docs.jquery.com/Plugins/Validation/Validator/addMethod
And implement the validation for float values there.

Jörn

On Sun, Apr 26, 2009 at 8:01 PM, JesperDK jespersoren...@gmail.com wrote:

 Hi all,

 I use the validation from 
 http://bassistance.de/jquery-plugins/jquery-plugin-validation/
 and have a problem with float values on the validation.

 I have implemented the following on my page:

 ..

 script src=/admincustomers/js/jquery-1.3.2.min.js type=text/
 javascript/script
 script src=/admincustomers/js/validate/jquery.metadata.js
 type=text/javascript/script
 script src=/admincustomers/js/validate/jquery.validate.js
 type=text/javascript/script
 script src=js/validate/cmxforms.js type=text/javascript/script

 script type=text/javascript
 $(document).ready(function() {
        $(#commentForm).validate({meta: validate});
 });
 /script

 

 p
 label for=camountreportedRedeem/label
 input id=camountreported name=amountreported class={validate:
 {required:true,numberDE:true,max:6.06}} /
 /p

 The problem is that the user enters his values in 4, 5,25, 6,00 or
 6,05 etc.. (using the , sign) and the max validation only takes
 integers.

 How can I still make the max validation with the , sign and float
 values? The users isn't allowed to submit the form if the value is
 greater than the max value specifyed.

 I hope some one can help me :-)

 Thanks in advance.

 /Jesper



[jQuery] Re: div contains li - select div but NOT li

2009-04-27 Thread Remon Oldenbeuving
You could use the event object thats being passed when a click event fires?

$('#plan').click(function(e){
 if(e.target !== liobject){ //You will have to check whats the real target
for a list item
  //here your code
 }
});

On Mon, Apr 27, 2009 at 2:08 PM, gostbuster jeremyescol...@gmail.comwrote:


 Okay I'll try to explain better.


 Imagine an image, it's a rectangle.

 you can have a div with this image for background :

 like this :

 div id=plan
 
 /div


 Then, with CSS, you can do this :

 #plan{
 background:url(my image url);
 width : image width;
 height: image height
 }

 Well, my image is representing a map.

 over my map, I have little icons (like in google map : you have the
 map and spots)

 that's why I have something like this :


 div id=plan -- this is the map ID, with the map image for
 background
   ul
   li/li
   li/li -- each li represents a spot. the spot is an
 image displayed at the spot position in the map --
   li/li
  /ul
 /div


 I want to be able to click on the map (on the div #plan) but NOT on a
 li element.

 Is it more understandable ?

 Thank you very much


 On 27 avr, 13:55, Charlie charlie...@gmail.com wrote:
  your question isn't very clear . If you are trying to select based on
 what is inside the div these should help:
  $(div:contains(Some Text)).// do something
  or
  $(div:has(li[class=something])).// do somethinghttp://
 docs.jquery.com/Selectors
  need to be more specific what you are trying to do. The way your question
 is written  $(plan). //do something  would work
  gostbuster wrote:Hi everyone, I would appreciate some help with what I
 wanna do. I explain my problem : I want to do a map-like: It means a div
 with background images, and some elements on it (a bit like in google map :
 you have the map in background, and stuff you can click over it. well i have
 this code : div id=plan ul li/li li/li li/li
 /ul /div I would like to select #plan but NOT the li element inside. I
 tried some stuff but didn't succeed. I'm sure experts from here will solve
 this problem in less in a second. Thank you VERY MUCH in advance.



[jQuery] Re: div contains li - select div but NOT li

2009-04-27 Thread gostbuster

Hi,

Yes of course I could do this, but Jquery selectors don't allow what I
wish to do?

Thanks.

On 27 avr, 14:25, Remon Oldenbeuving r.s.oldenbeuv...@gmail.com
wrote:
 You could use the event object thats being passed when a click event fires?

 $('#plan').click(function(e){
  if(e.target !== liobject){ //You will have to check whats the real target
 for a list item
   //here your code
  }

 });

 On Mon, Apr 27, 2009 at 2:08 PM, gostbuster jeremyescol...@gmail.comwrote:



  Okay I'll try to explain better.

  Imagine an image, it's a rectangle.

  you can have a div with this image for background :

  like this :

  div id=plan
  
  /div

  Then, with CSS, you can do this :

  #plan{
  background:url(my image url);
  width : image width;
  height: image height
  }

  Well, my image is representing a map.

  over my map, I have little icons (like in google map : you have the
  map and spots)

  that's why I have something like this :

  div id=plan -- this is the map ID, with the map image for
  background
    ul
        li/li
        li/li -- each li represents a spot. the spot is an
  image displayed at the spot position in the map --
        li/li
   /ul
  /div

  I want to be able to click on the map (on the div #plan) but NOT on a
  li element.

  Is it more understandable ?

  Thank you very much

  On 27 avr, 13:55, Charlie charlie...@gmail.com wrote:
   your question isn't very clear . If you are trying to select based on
  what is inside the div these should help:
   $(div:contains(Some Text)).// do something
   or
   $(div:has(li[class=something])).// do somethinghttp://
  docs.jquery.com/Selectors
   need to be more specific what you are trying to do. The way your question
  is written  $(plan). //do something  would work
   gostbuster wrote:Hi everyone, I would appreciate some help with what I
  wanna do. I explain my problem : I want to do a map-like: It means a div
  with background images, and some elements on it (a bit like in google map :
  you have the map in background, and stuff you can click over it. well i have
  this code : div id=plan ul li/li li/li li/li
  /ul /div I would like to select #plan but NOT the li element inside. I
  tried some stuff but didn't succeed. I'm sure experts from here will solve
  this problem in less in a second. Thank you VERY MUCH in advance.


[jQuery] Re: [autocomplete] Search Page Replacement

2009-04-27 Thread Tom Worster

On 4/26/09 9:31 PM, Jordon Bedwell jor...@envygeeks.com wrote:

 this is one of two counter-intuitive keyboard behaviors i'm aware of. the
 other is tab, which most users would expect to get them to the next form
 element.
 
 I'm still scratching my head at how this is counter-intuitive? If you called
 it that, you must not understand the entire scope of tab, and the fact that
 it has no scope, it loops through the entire frame of the browser, including
 the address bar and links.  With JavaScript you can prevent it from looping
 through links and the address bar by defining where it goes and what it
 does. YES, if it did infact stay within forms if you select a form element
 it would be counter-intuitive, but at this point, it is far from that based
 on logic.  There are also more reasons to redine the default behaviour of
 tab.

turning tab into a select, i..e making it work like enter, is counter-
intuitive, to me. autocomplete does that.

if you're in a form and the focus is on a text input and the form layout
shows that the next form element is, say, another text element, you'd expect
tab to get you to it. but with the autocomplete plugin, hit tab to move to
the next input and what you typed gets over-written by a suggestion. that's
not just unexpected, it's annoying.




[jQuery] Re: [autocomplete] Search Page Replacement

2009-04-27 Thread Tom Worster

On 4/27/09 5:25 AM, Matthew Vickery vickery.matt...@gmail.com wrote:

 Thanks for your reply.  I see what you mean about the tab key...  I hope
 someone offers you some advice so you can use the plugin without branching.

i already have an auto-completion of my own that i wrote a few years ago
before i knew of jquery. it requires only about 10% of the locs that
autocomplete plugin uses because it only does what i need and not all that
other stuff too. rewriting my code for the new app (maybe using jq) is
perhaps less work than maintaining my own version of the plugin.

i'm willing to take a bet on jq being around and supported in future. i'm
not sure about autocomplete.


  If you do find a solution I'd be glad to hear it too.  Did you see my
 response re; 'selectFirst: false' ?  I don't know if this would help your
 problem but it solved mine.

it helps but it's not enough. for an example with selectFirst: false:

1. go to http://jquery.bassistance.de/autocomplete/demo/

2. click in the Single Bird (remote): text input.

3. type, say, pal and wait for the suggestions to appear.

4. hit tab.

in my browser, the Get Value button focuses for a moment then the focus
moves back to the Single Bird (remote): text input. it takes two tabs to
get the focus out of there. that really runs against user expectations and
makes no sense. for people used to working fast through forms with the
keyboard only, this behavior will be inexplicable and annoying.




[jQuery] Re: Detect if drag outside of parent using jQuery UI Draggable

2009-04-27 Thread Karl Swedberg
Would you mind posting this question to the jquery-ui google group if  
you haven't done so already? That group is dedicated to questions such  
as yours that are specifically related to jQuery UI.

http://groups.google.com/group/jquery-ui/

thanks,

--Karl


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




On Apr 27, 2009, at 3:05 AM, cohq82 wrote:



Hi, I am making a inner DIV to be draggable using jQuery UI Draggable.
The inner DIV can only move horizonally and fit within the outer DIV
(parent). I want to have some detection mechanism so that if the inner
DIV moved further left or right of the outer DIV, I will show
something ( and  arrow).

Is there any way to do this? Thanks




[jQuery] Re: div contains li - select div but NOT li

2009-04-27 Thread Charlie





what you are doing is called event delegation, there's more to it than
simple selectors . You could be clicking in the div but not on an li or
clicking on the contents of an li. That's what was meant by " //You
will have to check whats the real target " for a list item

$('#plan').click(function(event) {
 var $thisLi, $tgt = $(event.target);
 if ($tgt.is('li')) {
  $thisLi = $tgt
 ///work with $thisLi to get css info
 }  
 // check if click is on li or contents of an li or somewhere
else in #plan
 else if ($tgt.parents('li').length) {
 $thisLi = $tgt.parents('li:first');
 ///work with $thisLi to get css info
 }

this is a modification of following excellent tutorial example 
http://www.learningjquery.com/2008/03/working-with-events-part-1

hope this helps


gostbuster wrote:

  Hi,

Yes of course I could do this, but Jquery selectors don't allow what I
wish to do?

Thanks.

On 27 avr, 14:25, Remon Oldenbeuving r.s.oldenbeuv...@gmail.com
wrote:
  
  
You could use the event object thats being passed when a click event fires?

$('#plan').click(function(e){
if(e.target !== "liobject"){ //You will have to check whats the real target
for a list item
 //here your code
}

});

On Mon, Apr 27, 2009 at 2:08 PM, gostbuster jeremyescol...@gmail.comwrote:





  Okay I'll try to explain better.
  


  Imagine an image, it's a rectangle.
  


  you can have a div with this image for background :
  


  like this :
  


  div id="plan"

/div
  


  Then, with CSS, you can do this :
  


  #plan{
background:url(my image url);
width : image width;
height: image height
}
  


  Well, my image is representing a map.
  


  over my map, I have little icons (like in google map : you have the
map and spots)
  


  that's why I have something like this :
  


  div id="plan" -- this is the map ID, with the map image for
background
 ul
   li/li
   li/li -- each li represents a spot. the spot is an
image displayed at the spot position in the map --
   li/li
/ul
/div
  


  I want to be able to click on the map (on the div #plan) but NOT on a
li element.
  


  Is it more understandable ?
  


  Thank you very much
  


  On 27 avr, 13:55, Charlie charlie...@gmail.com wrote:
  
  
your question isn't very clear . If you are trying to select based on

  
  what is inside the div these should help:
  
  
$("div:contains("Some Text")).// do something
or
$("div:has(li[class=something])").// do somethinghttp://

  
  docs.jquery.com/Selectors
  
  
need to be more specific what you are trying to do. The way your question

  
  is written " $("plan"). //do something " would work
  
  
gostbuster wrote:Hi everyone, I would appreciate some help with what I

  
  wanna do. I explain my problem : I want to do a map-like: It means a div
with background images, and some elements on it (a bit like in google map :
you have the map in background, and stuff you can click over it. well i have
this code : div id="plan" ul li/li li/li li/li
/ul /div I would like to select #plan but NOT the li element inside. I
tried some stuff but didn't succeed. I'm sure experts from here will solve
this problem in less in a second. Thank you VERY MUCH in advance.
  

  
  
  






[jQuery] Re: div contains li - select div but NOT li

2009-04-27 Thread Remon Oldenbeuving
It looks obvious, but aint working for me.

On Mon, Apr 27, 2009 at 3:16 PM, Mauricio (Maujor) Samy Silva 
css.mau...@gmail.com wrote:



 De: gostbuster jeremyescol...@gmail.com
 Assunto: [jQuery] Re: div contains li - select div but NOT li
 Hi,
 Yes of course I could do this, but Jquery selectors don't allow what I
 wish to do?
 Thanks.

 --
 How about:
 $('#plan').not('ul').click(function(){...}
 Maurício



[jQuery] in the dynamic accordion trigger jqmodal window

2009-04-27 Thread Natkeeran L.K.

Hello:

I want to populate accordions based on user selections, and within the
accordion allow the user to enter more details through jqmodal.  I am
close to doing that here:
http://pssnet.com/~devone/ajqtable/summary3998e.html

But I have this issue.  If the user clicks the test button outside or
below the accordion, it pop ups the jqmodal.  But, when I try to embed
that within the accordion as a js variable.  This does not work.

Any help appreciated.  Thanks.

Regards,
Nat


[jQuery] BlockUI problem with iframe in IE7

2009-04-27 Thread Tamoj

I have got iframe in the page and when I call blockui, the content
gets disappear in the iframe. This problem is only in IE7 not in IE6
and IE8.

I am currently using

* jQuery blockUI plugin
* Version 2.18 (16-APR-2009)

need to refresh with no cache for remedy and no problem if I do not
call blockui

regards,


[jQuery] How do i control window scrolling with two divs(top, bottom)

2009-04-27 Thread Géant

Hopefully someone can help me! :) What I want to do is control a
window/div scrolling via the use of two div's. Example.

1)  First div named top(#top), which will be fixed to the top
2)  Second div is bottom(#bottom) which is fixed to the bottom of
the window.
3)  An image in a content div(#content) with is say 2000px long

All I want the divs top and bottom to do is scroll up or down slowly
when they are hovered?
How do i find the current position of the #content div and +/-?

Any suggestions?


[jQuery] jquery and https bug

2009-04-27 Thread gillian

Hi there

I am working on a site that is using https. i have a toolbar using
jquery but for some reason, IE6 throws an error saying

'Security Information
This page contains both secure and nonsecure items ...'

Any ideas on what's happening?
Or how i can fix this?

thanks
gillian



[jQuery] Thickbox: The called page does not run JQuery in FF or chrome

2009-04-27 Thread paulus938

I've setup a page that uses simple JQuery to fade out text when
clicking a link. This page works in all browsers. However, when this
page is displayed in the ThickBox popup, the link doesn't fadeout the
text in firefox or chrome but does fade out in IE.

Does anyone else have this problem?

If you want to test this please use the code below:

Default.aspx (the page that uses Thickbox and calls Test.aspx)

html xmlns=http://www.w3.org/1999/xhtml;
head runat=server
title/title
link href=thickbox.css rel=stylesheet type=text/css /
script src=http://ajax.googleapis.com/ajax/libs/jquery/1.3/
jquery.min.js type=text/javascript/script
script type=text/javascript src=thickbox.js/script
/head
body
input alt=Test.aspx?
height=600width=500inlineId=myOnPageContent title=Feedback Form
class=thickbox type=button value=FeedBack /
/body
/html

Test.aspx (Will fadeout the red background on IE not FF or chrome when
used in conjunction with ThickBox)

head runat=server
title/title
style type=text/css
#box
{
background: red;
width: 300px;
height: 300px;
}
/style
script src=http://ajax.googleapis.com/ajax/libs/jquery/1.3/
jquery.min.js type=text/javascript/script
script type=text/javascript
$(document).ready(function() {
$('#link').click(function() {
alert('test');
$('#box').fadeOut();
});
});
/script
/head
body
form id=form1 runat=server
div id=box/div
a id=link href=#Click me/a
/form
/body
/html


[jQuery] cheap GHD (www.518store.com)

2009-04-27 Thread kkkkkkkkk

cheap GHD (www.518store.com)

hot sale CHD(www.518store.com)


wholesale CHD(www.518store.com)


good CHD(www.518store.com)

new style CHD(www.518store.com






cheap GHD (www.518store.com)

hot sale CHD(www.518store.com)


wholesale CHD(www.518store.com)


good CHD(www.518store.com)

new style CHD(www.518store.com







cheap GHD (www.518store.com)

hot sale CHD(www.518store.com)


wholesale CHD(www.518store.com)


good CHD(www.518store.com)

new style CHD(www.518store.com


[jQuery] Re: Do object events persist in cloning? I can't get this method to work.

2009-04-27 Thread Scott Sauyet


Thomas Allen wrote:

What I'm doing is creating a couple button objects and cloning them.
$(memberSections).prepend(toggler.clone());
$(youngerSections).prepend(toggler.clone());
});

Why is it that neither button logs to the console when clicked?


You might try passing true to the clone method.  [1]  That copies event 
handlers as well.  I don't know if it will solve your problem, but it's 
worth a try.


Cheers,

  -- Scott

[1] http://docs.jquery.com/Clone#clone.28.C2.A0bool_.29


[jQuery] Re: Do object events persist in cloning? I can't get this method to work.

2009-04-27 Thread Thomas Allen

Yep, that did it, thanks. I had never heard of this before.

Thomas

On Apr 27, 10:13 am, Scott Sauyet li...@sauyet.com wrote:
 Thomas Allen wrote:
  What I'm doing is creating a couple button objects and cloning them.
      $(memberSections).prepend(toggler.clone());
      $(youngerSections).prepend(toggler.clone());
  });

  Why is it that neither button logs to the console when clicked?

 You might try passing true to the clone method.  [1]  That copies event
 handlers as well.  I don't know if it will solve your problem, but it's
 worth a try.

 Cheers,

    -- Scott

 [1]http://docs.jquery.com/Clone#clone.28.C2.A0bool_.29


[jQuery] cluetip is not working in updatepanel

2009-04-27 Thread donkeyking

Who can give me an example which cluetip can work in updatepanel?


[jQuery] Re: jquery and https bug

2009-04-27 Thread Nathan


Make sure you are linking to files using 'https://' rather then
'http://'.


On Apr 27, 6:42 am, gillian gillian.be...@ntlworld.com wrote:
 Hi there

 I am working on a site that is using https. i have a toolbar using
 jquery but for some reason, IE6 throws an error saying

 'Security Information
 This page contains both secure and nonsecure items ...'

 Any ideas on what's happening?
 Or how i can fix this?

 thanks
 gillian


[jQuery] reading show/hide state

2009-04-27 Thread Tom Worster

when using show() and hide(), what's the right way for the script to read
the state of the element? i've found that attr('display') can be used but
this seems like an undocumented hack and could fail in future releases of
jquery. 




[jQuery] Re: Firefox onclick problem.

2009-04-27 Thread Remon Oldenbeuving
You should put the $(document).ready function above the function call.

so:

$(function(){  //Same as $(document).ready(function)
 function del(mesId){
 }
});

On Mon, Apr 27, 2009 at 11:48 AM, Ozan ozanaltink...@gmail.com wrote:


 Hi I'm a newbie and heres my newbie question.I can't fire my function
 with onclick event in Firefox.My little piece of code works perfect in
 IE. but in firefox it just doesn't work and no error in firebug by the
 way.I'm using Firefox 3.0.9

 This is the code:

 script type=text/javascript
function del(mesId) {
$(document).ready(function() {
$(# + mesId).hide(fast);

});
}

/script


 and the html;

 button id=delete onclick=del(%# Eval(Id)%)Delete/button

 What am I doing wrong? And thank you for your answers.



[jQuery] Re: reading show/hide state

2009-04-27 Thread Michael Lawson

You can use the jQuery filters :hidden and :visible

cheers

Michael Lawson
Content Tools Developer, Global Solutions, ibm.com
Phone:  1-828-355-5544
E-mail:  mjlaw...@us.ibm.com

'Examine my teachings critically, as a gold assayer would test gold. If you
find they make sense, conform to your experience, and don't harm yourself
or others, only then should you accept them.'


   
  From:   Tom Worster f...@thefsb.org 
   
  To: jquery-en@googlegroups.com jquery-en@googlegroups.com
   
  Date:   04/27/2009 10:33 AM  
   
  Subject:[jQuery] reading show/hide state 
   






when using show() and hide(), what's the right way for the script to read
the state of the element? i've found that attr('display') can be used but
this seems like an undocumented hack and could fail in future releases of
jquery.



inline: graycol.gifinline: ecblank.gif

[jQuery] Removing item from array based on property

2009-04-27 Thread Mervyn

Hello all,

I have a question about removing an item from an array.

I am looking to remove an item from the array based on the property.

Ie.
arr = [{a1: 1, a2: 2},{a1: 3, a2: 4}, {a1: 5, a2: 6}]

remove first item from array because a1 = 1.

I am not entirely sure how to do this. I tried messing around with
grep a bit, but that didn't turn out well.

Thanks


[jQuery] ajax append problem

2009-04-27 Thread clicforw...@googlemail.com

Hello,

im using this script to load a external site into my DOM.
It works fine but i need just a part of this test.html.

For example: I want to append just the div #cont from test.html
How can i do that?

script type=text/javascript
$.ajax({
  url: test.html,
  cache: false,
  success: function(html){
$(.content).append(html);
  }
});
/script

Thanks for Help!


[jQuery] Re: ajax append problem

2009-04-27 Thread Michael Lawson

instead of  $(.content).append(html);
do
var contentToAppend = html.find(#cont);
$(.content).append(contentToAppend);

cheers

Michael Lawson
Content Tools Developer, Global Solutions, ibm.com
Phone:  1-828-355-5544
E-mail:  mjlaw...@us.ibm.com

'Examine my teachings critically, as a gold assayer would test gold. If you
find they make sense, conform to your experience, and don't harm yourself
or others, only then should you accept them.'


   
  From:   clicforw...@googlemail.com clicforw...@googlemail.com
   
  To: jQuery (English) jquery-en@googlegroups.com  
   
  Date:   04/27/2009 11:03 AM  
   
  Subject:[jQuery] ajax append problem 
   






Hello,

im using this script to load a external site into my DOM.
It works fine but i need just a part of this test.html.

For example: I want to append just the div #cont from test.html
How can i do that?

script type=text/javascript
$.ajax({
  url: test.html,
  cache: false,
  success: function(html){
$(.content).append(html);
  }
});
/script

Thanks for Help!

inline: graycol.gifinline: ecblank.gif

[jQuery] Re: cluetip is not working in updatepanel

2009-04-27 Thread Karl Swedberg
I don't know anything about updatepanel, so I'm probably not going to  
be able to help you unless you give me some more information. A quick  
Google search turned up this about jQuery and UpdatePanel:


http://stackoverflow.com/questions/22466/jquery-ajax-vs-updatepanel

If the problem is related to the cluetip function not being bound to  
content that has been ajaxed in, you'll probably have to re-bind it  
after the new content has been loaded. See this tutorial for more  
information:


http://www.learningjquery.com/2008/05/working-with-events-part-2

--Karl


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




On Apr 27, 2009, at 12:36 AM, donkeyking wrote:



Who can give me an example which cluetip can work in updatepanel?




[jQuery] Charset in $.ajax

2009-04-27 Thread Colonel

Is there way to change charset when I request page by $.ajax?


[jQuery] Re: Removing item from array based on property

2009-04-27 Thread Karl Swedberg

Hey Mervyn,

this should do it:

var arr = [{a1: 1, a2: 2},{a1: 3, a2: 4}, {a1: 5, a2: 6}];
for (var i=0; i  arr.length; i++) {
  if (arr[i].a1 == 1) {
  arr.splice(i,1);
}
}

just loop through the members of the array and check each one's a1  
property. If it equals 1, remove it from the array with the .splice()  
method.


--Karl


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




On Apr 27, 2009, at 10:51 AM, Mervyn wrote:



Hello all,

I have a question about removing an item from an array.

I am looking to remove an item from the array based on the property.

Ie.
arr = [{a1: 1, a2: 2},{a1: 3, a2: 4}, {a1: 5, a2: 6}]

remove first item from array because a1 = 1.

I am not entirely sure how to do this. I tried messing around with
grep a bit, but that didn't turn out well.

Thanks




[jQuery] Re: Is it possible to select on multiple attribute values?

2009-04-27 Thread machineghost

Thanks all for the great suggestions!  I think I'm going to use
George's solution for now (it's easy, if slightly verbose), but when I
have a free moment I'm going to follow mkmanning's advice and look in
to making a custom selector.

Jeremy

On Apr 26, 12:03 pm, George Adamson george.adam...@softwareunity.com
wrote:
  so the name=someName has to be repeated for each value.

 How about $([name=someName]).filter([value=someValue],
 [value=otherValue]) ?

 Cheers,
 George


[jQuery] Controlling my slideshow . . .

2009-04-27 Thread pts123

I was recomended to come here, so I will re-enter the post I made at a
vBulletin assistance site and see if my problem can be corrected using
jQuery.

I'm just about ready to go live with my latest and I have added a
rotating type slide show hosted by Photobucket. This site will be for
Ham Radio operators and they will be submitting their QSL cards that I
scan and copy up to the slide show. Here's what I want to do.

The text added to the vBulletin header template is this:

div style=width:100%; text-align: center;embed type=application/
x-shockwave-flash wmode=transparent src=http://
w607.photobucket.com/pbwidget.swf?pbwurl=http://w607.photobucket.com/
albums/.pbw height=90 width=100%/div

I just put it at the top in the template and there it is. But, I
realize that having that running all the time is a bit annoying, so I
need a way to turn it off. Normally I just remove it from the template
and it's gone. How can I add a button to the top of my home page that
says QSL Slideshow on/off. If I had that, users could control it
themselves. How can I control that little bit of text in the template?
Would I add a template and have that text in a seperate template or
rem it out, or what? It would need to be controlled by each user
effecting only what they see.

My first post had a lot of readers but only once response and I was
told this task could be handled easily by jQuery. Was hoping to get
some feedback from the community, before going any further, Thanks

Check it out:  http://kcHamRadio.com

JD in KC


[jQuery] Re: Removing item from array based on property

2009-04-27 Thread mkmanning

Not sure why $.grep didn't work for you. Here's a functioning sample
to compare:

arr = $.grep(arr,function(n,i){
return n.a1 != 1;
})

On Apr 27, 7:51 am, Mervyn mervyn.mar...@gmail.com wrote:
 Hello all,

 I have a question about removing an item from an array.

 I am looking to remove an item from the array based on the property.

 Ie.
 arr = [{a1: 1, a2: 2},{a1: 3, a2: 4}, {a1: 5, a2: 6}]

 remove first item from array because a1 = 1.

 I am not entirely sure how to do this. I tried messing around with
 grep a bit, but that didn't turn out well.

 Thanks


[jQuery] Where to find a jQuery Developer?

2009-04-27 Thread nmiddleweek

Hello,

Does anyone know where I can post a wanted Ad for a London based
jQuery developer to help me create a jQuery UI component?

I have a client where I'm creating UI's for but I want future ones
created in jQuery and I need some help because I can't do it... :)


Thanks,
Nick


[jQuery] limit drag to a zone

2009-04-27 Thread gostbuster

Hi everybody,

I was wondering if there was a way to limit a drag from a zone :

for example I have a div zone with elements inside :

div my dragable element/ /div

and I don't want to be able to drag the element out from the div.

I read the doc but didn't see anything

Thank you very much


[jQuery] Re: Where to find a jQuery Developer?

2009-04-27 Thread Joseph Le Brech

Does it need to be in london?
 
 Date: Mon, 27 Apr 2009 09:27:17 -0700
 Subject: [jQuery] Where to find a jQuery Developer?
 From: nmiddlew...@googlemail.com
 To: jquery-en@googlegroups.com
 
 
 Hello,
 
 Does anyone know where I can post a wanted Ad for a London based
 jQuery developer to help me create a jQuery UI component?
 
 I have a client where I'm creating UI's for but I want future ones
 created in jQuery and I need some help because I can't do it... :)
 
 
 Thanks,
 Nick

_
Share your photos with Windows Live Photos – Free.
http://clk.atdmt.com/UKM/go/134665338/direct/01/

[jQuery] Re: limit drag to a zone

2009-04-27 Thread Remon Oldenbeuving
Hi,

First, you should post this in the jquery-ui google group.
Second, your request is being handled in the draggable demo page.

http://jqueryui.com/demos/draggable/#constrain-movement

On Mon, Apr 27, 2009 at 6:27 PM, gostbuster jeremyescol...@gmail.comwrote:


 Hi everybody,

 I was wondering if there was a way to limit a drag from a zone :

 for example I have a div zone with elements inside :

 div my dragable element/ /div

 and I don't want to be able to drag the element out from the div.

 I read the doc but didn't see anything

 Thank you very much



[jQuery] Re: how to convert a string to json structure

2009-04-27 Thread Scott Sauyet


gaohk wrote:

I have a string that is like [{carePacks:
[{businessCode:J1PS,description:HP 1}],coveragePeriod:12},
{carePacks:[{businessCode:J1PS,description:HP
s}],coveragePeriod:13}].
can you give me some advice on how to convert it to a json structure,
and how to get data from the data structure, like get HP 1.


This doesn't require any jQuery work, although jQuery might help you 
fetch the data.


var items = eval('(' + data + ')');
alert(items[0][carePacks][0][description]);

Cheers,

  -- Scott


[jQuery] Re: Where to find a jQuery Developer?

2009-04-27 Thread nmiddlew...@gmail.com

I would rather because I'd also like to learn on the way...

Are you thinking yourself? Where are you based?


Thanks,
Nick




On Apr 27, 5:35 pm, Joseph Le Brech jlebr...@hotmail.com wrote:
 Does it need to be in london?



  Date: Mon, 27 Apr 2009 09:27:17 -0700
  Subject: [jQuery] Where to find a jQuery Developer?
  From: nmiddlew...@googlemail.com
  To: jquery-en@googlegroups.com

  Hello,

  Does anyone know where I can post a wanted Ad for a London based
  jQuery developer to help me create a jQuery UI component?

  I have a client where I'm creating UI's for but I want future ones
  created in jQuery and I need some help because I can't do it... :)

  Thanks,
  Nick

 _
 Share your photos with Windows Live Photos – 
 Free.http://clk.atdmt.com/UKM/go/134665338/direct/01/


[jQuery] Re: ajax append problem

2009-04-27 Thread clicforw...@googlemail.com

Hello Michael,

thanks for this.
I got a error:  html.find is not a function
Any idea?

script type='text/javascript' src='http://ajax.googleapis.com/ajax/
libs/jquery/1.3.2/jquery.min.js'/script
script type=text/javascript
$(document).ready(function(){
$.ajax({
url: leistung.html,
cache: false,
success: function(html) {
var loadCont = html.find('#cont');
$(.content).append(loadCont);
}
});
});
/script


On Apr 27, 5:07 pm, Michael Lawson mjlaw...@us.ibm.com wrote:
 instead of  $(.content).append(html);
 do
 var contentToAppend = html.find(#cont);
 $(.content).append(contentToAppend);

 cheers

 Michael Lawson
 Content Tools Developer, Global Solutions, ibm.com
 Phone:  1-828-355-5544
 E-mail:  mjlaw...@us.ibm.com

 'Examine my teachings critically, as a gold assayer would test gold. If you
 find they make sense, conform to your experience, and don't harm yourself
 or others, only then should you accept them.'

   From:       clicforw...@googlemail.com clicforw...@googlemail.com       
                                                    

   To:         jQuery (English) jquery-en@googlegroups.com                 
                                                    

   Date:       04/27/2009 11:03 AM                                             
                                                    

   Subject:    [jQuery] ajax append problem                                    
                                                     

 Hello,

 im using this script to load a external site into my DOM.
 It works fine but i need just a part of this test.html.

 For example: I want to append just the div #cont from test.html
 How can i do that?

 script type=text/javascript
 $.ajax({
   url: test.html,
   cache: false,
   success: function(html){
     $(.content).append(html);
   }});

 /script

 Thanks for Help!

  graycol.gif
  1KViewDownload

  ecblank.gif
  1KViewDownload


[jQuery] Re: question about approaching an interactive image gallery

2009-04-27 Thread roryreiff

I have approached a solution, or at least am very close. I have run
into a problem though...

In my initial binds to my forward and backward controls, I am binding
the functions backwardClick() and forwardClick(), as well as to each
an if statement that calls pause() if my variable 'gallery' is set to
'playing'. This works as it should the first time a control is
clicked, but after you set the gallery to be playing again, this
functionality does not work. The gallery starts out autoplaying, and I
want it to stop autoplaying each time either forward or backward is
clicked, as well as the pause button. Any ideas why this is so?
Thanks,

Code: http://www.pomona.edu/dev/spock/spock-feed-2.js
Code in action: http://www.pomona.edu/dev/spock/index-2.asp

On Apr 23, 11:16 pm, ml2009 mcamil2...@gmail.com wrote:
 HiRoryreiff-

 would these plugins help?

 http://malsup.com/jquery/cycle/

 http://code.google.com/p/agile-carousel/

 On Apr 15, 11:43 am,roryreiffroryre...@gmail.com wrote:

  Hi there,

  I want to start developing a simple interactive image gallery for a
  home page. My goal is for it to behave similar to SlideViewer 
  (http://www.gcmingati.net/wordpress/wp-content/lab/jquery/imagestrip/i..)
  in it's functionality, except that instead of clicking on a list of
  numbers, there will be navigation controls( arrow left, arrow right)
  to go forwards or backwards in the images. I also want to have
  accompanying text that appears in a div overlay.

  I am thinking that best way to do this is to have jQuery interacting
  with an XML file that contains the image urls and the accompanying
  text? I also want the behavior that on page load I prefetch all the
  images and text so that the navigation between images is seamless (at
  least prefetch a certain number ahead). Does anyone have input on how
  to approach this?

  Thanks,


[jQuery] Re: Removing item from array based on property

2009-04-27 Thread Mervyn

Both methods worked perfectly. Thank you.

On Apr 27, 12:21 pm, mkmanning michaell...@gmail.com wrote:
 Not sure why $.grep didn't work for you. Here's a functioning sample
 to compare:

 arr = $.grep(arr,function(n,i){
         return n.a1 != 1;

 })

 On Apr 27, 7:51 am, Mervyn mervyn.mar...@gmail.com wrote:



  Hello all,

  I have a question about removing an item from an array.

  I am looking to remove an item from the array based on the property.

  Ie.
  arr = [{a1: 1, a2: 2},{a1: 3, a2: 4}, {a1: 5, a2: 6}]

  remove first item from array because a1 = 1.

  I am not entirely sure how to do this. I tried messing around with
  grep a bit, but that didn't turn out well.

  Thanks- Hide quoted text -

 - Show quoted text -


[jQuery] Re: ajax append problem

2009-04-27 Thread Michael Lawson

my bad, try this

$(html).find('#cont');
cheers

Michael Lawson
Content Tools Developer, Global Solutions, ibm.com
Phone:  1-828-355-5544
E-mail:  mjlaw...@us.ibm.com

'Examine my teachings critically, as a gold assayer would test gold. If you
find they make sense, conform to your experience, and don't harm yourself
or others, only then should you accept them.'


   
  From:   clicforw...@googlemail.com clicforw...@googlemail.com
   
  To: jQuery (English) jquery-en@googlegroups.com  
   
  Date:   04/27/2009 01:17 PM  
   
  Subject:[jQuery] Re: ajax append problem 
   






Hello Michael,

thanks for this.
I got a error:  html.find is not a function
Any idea?

script type='text/javascript' src='http://ajax.googleapis.com/ajax/
libs/jquery/1.3.2/jquery.min.js'/script
script type=text/javascript
$(document).ready(function(){
 $.ajax({
 url: leistung.html,
 cache: false,
 success: function(html) {
 var loadCont = html.find('#cont');
 $(.content).append(loadCont);
 }
 });
});
/script


On Apr 27, 5:07 pm, Michael Lawson mjlaw...@us.ibm.com wrote:
 instead of  $(.content).append(html);
 do
 var contentToAppend = html.find(#cont);
 $(.content).append(contentToAppend);

 cheers

 Michael Lawson
 Content Tools Developer, Global Solutions, ibm.com
 Phone:  1-828-355-5544
 E-mail:  mjlaw...@us.ibm.com

 'Examine my teachings critically, as a gold assayer would test gold. If
you
 find they make sense, conform to your experience, and don't harm yourself
 or others, only then should you accept them.'

   From:       clicforw...@googlemail.com clicforw...@googlemail.com


   To:         jQuery (English) jquery-en@googlegroups.com


   Date:       04/27/2009 11:03 AM


   Subject:    [jQuery] ajax append problem


 Hello,

 im using this script to load a external site into my DOM.
 It works fine but i need just a part of this test.html.

 For example: I want to append just the div #cont from test.html
 How can i do that?

 script type=text/javascript
 $.ajax({
   url: test.html,
   cache: false,
   success: function(html){
     $(.content).append(html);
   }});

 /script

 Thanks for Help!

  graycol.gif
  1KViewDownload

  ecblank.gif
  1KViewDownload

inline: graycol.gifinline: ecblank.gif

[jQuery] Safari 3.2.1 and $.ajax POST doesn't work

2009-04-27 Thread alex.zeta


Hello to the ng;

i have a form that should be submitted via ajax; it works of ff and ie, but
doesn't in safari 3.2.1.
I've simplified every page to isolate the problem:

The html:
form name=form id=richiestapreventivo action= method=POST
enctype=multipart/form-data
fieldset
legendRichiesta preventivo/legend   
ol id=datiazienda
li
labelragione sociale/label
input name=ragionesociale 
id=ragionesociale size=20
class=required value=?php if (isset($_SESSION['ragionesociale'])) echo
$_SESSION['ragionesociale']; ?/
/li

/ol

button type=submit class=button id=inviainvia 
richiesta/button
/fieldset
/form

The js:
script type=text/javascript charset=utf-8
$(document).ready(function(){
$('form#richiestapreventivo').bind(submit, function() {
$.ajax({
type: POST,
url: bin/sendmail2.php
});  
});
});
/script

sendmail2.php:
?php
error_log(ok);
?

After some days of searching and debugging, I cannot get it out..
Could you help me?

Alex - italy



-- 
View this message in context: 
http://www.nabble.com/Safari-3.2.1-and-%24.ajax-POST-doesn%27t-work-tp23261397s27240p23261397.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: div contains li - select div but NOT li

2009-04-27 Thread Ricardo

That's because the click event from a LI bubbles up to the DIV. Two
simple ways to avoid it:

$('#plan').click(function(e){
   //abort if a LI was clicked
   if ( $(e.target).is('li') )
  return false;

   //then do stuff()
});

(alternatively use if ( e.target.id != 'plan' ))

or a less efficient but explanative way:

$('#plan').click(function(){
   //do stuff
});
$('#plan li').click(function(e){ //or #plan  *
 return false;
 //returning false calls e.stopPropagation() and e.preventDefault
()
  });

cheers,
- ricardo

On Apr 27, 10:26 am, Remon Oldenbeuving r.s.oldenbeuv...@gmail.com
wrote:
 It looks obvious, but aint working for me.

 On Mon, Apr 27, 2009 at 3:16 PM, Mauricio (Maujor) Samy Silva 

 css.mau...@gmail.com wrote:

  De: gostbuster jeremyescol...@gmail.com
  Assunto: [jQuery] Re: div contains li - select div but NOT li
  Hi,
  Yes of course I could do this, but Jquery selectors don't allow what I
  wish to do?
  Thanks.

  --
  How about:
  $('#plan').not('ul').click(function(){...}
  Maurício


[jQuery] setInterval + clearInterval + wait + restart setInterval

2009-04-27 Thread Nathan



I've been trying to think of a way to restart a setInterval after
clearInterval has ran and say 1 minute has passed.

Anyone have any ideas or examples on this?

Here is snippet of code:

if (o.auto) {
sliderIntervalID = setInterval(function(){
if(u===false) {$.animate('next',true);}
}, o.auto);
}

$('.next, .'+container+'').click(function(){
if(u===false) {
$.animate('next',true);
if(o.auto){clearInterval(sliderIntervalID);}
}
return false;
});


[jQuery] jqModal two overlays

2009-04-27 Thread Bradley

I just started using jqModal as I need support for nested modals.  I'm
noticing some erratic behavior with nested modals and ajax, but I
don't know exactly how to fix it.  What happens is when I load a
modal, that has a nested modal in it, I get two jqmOverlay divs, it's
like it's applying the overlay for both modals, even though the nested
one wouldn't have been triggered yet.  Here's the code:

// Main Modal
$(function(){
 $(#modal).jqm({ajax:'@href'});
})
a class=label jqModal href=/suppliers/2/editView Supplier/a

// Nested Modal code fragment within the /suppliers/2/edit html
$(function(){
 $(#nested_modal).jqm({ajax:'@href', zIndex:3001});
})
a class=button jqModal href=/suppliers/6/bills/newAdd Bill/a

It seems to work the first time, but if I close the modal, then open
again I get the double overlay problem.  Is this a bug? or the way I'm
calling my nested modal?


[jQuery] image preview

2009-04-27 Thread shareve...@gmail.com

Hi
   I like jquery image preview .It looks fine .I would like some other
functionality in image preview. Is that possible to preview the client
image i.e. before image being uploaded to the server I need to show
the image from the client machine


[jQuery] Re: Using jQuery in requested file by $.ajax

2009-04-27 Thread Kevin King

According to http://docs.jquery.com/Ajax/jQuery.ajax#options if
datatype is = 'html', the script code will be evaluated when the ajax
response is inserted into the DOM.  So change your code to do more
than an alert and you should be fine.

-K2


[jQuery] TextboxList for jQuery

2009-04-27 Thread Guillermo Rauch
I've released my TextboxList widget[image: picture-1.png]

for jQuery: http://devthought.com/projects/jquery/textboxlist/

Let me know what you think!

-- 
Guillermo Rauch
http://devthought.com


[jQuery] Re: ajax append problem

2009-04-27 Thread Charlie





$(".content").load("test.html#content"); 

this will grab only the id content from test.html and load it , can
refine this down to elements within #content as well

example on jQuery site shows same method


clicforw...@googlemail.com wrote:

  Hello Michael,

thanks for this.
I got a error:  html.find is not a function
Any idea?

script type='text/_javascript_' src=''/script
script type="text/_javascript_"
$(document).ready(function(){
	$.ajax({
  	url: "leistung.html",
  	cache: false,
  	success: function(html) {
	var loadCont = html.find('#cont');
			$(".content").append(loadCont);
  		}
	});
});
/script


On Apr 27, 5:07pm, Michael Lawson mjlaw...@us.ibm.com wrote:
  
  
instead of $(".content").append(html);
do
var contentToAppend = html.find("#cont");
$(".content").append(contentToAppend);

cheers

Michael Lawson
Content Tools Developer, Global Solutions, ibm.com
Phone: 1-828-355-5544
E-mail: mjlaw...@us.ibm.com

'Examine my teachings critically, as a gold assayer would test gold. If you
find they make sense, conform to your experience, and don't harm yourself
or others, only then should you accept them.'

 From:"clicforw...@googlemail.com" clicforw...@googlemail.com 

 To: "jQuery (English)" jquery-en@googlegroups.com  

 Date:04/27/2009 11:03 AM

 Subject:  [jQuery] ajax append problem

Hello,

im using this script to load a external site into my DOM.
It works fine but i need just a part of this test.html.

For example: I want to append just the div "#cont" from test.html
How can i do that?

script type="text/_javascript_"
$.ajax({
 url: "test.html",
 cache: false,
 success: function(html){
  $(".content").append(html);
 }});

/script

Thanks for Help!

graycol.gif
 1KViewDownload

ecblank.gif
 1KViewDownload

  
  
  






[jQuery] Re: TextboxList for jQuery

2009-04-27 Thread Jack Killpatrick
Looks very nice, Guillermo! I like the arrow, backspace and delete 
keyboard handling, too.


Are there any known issues?

Thanks,
Jack

Guillermo Rauch wrote:

I've released my TextboxList widget
picture-1.png

for jQuery: http://devthought.com/projects/jquery/textboxlist/

Let me know what you think!

--
Guillermo Rauch
http://devthought.com




[jQuery] jQuery next() to find selectoption

2009-04-27 Thread dimitre

Hello I am using jQuery next() and prev() to navigate inside
selectoption tags.
problem is I am using optgroup too and can't find a way to make it
work


ex:
select
optgroup label=Motion
option value=/m01/ 001/option
option value=/m02/ 002/option
option value=/m03/ selected003/option
optgroup label=illustration
option value=/illustration01/ 
illustration01/option
option value=/illustration02/ 
illustration02/option
/select

$(document).keydown (function(e) {
if (e.keyCode == 37)
if(n = $('select option:selected').prev().val())
location.href = n;
if (e.keyCode == 39)
if(n = $('select option:selected').next().val())
location.href = n;
});


[jQuery] Re: jQuery next() to find selectoption

2009-04-27 Thread Remon Oldenbeuving
hi,


   $(document).keydown (function(e) {
   if (e.keyCode == 37)
   if(n == $('select
option:selected').prev('option').val())
   location.href = n;
   if (e.keyCode == 39)
   if(n == $('select
option:selected').next('option').val())
   location.href = n;
   });

If i get you right, this should do the trick?


On Mon, Apr 27, 2009 at 10:30 PM, dimitre dimitr...@gmail.com wrote:


 Hello I am using jQuery next() and prev() to navigate inside
 selectoption tags.
 problem is I am using optgroup too and can't find a way to make it
 work


 ex:
 select
optgroup label=Motion
option value=/m01/ 001/option
option value=/m02/ 002/option
option value=/m03/ selected003/option
optgroup label=illustration
option value=/illustration01/
 illustration01/option
option value=/illustration02/
 illustration02/option
 /select

$(document).keydown (function(e) {
if (e.keyCode == 37)
if(n = $('select option:selected').prev().val())
location.href = n;
if (e.keyCode == 39)
if(n = $('select option:selected').next().val())
location.href = n;
});


[jQuery] Re: jQuery next() to find selectoption

2009-04-27 Thread dimitre

thanks for the quick answer, unfortunately no, I can't understand why
but it returns undefined

On Apr 27, 5:37 pm, Remon Oldenbeuving r.s.oldenbeuv...@gmail.com
wrote:
 hi,

        $(document).keydown (function(e) {
                if (e.keyCode == 37)
                        if(n == $('select
 option:selected').prev('option').val())
                                location.href = n;
                if (e.keyCode == 39)
                        if(n == $('select
 option:selected').next('option').val())
                                location.href = n;
        });

 If i get you right, this should do the trick?

 On Mon, Apr 27, 2009 at 10:30 PM, dimitre dimitr...@gmail.com wrote:

  Hello I am using jQuery next() and prev() to navigate inside
  selectoption tags.
  problem is I am using optgroup too and can't find a way to make it
  work

  ex:
  select
                         optgroup label=Motion
                         option value=/m01/ 001/option
                         option value=/m02/ 002/option
                         option value=/m03/ selected003/option
                         optgroup label=illustration
                         option value=/illustration01/
  illustration01/option
                         option value=/illustration02/
  illustration02/option
  /select

         $(document).keydown (function(e) {
                 if (e.keyCode == 37)
                         if(n = $('select option:selected').prev().val())
                                 location.href = n;
                 if (e.keyCode == 39)
                         if(n = $('select option:selected').next().val())
                                 location.href = n;
         });


[jQuery] Re: jQuery next() to find selectoption

2009-04-27 Thread Remon Oldenbeuving


Try changing .val() into .text() or .html()



On 27 apr 2009, at 22:51, dimitre dimitr...@gmail.com wrote:



thanks for the quick answer, unfortunately no, I can't understand why
but it returns undefined

On Apr 27, 5:37 pm, Remon Oldenbeuving r.s.oldenbeuv...@gmail.com
wrote:

hi,

   $(document).keydown (function(e) {
   if (e.keyCode == 37)
   if(n == $('select
option:selected').prev('option').val())
   location.href = n;
   if (e.keyCode == 39)
   if(n == $('select
option:selected').next('option').val())
   location.href = n;
   });

If i get you right, this should do the trick?

On Mon, Apr 27, 2009 at 10:30 PM, dimitre dimitr...@gmail.com  
wrote:



Hello I am using jQuery next() and prev() to navigate inside
selectoption tags.
problem is I am using optgroup too and can't find a way to make it
work



ex:
select
   optgroup label=Motion
   option value=/m01/ 001/option
   option value=/m02/ 002/option
   option value=/m03/ selected003/option
   optgroup label=illustration
   option value=/illustration01/

illustration01/option

   option value=/illustration02/

illustration02/option

/select



   $(document).keydown (function(e) {
   if (e.keyCode == 37)
   if(n = $('select  
option:selected').prev().val())

   location.href = n;
   if (e.keyCode == 39)
   if(n = $('select  
option:selected').next().val())

   location.href = n;
   });


[jQuery] ClueTip doesn't show pages from the www.

2009-04-27 Thread Nir

Hi Karl,

Great plugin.
However, I am more interested in displaying a tip brought from the
web. For instance:

script type=text/javascript src=jquery-1.3.2.min.js/script
script src=cluetip/jquery.hoverIntent.js type=text/javascript/
script !-- optional --
script src=cluetip/jquery.cluetip.js type=text/javascript/
script

script type=text/javascript
$(document).ready(function() {
  $('#sticky').cluetip({sticky: true, closePosition: 'title', arrows:
true});
});
/script

  a id=sticky href=http://my.gemeentemuseum.nl/node/27;
rel=http://my.gemeentemuseum.nl/node/27;View the node/a
link rel=stylesheet href=cluetip/jquery.cluetip.css type=text/
css /


Unfortunately this doesn't work. It displays a question mark or (at
work) it just got stuck and I had to stop the script.
If I try a local page (e.g. rel=fragment.html) it works perfectly.

Any idea?

thanks,
Nir.


[jQuery] fadein thumbnails when loaded

2009-04-27 Thread David

Hi, im a totally beginner so this may be obvious but im stuck!!!

I have image galleries on my site and i want the images to fade in
after loading, at the moment i have the following script:

Code:

$(function() {

  $(div#media-gallery ul li img).css(display,none);
  $(div#media-gallery ul li img).fadeIn(2000);

});


Which almost does what i want but

A) the images very quickly load then disapper. I dont want to hide the
images in css incase people have js diasbled.
B) all the images load together which is making me think that i have
something wrong somewhere.

the markup for the div in question is:

Code:

div id=media-gallery
h2Media Gallery/h2
ul
li
a href=HYPERLINKimg src=IMG SOURCE //a
/li
li
a href=HYPERLINKimg src=IMG SOURCE //a
/li
/ul
/div


With HYPERLINK and IMG SOURCE being actual urls.

Hope someone can help me with this, i have looked around but cant find
an answer anywhere.

David


[jQuery] How to get css object of one element?

2009-04-27 Thread Ngoc Bui
Hi all,



I wonder how to get css object of ONE single element? Normally, with array
of element we can do like this: $(“a”).css(“color”).  However, when I go
through each element, this is not available: e.g. $(“a”)[0].css( “color”);



Anyone knows how to get css properties of one single element please help me?



Thanks in advance.

~Ngoc


[jQuery] Re: ClueTip doesn't show pages from the www.

2009-04-27 Thread Karl Swedberg

Hi Nir,

Unfortunately, it's not possible to grab html content from another  
domain with javascript -- at least not in any straightforward manner.  
The clueTip plugin uses jQuery's $.ajax() method to retrieve contents.


Depending on what's available on the other site and your hosting  
environment, you might be able to use jsonp ( http://en.wikipedia.org/wiki/JSONP#JSONP 
 ) or a cross-domain proxy ( http://ajaxpatterns.org/archive/Cross-Domain_Proxy.php 
 )


--Karl


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




On Apr 27, 2009, at 6:32 PM, Nir wrote:



Hi Karl,

Great plugin.
However, I am more interested in displaying a tip brought from the
web. For instance:

script type=text/javascript src=jquery-1.3.2.min.js/script
script src=cluetip/jquery.hoverIntent.js type=text/javascript/
script !-- optional --
script src=cluetip/jquery.cluetip.js type=text/javascript/
script

script type=text/javascript
$(document).ready(function() {
 $('#sticky').cluetip({sticky: true, closePosition: 'title', arrows:
true});
});
/script

 a id=sticky href=http://my.gemeentemuseum.nl/node/27;
rel=http://my.gemeentemuseum.nl/node/27;View the node/a
link rel=stylesheet href=cluetip/jquery.cluetip.css type=text/
css /


Unfortunately this doesn't work. It displays a question mark or (at
work) it just got stuck and I had to stop the script.
If I try a local page (e.g. rel=fragment.html) it works perfectly.

Any idea?

thanks,
Nir.




[jQuery] Re: How to get css object of one element?

2009-04-27 Thread Eric Garside

Using the jQuery object as an array ($('.selector')[0]) returns the
HTMLElement.

Using jQuery's eq function returns the jQuery object of the
HTMLElement at that position:

$('a').eq(0).css('color');

On Apr 27, 3:38 pm, Ngoc Bui buitrungngo...@gmail.com wrote:
 Hi all,

 I wonder how to get css object of ONE single element? Normally, with array
 of element we can do like this: $(“a”).css(“color”).  However, when I go
 through each element, this is not available: e.g. $(“a”)[0].css( “color”);

 Anyone knows how to get css properties of one single element please help me?

 Thanks in advance.

 ~Ngoc


[jQuery] Re: How to get css object of one element?

2009-04-27 Thread Karl Swedberg
It depends on which one you want, but there are a number of selectors  
available. For example:


$('a:first').css('color');
$('a:last').css('color');
$('a:eq(2)').css('color');

More info here: http://docs.jquery.com/Selectors

--Karl


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




On Apr 27, 2009, at 3:38 PM, Ngoc Bui wrote:


Hi all,

I wonder how to get css object of ONE single element? Normally, with  
array of element we can do like this: $(“a”).css(“color”).  However,  
when I go through each element, this is not available: e.g. $(“a”) 
[0].css( “color”);


Anyone knows how to get css properties of one single element please  
help me?


Thanks in advance.
~Ngoc




[jQuery] Re: fadein thumbnails when loaded

2009-04-27 Thread Eric Garside

 A) the images very quickly load then disapper. I dont want to hide the images 
 in css incase people have js diasbled.
You're out of luck, then. DOMReady will trigger after the images and
html has loaded, so unless you hide them with CSS, there's no way to
prevent the flash, afaik.

 B) all the images load together which is making me think that i have
 something wrong somewhere.
What do you mean, load together? Chances are, the images finish
loading during the 2 second fade in, giving the appearance they are?
Also, if you have the images cached by having visited the page before,
they should all come up within seconds of each other.

On Apr 27, 4:18 pm, David davidgsw...@gmail.com wrote:
 Hi, im a totally beginner so this may be obvious but im stuck!!!

 I have image galleries on my site and i want the images to fade in
 after loading, at the moment i have the following script:

 Code:

 $(function() {

       $(div#media-gallery ul li img).css(display,none);
       $(div#media-gallery ul li img).fadeIn(2000);

 });

 Which almost does what i want but

 A) the images very quickly load then disapper. I dont want to hide the
 images in css incase people have js diasbled.
 B) all the images load together which is making me think that i have
 something wrong somewhere.

 the markup for the div in question is:

 Code:

 div id=media-gallery
 h2Media Gallery/h2
 ul
 li
 a href=HYPERLINKimg src=IMG SOURCE //a
 /li
 li
 a href=HYPERLINKimg src=IMG SOURCE //a
 /li
 /ul
 /div

 With HYPERLINK and IMG SOURCE being actual urls.

 Hope someone can help me with this, i have looked around but cant find
 an answer anywhere.

 David


[jQuery] Re: how to convert a string to json structure

2009-04-27 Thread Kean

http://www.json.org/
You can find information about the structure, JSON parsers in several
languages etc.


On Apr 27, 1:13 am, gaohk cnga...@gmail.com wrote:
 I have a string that is like [{carePacks:
 [{businessCode:J1PS,description:HP 1}],coveragePeriod:12},
 {carePacks:[{businessCode:J1PS,description:HP
 s}],coveragePeriod:13}].
 can you give me some advice on how to convert it to a json structure,
 and how to get data from the data structure, like get HP 1.


[jQuery] Re: Where to find a jQuery Developer?

2009-04-27 Thread Kean

http://jobs.jsninja.com/

On Apr 27, 9:58 am, nmiddlew...@gmail.com
nmiddlew...@googlemail.com wrote:
 I would rather because I'd also like to learn on the way...

 Are you thinking yourself? Where are you based?

 Thanks,
 Nick

 On Apr 27, 5:35 pm, Joseph Le Brech jlebr...@hotmail.com wrote:

  Does it need to be in london?

   Date: Mon, 27 Apr 2009 09:27:17 -0700
   Subject: [jQuery] Where to find a jQuery Developer?
   From: nmiddlew...@googlemail.com
   To: jquery-en@googlegroups.com

   Hello,

   Does anyone know where I can post a wanted Ad for a London based
   jQuery developer to help me create a jQuery UI component?

   I have a client where I'm creating UI's for but I want future ones
   created in jQuery and I need some help because I can't do it... :)

   Thanks,
   Nick

  _
  Share your photos with Windows Live Photos – 
  Free.http://clk.atdmt.com/UKM/go/134665338/direct/01/


[jQuery] Re: fadein thumbnails when loaded

2009-04-27 Thread David

Eric, thanks for the input.

I think (not sure) the way i have the code done it waits for all
images to load before fading them in, as opposed to fading the
individual image in when loaded.

I found this: http://clagnut.com/sandbox/imagefades/

Which seems to do eveyrhing i want including the images loading
quickly, but not sure how to implement it.

On Apr 28, 1:05 am, Eric Garside gars...@gmail.com wrote:
  A) the images very quickly load then disapper. I dont want to hide the 
  images in css incase people have js diasbled.

 You're out of luck, then. DOMReady will trigger after the images and
 html has loaded, so unless you hide them with CSS, there's no way to
 prevent the flash, afaik.

  B) all the images load together which is making me think that i have
  something wrong somewhere.

 What do you mean, load together? Chances are, the images finish
 loading during the 2 second fade in, giving the appearance they are?
 Also, if you have the images cached by having visited the page before,
 they should all come up within seconds of each other.

 On Apr 27, 4:18 pm, David davidgsw...@gmail.com wrote:

  Hi, im a totally beginner so this may be obvious but im stuck!!!

  I have image galleries on my site and i want the images to fade in
  after loading, at the moment i have the following script:

  Code:

  $(function() {

        $(div#media-gallery ul li img).css(display,none);
        $(div#media-gallery ul li img).fadeIn(2000);

  });

  Which almost does what i want but

  A) the images very quickly load then disapper. I dont want to hide the
  images in css incase people have js diasbled.
  B) all the images load together which is making me think that i have
  something wrong somewhere.

  the markup for the div in question is:

  Code:

  div id=media-gallery
  h2Media Gallery/h2
  ul
  li
  a href=HYPERLINKimg src=IMG SOURCE //a
  /li
  li
  a href=HYPERLINKimg src=IMG SOURCE //a
  /li
  /ul
  /div

  With HYPERLINK and IMG SOURCE being actual urls.

  Hope someone can help me with this, i have looked around but cant find
  an answer anywhere.

  David


[jQuery] Re: fadein thumbnails when loaded

2009-04-27 Thread David

Ok... i sorted the initial problems out, i load the css that hides the
elements using javscript:

script type=text/javascript
document.write('link rel=stylesheet media=all type=text/css
href=/css/no-js.css /');
/script


But i still think it is not dealing with the images on a per load
basis but on whole, any ideas?

On Apr 28, 1:31 am, David davidgsw...@gmail.com wrote:
 Eric, thanks for the input.

 I think (not sure) the way i have the code done it waits for all
 images to load before fading them in, as opposed to fading the
 individual image in when loaded.

 I found this:http://clagnut.com/sandbox/imagefades/

 Which seems to do eveyrhing i want including the images loading
 quickly, but not sure how to implement it.

 On Apr 28, 1:05 am, Eric Garside gars...@gmail.com wrote:

   A) the images very quickly load then disapper. I dont want to hide the 
   images in css incase people have js diasbled.

  You're out of luck, then. DOMReady will trigger after the images and
  html has loaded, so unless you hide them with CSS, there's no way to
  prevent the flash, afaik.

   B) all the images load together which is making me think that i have
   something wrong somewhere.

  What do you mean, load together? Chances are, the images finish
  loading during the 2 second fade in, giving the appearance they are?
  Also, if you have the images cached by having visited the page before,
  they should all come up within seconds of each other.

  On Apr 27, 4:18 pm, David davidgsw...@gmail.com wrote:

   Hi, im a totally beginner so this may be obvious but im stuck!!!

   I have image galleries on my site and i want the images to fade in
   after loading, at the moment i have the following script:

   Code:

   $(function() {

         $(div#media-gallery ul li img).css(display,none);
         $(div#media-gallery ul li img).fadeIn(2000);

   });

   Which almost does what i want but

   A) the images very quickly load then disapper. I dont want to hide the
   images in css incase people have js diasbled.
   B) all the images load together which is making me think that i have
   something wrong somewhere.

   the markup for the div in question is:

   Code:

   div id=media-gallery
   h2Media Gallery/h2
   ul
   li
   a href=HYPERLINKimg src=IMG SOURCE //a
   /li
   li
   a href=HYPERLINKimg src=IMG SOURCE //a
   /li
   /ul
   /div

   With HYPERLINK and IMG SOURCE being actual urls.

   Hope someone can help me with this, i have looked around but cant find
   an answer anywhere.

   David


[jQuery] Ajax dot net - Sending objects to the server problem

2009-04-27 Thread Jon

Hi, i'm trying to use the ajax dot net plugin to perform ajax calls to
an AJAX enabled WCF service.

No matter what i do i get an error:
'Object reference not set to an instance of an object.'

However from firebug i can see the JSON object that is getting posted:
{contactmessage:
{__type:ContactMessage,name:Jon,email:j...@jon.co.uk,message:gfd
}}

So it looks like something is being sent correctly but not handled on
the other end. In the examples that come with this plugin there is no
extra handling needed. He just packages the object up in the
javascript and calls it as the correct type at the other end. I don't
know how! After a couple of hours research i came across the
OnDeserializing method and tried to implement that but to no avail.
Same error. I really can't see where i'm going wrong or how to debug
this! Can anyone point me in the right direction?

Here's my javascript:
$(.ContactForm).prepend(div class=\ContactMessage\/div);
var formmessage = $(.ContactForm .ContactMessage).css(display,
none);

$(.ContactForm .Submit).click(function(evt) {
evt.preventDefault();

var contactmessage = new Object();
contactmessage.__type = ContactMessage;
contactmessage.name = $
(#ctl00_ctl00_CPH_Content_CPH_Content_TB_Name).val();
contactmessage.email = $
(#ctl00_ctl00_CPH_Content_CPH_Content_TB_Email).val();
contactmessage.message = $
(#ctl00_ctl00_CPH_Content_CPH_Content_TB_Message).val();

var data = new Object();
data.contactmessage = contactmessage;

$.ajaxDotNet(url + SendMessage, {
verb: POST,
data: data,
beforeSend: function(r) {
formmessage.html(pSending.../p);

return r;
},
success: function(obj) {
obj = obj.d;
formmessage.html(pThank you, your message has 
been
sent!/pp + obj + /p);
},
error: function(x, y, z) {
formmessage.html(pThere was an error sending your
message, please try again./pp + x.responseText + /p);
});
}
});
});

And server code:
[OperationContract]
public string SendMessage(ContactMessage message)
{
try
{
return message.SendMessage();
}
catch (Exception ex)
{
return There was an error sending the message!br /
+ ex.Source +  |  + ex.Message;
}
}


[DataContract]
public class ContactMessage
{
public ContactMessage message;
public string _Name;
public string _Email;
public string _Message;

public ContactMessage()
{
_Name = string.Empty;
_Email = string.Empty;
_Message = string.Empty;
}

public string SendMessage()
{
try
{
return Hello,  + _Name +  :  + _Email +  who said: 
+ _Message;
}
catch (Exception ex)
{
return ex.Message;
}
}

[OnDeserializing]
public void OnDeserializing(StreamingContext sc)
{
message = new ContactMessage();
}

[DataMember(Name = name)]
public string Name
{
get { return message._Name; }
set { message._Name = value; }
}

[DataMember(Name = email)]
public string Email
{
get { return message._Email; }
set { message._Email = value; }
}

[DataMember(Name = message)]
public string Message
{
get { return message._Message; }
set { message._Message = value; }
}
}


[jQuery] Re: ajax append problem

2009-04-27 Thread Ricardo

I think you have to separate the selector otherwise it's just a hash:

$(.content).load(test.html #content);

http://docs.jquery.com/Ajax/load

On Apr 27, 5:14 pm, Charlie charlie...@gmail.com wrote:
 $(.content).load(test.html#content);
 this will grab only the id content from test.html and load it , can refine 
 this down to elements within #content as well
 example on jQuery site shows same methodclicforw...@googlemail.comwrote:Hello 
 Michael, thanks for this. I got a error:  html.find is not a function Any 
 idea? script type='text/javascript' 
 src='http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js'/script
  script type=text/javascript $(document).ready(function(){ $.ajax({ url: 
 leistung.html, cache: false, success: function(html) { var loadCont = 
 html.find('#cont'); $(.content).append(loadCont); } }); }); /script On 
 Apr 27, 5:07 pm, Michael Lawsonmjlaw...@us.ibm.comwrote:instead of  
 $(.content).append(html); do var contentToAppend = html.find(#cont); 
 $(.content).append(contentToAppend); cheers Michael Lawson Content Tools 
 Developer, Global Solutions, ibm.com Phone:  1-828-355-5544 E-mail:  
 mjlaw...@us.ibm.com'Examine my teachings critically, as a gold assayer would 
 test gold. If you find they make sense, conform to your experience, and don't 
 harm yourself or others, only then should you accept them.'   From:      
 clicforw...@googlemail.comclicforw...@googlemail.com                      
                                       To:         jQuery 
 (English)jquery-en@googlegroups.com                                        
                               Date:       04/27/2009 11:03 AM                 
                                                                               
     Subject:    [jQuery] ajax append problem                                  
                                                        Hello, im using this 
 script to load a external site into my DOM. It works fine but i need just a 
 part of this test.html. For example: I want to append just the div #cont 
 from test.html How can i do that? script type=text/javascript $.ajax({   
 url: test.html,   cache: false,   success: function(html){     
 $(.content).append(html);   }}); /script Thanks for Help!  graycol.gif  
 1KViewDownload  ecblank.gif  1KViewDownload


[jQuery] Re: Where to find a jQuery Developer?

2009-04-27 Thread redsquare
I'm uk based - manchester. Regular in jquery irc.

On Mon, Apr 27, 2009 at 5:27 PM, nmiddleweek nmiddlew...@googlemail.comwrote:


 Hello,

 Does anyone know where I can post a wanted Ad for a London based
 jQuery developer to help me create a jQuery UI component?

 I have a client where I'm creating UI's for but I want future ones
 created in jQuery and I need some help because I can't do it... :)


 Thanks,
 Nick



[jQuery] Re: http://wiki.jqueryui.com/ style navigator

2009-04-27 Thread Veeru

Thanks Richard
I already am using the filament groups menu - but i still like the
wiki style navigator fro its look and feel, cant' wait for the UI
plugin :)

Thanks once again
Vru


[jQuery] [treeView] Problem with Firefox 3

2009-04-27 Thread vg33

I use the jQuery plugin treeView with jQuery 1.3.2
I have a long list (over 500 items), each item with 3 links .
Exemple :
ul
lifirst item a href=action1img src=icon1 //a a
href=action2img src=icon2 //a a href=action3img
src=icon3 //a /li
lisecond item a href=action1img src=icon1 //a a
href=action2img src=icon2 //a a href=action3img
src=icon3 //a /li
/ul

With IE8, Opera, Safari and Google Chrome : no problem. Display the
tree takes 3 or 4 seconds.
But, with Firefox 3.10, it takes over 30 seconds.
And when I delete the links in the list, no problem with Firefox.
Any idea ?
(sorry for my very very bad english ;o)


[jQuery] Fading text in/out (like a text slideshow)

2009-04-27 Thread Mitch Cohen

I have a small portion of a page which will contain a set of animated
text snippets.  Item one will appear immediately, then fade out; item
two will fade in, pause, then fade out, etc.  At the end of the
sequence item one will appear again repeating forever.  It's basically
a slideshow of styled HTML text.

I'm hoping to keep this simple, without the need for a big slideshow
plugin.

I wrote this:

$('#animatedQuotes').html(number one).fadeIn(2000).fadeTo(5000,
1).fadeOut(1000).html(number two).fadeIn(2000);

When this line is hit, the DIV changes to number two immediately.
Number two fades out and back in again as you'd otherwise expect.

How can I sequence this properly?  I tried a a recursive callback from
the fadeOut, but apparently that's not something we can do (Javascript
threw an error).

Thanks!


[jQuery] Events without $(document).ready()?

2009-04-27 Thread Grahzny

Hello, folks -- I'm very new at this, so please pardon my ignorant
question.

I have a text field and a select input. My code sets the text field
when the select changes.

What I'd like to do is have it NOT do this when the page is first
loaded, but only when the user touches one of the select inputs. (This
is because I want to preserve whatever the user may have typed before
they reloaded the page with a submit, which can also change the
choices of the select input.)

Here's my code so far:

$(document).ready(function() {
   $(select).change(function() {
switch ($(this)[0].id)
{
case 'depotspec_list':
document.getElementById('depotspec').value = 
$(this)[0].value;
break;
case 'labelone_list':
document.getElementById('labelone').value = 
$(this)[0].value;
break;
case 'labeltwo_list':
document.getElementById('labeltwo').value = 
$(this)[0].value;
break;
default:
alert ($(this)[0].id);
}
}).change();
});

My first thought was to just remove the $(document).ready(function()
{}); wrapping. But that doesn't work.

I'm sure I'm just missing some fundamental bit here. Thanks in advance.


[jQuery] jQuery form plugin file upload failure

2009-04-27 Thread Jim

I'm using the latest version of the form plugin from 
http://jquery.malsup.com/form/
and am having problems with a form that has an input of type file.

I have read all the info about how to return JSON and such, how an
iframe is used, etc.  I've Googled around and searched this list, but
m not seeing anything relating to my problem.

I have a series of forms which pop up in a modal dialog and are
submitted view the ajaxSubmit method.  Only one of these forms has a
file field in it, and it does not work at all.  Upon hitting submit, I
see no network activity in the Firebug console, though I didn't really
expect any given that this uses the iframe.   However, the Net panel
of Firebug shows no activity either.  Further, the PHP file at which
this form is pointed has a LOT of debug statements in it, and none of
them show up in the logs when I it submit.

I added some debugging to the ajax-on-error method I'd set for this
call by adding a console.log() of the error text and the error object
which are passed to the error function and they say

error

and

SyntaxError  ()@:0\neval(\()\)@:0\n([object Object],\json\)
@https://jauldridge.yakabod.net/js/vne/jquery/core/jquery.js:29\ncb(-5)
@https://jauldridge.yakabod.net/js/vne/jquery/plugins/form/
jquery.form.js:305\n

respectively.adding a consol.log() of the XHR object which is
passed to the error function shows the mock object and it is still
empty.

Line 305 of the form plugin seems to be what is referenced in the odd
output of the error object, along with line 29 of jQuery.  Line 305 of
the form plugin is a call to jQuery's httpData method which is defined
on line 29 of jQuery.  Line 305 of the form plugin is supposed to be
taking what was retrieved from the textarea (I'm using JSON) of the
iframe and passing it to jQuery with my specified data type for
parsing.  Since this is all happening without any network activity,
and the mock object shows it is empty including its responseText, I
imagine that is why jQuery's httpData method is getting an error in
trying to parse JSON.

I just cannot figure this out, and I'd really like some help.  Why is
the plugin acting like it is done submitting when it hasn't even tried
to talk to the server?  This system is on a private network so I
cannot link to it, but I will provide as much info as is asked for and
I can obtain.

Thanks,
Jim


[jQuery] Re: fadein thumbnails when loaded

2009-04-27 Thread Karl Swedberg


On Apr 27, 2009, at 8:05 PM, Eric Garside wrote:



A) the images very quickly load then disapper. I dont want to hide  
the images in css incase people have js diasbled.

You're out of luck, then. DOMReady will trigger after the images and
html has loaded, so unless you hide them with CSS, there's no way to
prevent the flash, afaik.


In the head you can do this:

script type=text/javascript document.documentElement.className =  
'js';/script


Then you can set styles for elements as descendants of .js.

--Karl

[jQuery] Re: Get element position relative to the body

2009-04-27 Thread cohq82

I found out this http://docs.jquery.com/CSS/position
But it is not relative but rather absolute position.

Any help on relative position?

On Mar 26, 8:44 am, Shedokan shedo...@yahoo.com wrote:
 Is it possible to get the position of an object relative to the
 dcument if it's a floating object inside elements?

 thanks.