[jQuery] Re: jeditable - Tabbing between jeditable elements

2008-11-21 Thread Mika Tuupola



On Nov 21, 2008, at 7:10 AM, [EMAIL PROTECTED] wrote:


At present, a tab keyPress results in discarding the edits. I have not
been able to get the callback to fire to submit the edit then change
focus to the target element if I tab out of the element. I would like
the tab key to result in the submit event which would trigger the
callback function. Is there anything I could do short of modifying the
plugin?



  * @param String  options[onblur]'cancel', 'submit', 'ignore' or  
function ??


cancel means discard edits when input goes out of focus.
ignore means nothing happens.
submit means the same as clicking submit.

or you can write whatever function() { /* something *} if you have  
some unorthodox need :)


Maybe onblur = submit is what you are after?

--
Mika Tuupola
http://www.appelsiini.net/



[jQuery] Re: $('#id').width()

2008-11-21 Thread Lee McMullen
Thanks, I'll try your suggestions and let you know.

Just out of curiosity, why would binding the field setup to the window  
load have an effect? I thought that was the whole point of using $ 
(function(){}), so you didn't have to wait for the window to load?

On 21 Nov 2008, at 04:01, Isaiah Fischer [EMAIL PROTECTED]  
wrote:

 Then I have two possible solutions to what I think the problem may  
 be...

 One, have the field_setup() function bound to the window load as such:

 $(window).bind(load,function(){field_setup()});

 or define the width in the css of that field by its ID

 If that doesn't work then I'll need to find a different problem to  
 solve :P

 On Thu, Nov 20, 2008 at 4:23 PM, Lee Mc [EMAIL PROTECTED]  
 wrote:

 The width is defined by a class the field has rather than it's ID.




 On Nov 20, 8:06 pm, CodingCyb.org [EMAIL PROTECTED] wrote:
  And in the css the width is defined for #test_field or w/e its
  named? Or is it defined by a class that it has?
 
  On Nov 20, 9:37 am, Lee Mc [EMAIL PROTECTED] wrote:
 
   The width of the field gets set by a stylesheet which is pulled
   through.
 
   On Nov 20, 3:22 pm, CodingCyb.org [EMAIL PROTECTED]  
 wrote:
 
Is the original width of the text field set in css? Or is it  
 just the
width it gets when page loads?
 
On Nov 20, 9:09 am, Lee Mc [EMAIL PROTECTED] wrote:
 
 Yes that's exactly right.
 
 Any ideas would be greatly appreciated!
 
 On Nov 20, 1:18 pm, CodingCyb.org [EMAIL PROTECTED]  
 wrote:
 
  I'm still trying to picture the site in my mind. So it has  
 three tabs
  that you can switch between, but the default can be  
 different? And
  when the default isn't the first one, the image appears in  
 tab one,
  but stays underneath the input box because the width isn't  
 updated?
 
  On Nov 20, 12:11 am, Lee Mc [EMAIL PROTECTED] wrote:
 
   The example HTML only has a single text input, it's this  
 input I'm
   having issues with. Apologies, the example HTML gave the  
 field a
   different ID than the JS contained. Im copying the code  
 from an in
   process project so it's stripped down for readability.
 
   Therefore the different ID in my HTML is just a typo.
 
   Cheers, Lee.
 
   On Nov 20, 4:14 am, CodingCyb.org  
 [EMAIL PROTECTED] wrote:
 
Sorry it took so long for a reply...
 
Where in the html is #test_field ? That's what the  
 field_img goes
after, but I'm not sure where that is...
 
On Nov 19, 9:39 am, Lee Mc [EMAIL PROTECTED]  
 wrote:
 
 Hi, yes I think you've misunderstood my problem.
 
 In a nutshell, there is an input type=text on  
 tab 1. On load of
 the form, I'm trying to make this input less wide  
 and place an image
 next to it.  When tab 1 is the default tab, it works  
 fine.  When any
 other tab is the default, it inserts the image but  
 doesn't update the
 width of the field.
 
 This is an example of my markup:
 
 div class=tab_container
 
 !--insert tabs--
 ul class=tabs
 lia href=my_form#tab_1 class=tab  
 title=content_1Tab 1/a/
 li
 lia href=my_form#tab_2 class=tab  
 title=content_2Tab 2/a/
 li
 lia href=my_form#tab_3 class=tab  
 title=content_3Tab 3/a/
 li
 /ul
 
 !--insert tab 1--
 div id=content_1 class=tab_content
 a name=tab_1/a
 label for=field_idMy Test Field:/labelinput  
 type=text
 id=field_id value=
 /div!--close content_1--
 
 !--insert tab 2--
 div id=content_2 class=tab_content
 a name=tab_2/a
 !--tab 2 content--
 /div!--close content 2--
 
 !--insert tab 3--
 div id=content_3 class=tab_content
 a name=tab_3/a
 !--tab 3 content--
 /div!--close content 3--
 
 /div!--close tab container--
 
 Any thoughts would be much appreciated.
 
 Cheers,
 Lee
 
 On Nov 18, 3:47 pm, CodingCyborg  
 [EMAIL PROTECTED] wrote:
 
  That all seems like it would work fine. I went  
 back and re-read your
  original post. I found that I may have  
 misunderstood the problem.
 
  In your original post is #field_id within the  
 content of the first
  tab, or is it the content warpper of the first tab?
 
  If it is the wrapper, then you are putting the  
 image outside of what
  is hidden, if not then changing that field width  
 shouldn't affect any
  other tabs.
 
  From what I now understand you don't want the  
 image there unless you
  are on the first tab? So placing it within the  
 content of that tab may
  be the solution?
 
  On Nov 18, 9:30 am, Lee Mc  
 [EMAIL PROTECTED] wrote:
 
   Here is the code which sets the tabs up:
 
   /*
* JS to handle the building of tabs within forms
  

[jQuery] Re: treeview pluging issues - .find(.hitarea)

2008-11-21 Thread alex tait
Thanks for your help guys.

Direct decen

I will take a look at the plugin you have been developing.



On Thu, Nov 20, 2008 at 4:50 PM, Andy Matthews [EMAIL PROTECTED]wrote:


 Without seeing the rest of the code, the  .hitarea is a CSS selector for
 direct descendants. There's generally something on the left of the angle
 bracket such as :

 body  .hitarea

 Which would apply ONLY to those objects with a class of hitarea directly
 inside the body tag.

 -Original Message-
 From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of alextait
 Sent: Thursday, November 20, 2008 9:00 AM
 To: jQuery (English)
 Subject: [jQuery] treeview pluging issues - .find(.hitarea)


 I am fairly new to jquery and I am trying to create a product/category
 browser/tree using the treeview plugin and ajax.

 My first simple issue is this peice of code i am trying to understand.

 .find(.hitarea)

 what is happening here ? I understand the find functino but not sure
 about the chevron usage ?

 the overall problem is this.

 On viewing my list. if i click on one of the initial categories the
 second sub categories show up fine. I can then contract this sub list
 if i wish. If i leave this open and click on one of the sub categories
 for some reason i cannot then contract it again.

 I have looked into the treeview plugin code and found that the
 toggler method which would normaly just contract the list branch
 fires twice causing it to hide again.

 If anyone has any idea on thie general problem that would be great.

 thanks for any help in advance





-- 
Alex Tait


[jQuery] dynamic tree / treeview

2008-11-21 Thread Bhavin

Hi

I am using jquery to create tree structure type of functionality
dynamically. I have to add nodes by opening dialog and save it into
the database. Once response is returned then I need to show it on the
page. I have few doubts here:

1) Once node is inserted into the database and response is rendered on
the page then how can I fetch id/value of the node. Here, DOM
shouldn't be updated automatically? I am not able to fetch parent node
id while adding child into it.

2) Once data is rendered on the page and if I refresh it then how
should I show the tree which was already created dynamically? Do I
need to bring all the data from the database by passing parentid?

Please guide.

Thanks,
Bhavin


[jQuery] Re: exclude children from selected elements

2008-11-21 Thread [EMAIL PROTECTED]

It still doesn't work. I think part of the problem is because the
children of main are added after I create the event listener.

Second solution is to check in the event listener if the target is a
child of main and if so, return.  I know how to get the children of
main , but how to I check the current tartget is one of them ?

ricardobeat I need to select all objects of the page because I want
to do a DOM inspector. But yes you are right, maybe I should only
start from body !

Thanks

On 20 nov, 18:25, ricardobeat [EMAIL PROTECTED] wrote:
 Are you sure you want to apply it to *all* elements on the page? That
 sounds a bit awkward.

 var main =  $('#main, #main *');
 $('body *').not(main).mouseover(function(){...});

 On Nov 20, 2:07 pm, [EMAIL PROTECTED]

 [EMAIL PROTECTED] wrote:
  Hi,

  I want to apply a mouseover event on all elements but one and its
  children. I can't use class name to filter. How can I do it ?  I've
  tried unsuccessfully :

  $(*:not(#main)).not($(#main).children()).mouseover(function() {

  });

  thanks


[jQuery] Re: treeview pluging issues - .find(.hitarea)

2008-11-21 Thread alextait

I have taken a look at your plugin... that fantastic!

Unfortunately it does not seem to do what i need.

Since our category/product data is so huge... I am trying to create a
tree that will populate the child nodes only when the parent node is
clicked.

Once loaded into the dom the user can collapse or expand nodes using
jquery.

Will continue trying to get the treeview code to work for now.

thanks very much for your help!

:)

On 20 Nov, 16:32, Dirceu Barquette [EMAIL PROTECTED]
wrote:
 Hi,
 seehttp://sourceforge.net/projects/jqtreevial/

 I've been developing this plugin. Not complete yet, but is functional.
 Dirceu

 2008/11/20 alextait [EMAIL PROTECTED]



  I am fairly new to jquery and I am trying to create a product/category
  browser/tree using the treeview plugin and ajax.

  My first simple issue is this peice of code i am trying to understand.

  .find(.hitarea)

  what is happening here ? I understand the find functino but not sure
  about the chevron usage ?

  the overall problem is this.

  On viewing my list. if i click on one of the initial categories the
  second sub categories show up fine. I can then contract this sub list
  if i wish. If i leave this open and click on one of the sub categories
  for some reason i cannot then contract it again.

  I have looked into the treeview plugin code and found that the
  toggler method which would normaly just contract the list branch
  fires twice causing it to hide again.

  If anyone has any idea on thie general problem that would be great.

  thanks for any help in advance


[jQuery] Re: Resize an element without affecting the layout

2008-11-21 Thread vani

I made some progress as you can see here: http://tinyurl.com/645ow4 ,
but I've ran into problem with jquery hover function. Its over and out
functions fire too many times while the cursor is still over the same
image. That happens only if I use the animate effect inside the over
function, if I just switch the size of the images it works without a
problem.

On 20 stu, 13:08, Liam Potter [EMAIL PROTECTED] wrote:
 erm, best way to explain is to show an example.

 lets say the image is 400x400 to get it in the center you will need to
 set top and left to half that.

 top:-200px;
 left:-200px;

 If I'm right this should work, and you can use this in jquery animate.



 vani wrote:
  That's it, weehee! Now if only I could somehow position the center of
  the images to coincide with the center of parent cell? Any ideas on
  that one, and perhaps compatible with jquery animated resize?

  On 20 stu, 12:43, Liam Potter [EMAIL PROTECTED] wrote:

  ok, got it.
  Un comment the div in the td, and apply the position relative to that.
  for some reason position relative doesn't seem to work on a table cell.

  Ivan Svaljek wrote:

  Here is the link, but it changes often:http://tinyurl.com/634p9s

  On Thu, Nov 20, 2008 at 12:20 PM, Liam Potter [EMAIL PROTECTED]
  mailto:[EMAIL PROTECTED] wrote:

      do you have a live example I can see?

      vani wrote:
       That made it work in IE, but firefox and opera exhibit serious
       problems with it. Firefox sets the top/left to document
      top/left, and
       opera sets it to table top/left, only IE sets it to cell's top/left.

       On 20 stu, 11:03, Liam Potter [EMAIL PROTECTED]
      mailto:[EMAIL PROTECTED] wrote:

       make sure you have made the td position:relative

       Ivan Svaljek wrote:

       If I do that, they all pile up on each other at the top/left
      corner of
       the table, like this:http://tinyurl.com/5tdmgm

       On Thu, Nov 20, 2008 at 10:21 AM, Liam Potter
      [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
       mailto:[EMAIL PROTECTED]
      mailto:[EMAIL PROTECTED] wrote:

           set the css on them to this

           position:absolute;
           top:0;
           left:0;

           vani wrote:
            I've taken out the div, but it doesn't matter because as
      soon as I
            change the images positioning to absolute they change
      their top/left
            coordinates to the center of the cell, like this:
          http://tinyurl.com/5vmb42

            On 20 stu, 09:57, Liam Potter [EMAIL PROTECTED]
      mailto:[EMAIL PROTECTED]
           mailto:[EMAIL PROTECTED]
      mailto:[EMAIL PROTECTED] wrote:

            is the div necessary?
            Try taking it out.

            vani wrote:

            Thanks for replying, but I'm still having trouble
      making it
           work. I
            tried to set the table to relative and img to absolute
      but it
           didn't
            work as intended.
            This is the layout of the table:
            table
            tr
            tddivimg //div/td
            tddivimg //div/td
            tddivimg //div/td
            /tr
            /table

            ...I'm trying toresizethe img elements.

            On 19 stu, 18:15, Liam Potter [EMAIL PROTECTED]
      mailto:[EMAIL PROTECTED]
           mailto:[EMAIL PROTECTED]
      mailto:[EMAIL PROTECTED] wrote:

            use absolute positioning and set the parent element
      to relative.

            vani wrote:

            Is it possible to create an animatedresizeof an
      element
           without
            affecting the layout of the parent element table?
            I'm usingjQuery1.2.6 and possibly personalized
     jQueryUI, if
            necessary.


[jQuery] Re: exclude children from selected elements

2008-11-21 Thread [EMAIL PROTECTED]

My mistake, it is working. The problem was my lack of understanding
about how Dialog works.  main is the div from which I create a Dialog
and I didn't want the event listener to be added to the elements of
main. However main is NOT the first element of the Dialog. I the
background it is wrapped around other elements and the top one has
class .ui-dialog  . All sorted. Thanks .

On 21 nov, 09:32, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
 It still doesn't work. I think part of the problem is because the
 children of main are added after I create the event listener.

 Second solution is to check in the event listener if the target is a
 child of main and if so, return.  I know how to get the children of
 main , but how to I check the current tartget is one of them ?

 ricardobeat I need to select all objects of the page because I want
 to do a DOM inspector. But yes you are right, maybe I should only
 start from body !

 Thanks

 On 20 nov, 18:25, ricardobeat [EMAIL PROTECTED] wrote:

  Are you sure you want to apply it to *all* elements on the page? That
  sounds a bit awkward.

  var main =  $('#main, #main *');
  $('body *').not(main).mouseover(function(){...});

  On Nov 20, 2:07 pm, [EMAIL PROTECTED]

  [EMAIL PROTECTED] wrote:
   Hi,

   I want to apply a mouseover event on all elements but one and its
   children. I can't use class name to filter. How can I do it ?  I've
   tried unsuccessfully :

   $(*:not(#main)).not($(#main).children()).mouseover(function() {

   });

   thanks


[jQuery] How to create multiple dialog in same page by jquery?

2008-11-21 Thread Tony

When I try to to this, I found it looks like the second dialog wasn't
created.

Who knows how to implement it?

Thanks

$(document).ready
(
function()
{
$(div#form1).dialog
(
{
width: 290,
height: 380
}
);

$(div#form2).dialog
(
{
width: 290,
height: 200
}
);
}
)


[jQuery] Re: Resize an element without affecting the layout

2008-11-21 Thread Liam Potter


rather then using hover try binding the mouseenter and mouseleave events 
to it.


$(img).bind(mouseenter, function () {
   animate stuff
});
$(img).bind(mouseleave, function () {
back to normal
});

vani wrote:

I made some progress as you can see here: http://tinyurl.com/645ow4 ,
but I've ran into problem with jquery hover function. Its over and out
functions fire too many times while the cursor is still over the same
image. That happens only if I use the animate effect inside the over
function, if I just switch the size of the images it works without a
problem.

On 20 stu, 13:08, Liam Potter [EMAIL PROTECTED] wrote:
  

erm, best way to explain is to show an example.

lets say the image is 400x400 to get it in the center you will need to
set top and left to half that.

top:-200px;
left:-200px;

If I'm right this should work, and you can use this in jquery animate.



vani wrote:


That's it, weehee! Now if only I could somehow position the center of
the images to coincide with the center of parent cell? Any ideas on
that one, and perhaps compatible with jquery animated resize?
  
On 20 stu, 12:43, Liam Potter [EMAIL PROTECTED] wrote:
  

ok, got it.
Un comment the div in the td, and apply the position relative to that.
for some reason position relative doesn't seem to work on a table cell.

Ivan Svaljek wrote:


Here is the link, but it changes often:http://tinyurl.com/634p9s
  
On Thu, Nov 20, 2008 at 12:20 PM, Liam Potter [EMAIL PROTECTED]

mailto:[EMAIL PROTECTED] wrote:
  
do you have a live example I can see?
  
vani wrote:

 That made it work in IE, but firefox and opera exhibit serious
 problems with it. Firefox sets the top/left to document
top/left, and
 opera sets it to table top/left, only IE sets it to cell's top/left.
  
 On 20 stu, 11:03, Liam Potter [EMAIL PROTECTED]

mailto:[EMAIL PROTECTED] wrote:
  
 make sure you have made the td position:relative
  
 Ivan Svaljek wrote:
  
 If I do that, they all pile up on each other at the top/left

corner of
 the table, like this:http://tinyurl.com/5tdmgm
  
 On Thu, Nov 20, 2008 at 10:21 AM, Liam Potter

[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] wrote:
  
 set the css on them to this
  
 position:absolute;

 top:0;
 left:0;
  
 vani wrote:

  I've taken out the div, but it doesn't matter because as
soon as I
  change the images positioning to absolute they change
their top/left
  coordinates to the center of the cell, like this:
http://tinyurl.com/5vmb42
  
  On 20 stu, 09:57, Liam Potter [EMAIL PROTECTED]

mailto:[EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] wrote:
  
  is the div necessary?

  Try taking it out.
  
  vani wrote:
  
  Thanks for replying, but I'm still having trouble

making it
 work. I
  tried to set the table to relative and img to absolute
but it
 didn't
  work as intended.
  This is the layout of the table:
  table
  tr
  tddivimg //div/td
  tddivimg //div/td
  tddivimg //div/td
  /tr
  /table
  
  ...I'm trying toresizethe img elements.
  
  On 19 stu, 18:15, Liam Potter [EMAIL PROTECTED]

mailto:[EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] wrote:
  
  use absolute positioning and set the parent element

to relative.
  
  vani wrote:
  
  Is it possible to create an animatedresizeof an

element
 without
  affecting the layout of the parent element table?
  I'm usingjQuery1.2.6 and possibly personalized
   jQueryUI, if
  necessary.
  




[jQuery] Re: Resize an element without affecting the layout

2008-11-21 Thread vani

I have thus far tried the hover, mouseover/out, and bind methods with
pretty much the same effect, over and out happen unexpectedly...

On 21 stu, 11:14, Liam Potter [EMAIL PROTECTED] wrote:
 rather then using hover try binding the mouseenter and mouseleave events
 to it.

 $(img).bind(mouseenter, function () {
     animate stuff});

 $(img).bind(mouseleave, function () {
  back to normal



 });
 vani wrote:
  I made some progress as you can see here:http://tinyurl.com/645ow4,
  but I've ran into problem with jquery hover function. Its over and out
  functions fire too many times while the cursor is still over the same
  image. That happens only if I use the animate effect inside the over
  function, if I just switch the size of the images it works without a
  problem.

  On 20 stu, 13:08, Liam Potter [EMAIL PROTECTED] wrote:

  erm, best way to explain is to show an example.

  lets say the image is 400x400 to get it in the center you will need to
  set top and left to half that.

  top:-200px;
  left:-200px;

  If I'm right this should work, and you can use this in jquery animate.

  vani wrote:

  That's it, weehee! Now if only I could somehow position the center of
  the images to coincide with the center of parent cell? Any ideas on
  that one, and perhaps compatible with jquery animated resize?

  On 20 stu, 12:43, Liam Potter [EMAIL PROTECTED] wrote:

  ok, got it.
  Un comment the div in the td, and apply the position relative to that.
  for some reason position relative doesn't seem to work on a table cell.

  Ivan Svaljek wrote:

  Here is the link, but it changes often:http://tinyurl.com/634p9s

  On Thu, Nov 20, 2008 at 12:20 PM, Liam Potter [EMAIL PROTECTED]
  mailto:[EMAIL PROTECTED] wrote:

      do you have a live example I can see?

      vani wrote:
       That made it work in IE, but firefox and opera exhibit serious
       problems with it. Firefox sets the top/left to document
      top/left, and
       opera sets it to table top/left, only IE sets it to cell's 
  top/left.

       On 20 stu, 11:03, Liam Potter [EMAIL PROTECTED]
      mailto:[EMAIL PROTECTED] wrote:

       make sure you have made the td position:relative

       Ivan Svaljek wrote:

       If I do that, they all pile up on each other at the top/left
      corner of
       the table, like this:http://tinyurl.com/5tdmgm

       On Thu, Nov 20, 2008 at 10:21 AM, Liam Potter
      [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
       mailto:[EMAIL PROTECTED]
      mailto:[EMAIL PROTECTED] wrote:

           set the css on them to this

           position:absolute;
           top:0;
           left:0;

           vani wrote:
            I've taken out the div, but it doesn't matter because as
      soon as I
            change the images positioning to absolute they change
      their top/left
            coordinates to the center of the cell, like this:
          http://tinyurl.com/5vmb42

            On 20 stu, 09:57, Liam Potter [EMAIL PROTECTED]
      mailto:[EMAIL PROTECTED]
           mailto:[EMAIL PROTECTED]
      mailto:[EMAIL PROTECTED] wrote:

            is the div necessary?
            Try taking it out.

            vani wrote:

            Thanks for replying, but I'm still having trouble
      making it
           work. I
            tried to set the table to relative and img to absolute
      but it
           didn't
            work as intended.
            This is the layout of the table:
            table
            tr
            tddivimg //div/td
            tddivimg //div/td
            tddivimg //div/td
            /tr
            /table

            ...I'm trying toresizethe img elements.

            On 19 stu, 18:15, Liam Potter [EMAIL PROTECTED]
      mailto:[EMAIL PROTECTED]
           mailto:[EMAIL PROTECTED]
      mailto:[EMAIL PROTECTED] wrote:

            use absolute positioning and set the parent element
      to relative.

            vani wrote:

            Is it possible to create an animatedresizeof an
      element
           without
            affecting the layout of the parent element table?
            I'm usingjQuery1.2.6 and possibly personalized
     jQueryUI, if
            necessary.


[jQuery] Re: How to add html do a div properly? (html(), val(), or text() ?)

2008-11-21 Thread ginko100

ok guys.
thank you both.


[jQuery] Re: How to create multiple dialog in same page by jquery?

2008-11-21 Thread Richard D. Worth
Your code looks fine. Could you share a more complete code sample here

http://jsbin.com/

so we can see what you're seeing?

Also, there is a dedicated list for jQuery UI questions:

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

Thanks.

- Richard


On Fri, Nov 21, 2008 at 1:36 AM, Tony [EMAIL PROTECTED] wrote:


 When I try to to this, I found it looks like the second dialog wasn't
 created.

 Who knows how to implement it?

 Thanks

 $(document).ready
(
function()
{
 $(div#form1).dialog
(
{
width: 290,
height: 380
}
);

 $(div#form2).dialog
(
{
width: 290,
height: 200
}
);
 }
 )



[jQuery] SFBrowser updated to 2.5.1

2008-11-21 Thread Sjeiti

http://plugins.jquery.com/project/SFBrowser
SFBrowser is a file browsing and upload plugin. Returns a list of
objects with additional information on the selected files
(filesize,date,width,height). Features: ajax file upload,
localisation, sortable file table, file filtering, file renameing,
file duplication, file download, file/folder context menu, folder
creation, image resizing, image preview, text/ascii preview, multiple
files selection, inline or overlay browsing.


[jQuery] Re: jquery.cycle centering image

2008-11-21 Thread Mike Alsup

 since technically there is no next element, it goes back to the front?

There is always a next slide.  :-)

The problem in IE7 was that I had an extra comma in the code that I
posted and a JS error was occurring in IE7.  I didn't realize the
extra comma problem had been fixed in IE8 - good to know.  I'm aware
that Cycle does not always work well in IE8 standards mode and I've
submitted a error report to the IE team.  We'll see what happens when
the next beta comes out.

Cheers!


[jQuery] Re: $('#id').width()

2008-11-21 Thread Isaiah Fischer
But now that I think about it... The image wouldn't appear if the element
hadn't been loaded either... So my previous suggestions probably won't fix
the problem... :/ I'll take another look this afternoon and see if I can
find out whats going wrong...

On Fri, Nov 21, 2008 at 2:10 AM, Lee McMullen [EMAIL PROTECTED]wrote:

 Thanks, I'll try your suggestions and let you know.

 Just out of curiosity, why would binding the field setup to the window load
 have an effect? I thought that was the whole point of using $(function(){}),
 so you didn't have to wait for the window to load?


 On 21 Nov 2008, at 04:01, Isaiah Fischer [EMAIL PROTECTED] wrote:

 Then I have two possible solutions to what I think the problem may be...

 One, have the field_setup() function bound to the window load as such:

 $(window).bind(load,function(){field_setup()});

 or define the width in the css of that field by its ID

 If that doesn't work then I'll need to find a different problem to solve :P

 On Thu, Nov 20, 2008 at 4:23 PM, Lee Mc  [EMAIL PROTECTED]
 [EMAIL PROTECTED] wrote:


 The width is defined by a class the field has rather than it's ID.




 On Nov 20, 8:06 pm, CodingCyb.org [EMAIL PROTECTED] wrote:
  And in the css the width is defined for #test_field or w/e its
  named? Or is it defined by a class that it has?
 
  On Nov 20, 9:37 am, Lee Mc [EMAIL PROTECTED] wrote:
 
   The width of the field gets set by a stylesheet which is pulled
   through.
 
   On Nov 20, 3:22 pm, CodingCyb.org [EMAIL PROTECTED] wrote:
 
Is the original width of the text field set in css? Or is it just
 the
width it gets when page loads?
 
On Nov 20, 9:09 am, Lee Mc [EMAIL PROTECTED] wrote:
 
 Yes that's exactly right.
 
 Any ideas would be greatly appreciated!
 
 On Nov 20, 1:18 pm, CodingCyb.org [EMAIL PROTECTED]
 wrote:
 
  I'm still trying to picture the site in my mind. So it has three
 tabs
  that you can switch between, but the default can be different?
 And
  when the default isn't the first one, the image appears in tab
 one,
  but stays underneath the input box because the width isn't
 updated?
 
  On Nov 20, 12:11 am, Lee Mc [EMAIL PROTECTED] wrote:
 
   The example HTML only has a single text input, it's this input
 I'm
   having issues with. Apologies, the example HTML gave the field
 a
   different ID than the JS contained. Im copying the code from
 an in
   process project so it's stripped down for readability.
 
   Therefore the different ID in my HTML is just a typo.
 
   Cheers, Lee.
 
   On Nov 20, 4:14 am, CodingCyb.org [EMAIL PROTECTED]
 wrote:
 
Sorry it took so long for a reply...
 
Where in the html is #test_field ? That's what the
 field_img goes
after, but I'm not sure where that is...
 
On Nov 19, 9:39 am, Lee Mc [EMAIL PROTECTED] wrote:
 
 Hi, yes I think you've misunderstood my problem.
 
 In a nutshell, there is an input type=text on tab 1.
 On load of
 the form, I'm trying to make this input less wide and
 place an image
 next to it.  When tab 1 is the default tab, it works fine.
  When any
 other tab is the default, it inserts the image but doesn't
 update the
 width of the field.
 
 This is an example of my markup:
 
 div class=tab_container
 
 !--insert tabs--
 ul class=tabs
 lia href=my_form#tab_1 class=tab
 title=content_1Tab 1/a/
 li
 lia href=my_form#tab_2 class=tab
 title=content_2Tab 2/a/
 li
 lia href=my_form#tab_3 class=tab
 title=content_3Tab 3/a/
 li
 /ul
 
 !--insert tab 1--
 div id=content_1 class=tab_content
 a name=tab_1/a
 label for=field_idMy Test Field:/labelinput
 type=text
 id=field_id value=
 /div!--close content_1--
 
 !--insert tab 2--
 div id=content_2 class=tab_content
 a name=tab_2/a
 !--tab 2 content--
 /div!--close content 2--
 
 !--insert tab 3--
 div id=content_3 class=tab_content
 a name=tab_3/a
 !--tab 3 content--
 /div!--close content 3--
 
 /div!--close tab container--
 
 Any thoughts would be much appreciated.
 
 Cheers,
 Lee
 
 On Nov 18, 3:47 pm, CodingCyborg [EMAIL PROTECTED]
 wrote:
 
  That all seems like it would work fine. I went back and
 re-read your
  original post. I found that I may have misunderstood the
 problem.
 
  In your original post is #field_id within the content
 of the first
  tab, or is it the content warpper of the first tab?
 
  If it is the wrapper, then you are putting the image
 outside of what
  is hidden, if not then changing that field width
 shouldn't affect any
  other tabs.
 
  From what I now understand you don't want the image
 there unless you
  are on the first tab? 

[jQuery] Re: $('#id').width()

2008-11-21 Thread Isaiah Fischer
With this though, since you are changing the width of an ID, if the element
with that ID hasn't loaded yet, then it cant change the width of it. Unless
the width is specifically set for that particular ID in the CSS. Which is
why the second option is viable.

On Fri, Nov 21, 2008 at 2:10 AM, Lee McMullen [EMAIL PROTECTED]wrote:

 Thanks, I'll try your suggestions and let you know.

 Just out of curiosity, why would binding the field setup to the window load
 have an effect? I thought that was the whole point of using $(function(){}),
 so you didn't have to wait for the window to load?


 On 21 Nov 2008, at 04:01, Isaiah Fischer [EMAIL PROTECTED] wrote:

 Then I have two possible solutions to what I think the problem may be...

 One, have the field_setup() function bound to the window load as such:

 $(window).bind(load,function(){field_setup()});

 or define the width in the css of that field by its ID

 If that doesn't work then I'll need to find a different problem to solve :P

 On Thu, Nov 20, 2008 at 4:23 PM, Lee Mc  [EMAIL PROTECTED]
 [EMAIL PROTECTED] wrote:


 The width is defined by a class the field has rather than it's ID.




 On Nov 20, 8:06 pm, CodingCyb.org [EMAIL PROTECTED] wrote:
  And in the css the width is defined for #test_field or w/e its
  named? Or is it defined by a class that it has?
 
  On Nov 20, 9:37 am, Lee Mc [EMAIL PROTECTED] wrote:
 
   The width of the field gets set by a stylesheet which is pulled
   through.
 
   On Nov 20, 3:22 pm, CodingCyb.org [EMAIL PROTECTED] wrote:
 
Is the original width of the text field set in css? Or is it just
 the
width it gets when page loads?
 
On Nov 20, 9:09 am, Lee Mc [EMAIL PROTECTED] wrote:
 
 Yes that's exactly right.
 
 Any ideas would be greatly appreciated!
 
 On Nov 20, 1:18 pm, CodingCyb.org [EMAIL PROTECTED]
 wrote:
 
  I'm still trying to picture the site in my mind. So it has three
 tabs
  that you can switch between, but the default can be different?
 And
  when the default isn't the first one, the image appears in tab
 one,
  but stays underneath the input box because the width isn't
 updated?
 
  On Nov 20, 12:11 am, Lee Mc [EMAIL PROTECTED] wrote:
 
   The example HTML only has a single text input, it's this input
 I'm
   having issues with. Apologies, the example HTML gave the field
 a
   different ID than the JS contained. Im copying the code from
 an in
   process project so it's stripped down for readability.
 
   Therefore the different ID in my HTML is just a typo.
 
   Cheers, Lee.
 
   On Nov 20, 4:14 am, CodingCyb.org [EMAIL PROTECTED]
 wrote:
 
Sorry it took so long for a reply...
 
Where in the html is #test_field ? That's what the
 field_img goes
after, but I'm not sure where that is...
 
On Nov 19, 9:39 am, Lee Mc [EMAIL PROTECTED] wrote:
 
 Hi, yes I think you've misunderstood my problem.
 
 In a nutshell, there is an input type=text on tab 1.
 On load of
 the form, I'm trying to make this input less wide and
 place an image
 next to it.  When tab 1 is the default tab, it works fine.
  When any
 other tab is the default, it inserts the image but doesn't
 update the
 width of the field.
 
 This is an example of my markup:
 
 div class=tab_container
 
 !--insert tabs--
 ul class=tabs
 lia href=my_form#tab_1 class=tab
 title=content_1Tab 1/a/
 li
 lia href=my_form#tab_2 class=tab
 title=content_2Tab 2/a/
 li
 lia href=my_form#tab_3 class=tab
 title=content_3Tab 3/a/
 li
 /ul
 
 !--insert tab 1--
 div id=content_1 class=tab_content
 a name=tab_1/a
 label for=field_idMy Test Field:/labelinput
 type=text
 id=field_id value=
 /div!--close content_1--
 
 !--insert tab 2--
 div id=content_2 class=tab_content
 a name=tab_2/a
 !--tab 2 content--
 /div!--close content 2--
 
 !--insert tab 3--
 div id=content_3 class=tab_content
 a name=tab_3/a
 !--tab 3 content--
 /div!--close content 3--
 
 /div!--close tab container--
 
 Any thoughts would be much appreciated.
 
 Cheers,
 Lee
 
 On Nov 18, 3:47 pm, CodingCyborg [EMAIL PROTECTED]
 wrote:
 
  That all seems like it would work fine. I went back and
 re-read your
  original post. I found that I may have misunderstood the
 problem.
 
  In your original post is #field_id within the content
 of the first
  tab, or is it the content warpper of the first tab?
 
  If it is the wrapper, then you are putting the image
 outside of what
  is hidden, if not then changing that field width
 shouldn't affect any
  other tabs.
 
  From what I now understand you don't want the image
 there unless you
  are on the 

[jQuery] Re: linkselect plugin problem (related hover gets deactivated) -- help please

2008-11-21 Thread clorentzen

Dan --

Yep, that was it. Now the hover state of the parent nav panel doesn't
get disturbed. ...And you were right about the repercussions on the
placement of the dropdown. It's now appearing very far away from the
actual initial link, unfortunately.

Best,

--Carl.


[jQuery] Re: linkselect plugin problem (related hover gets deactivated) -- help please

2008-11-21 Thread Liam Potter


Carl, can you not delete the quoted messages as most people dont use a 
web interface to follow newsgroups and now I have no idea what your 
reply relates to.


clorentzen wrote:

Dan --

Yep, that was it. Now the hover state of the parent nav panel doesn't
get disturbed. ...And you were right about the repercussions on the
placement of the dropdown. It's now appearing very far away from the
actual initial link, unfortunately.

Best,

--Carl.
  




[jQuery] Re: SFBrowser updated to 2.5.1

2008-11-21 Thread Mickster

Hi,

do you have any example page somewhere?
Would be nice to see before I download and test...

Regards,
Mickster

On Nov 21, 12:27 pm, Sjeiti [EMAIL PROTECTED] wrote:
 http://plugins.jquery.com/project/SFBrowser
 SFBrowser is a file browsing and upload plugin. Returns a list of
 objects with additional information on the selected files
 (filesize,date,width,height). Features: ajax file upload,
 localisation, sortable file table, file filtering, file renameing,
 file duplication, file download, file/folder context menu, folder
 creation, image resizing, image preview, text/ascii preview, multiple
 files selection, inline or overlay browsing.


[jQuery] clueTip send header with Ajax request

2008-11-21 Thread n8cshaw

Hi all. I am implementing clueTip and have it working just fine using
an Ajax call. However, when all is said and done, the Ajax call will
be hitting a web service that requires a custom authentication header.
I have set up my jQuery global ajax options to send the header on all
requests.

jQuery.ajaxSetup({
beforeSend: function(xhr)
{ xhr.setRequestHeader(customAuthHeader,
customAuthHeaderValue);}
});

However, it does not appear that clueTip recognizes these global
options (ideally, it probably should). So, I have to send the header
on the request manually. I have tried to do this via the ajaxSettings,
but I am getting syntax errors and the clueTip docs don't mention
anything about using beforeSend, so I am not even sure if it is
possible.

ajaxSettings: {
dataType: 'xml',
beforeSend: function(xhr) {
xhr.setRequestHeader(customAuthHeader,
customAuthHeaderValue)
}
},

Has anyone done this or can anyone provide some advice on how to do
this?


[jQuery] Re: SFBrowser updated to 2.5.1

2008-11-21 Thread Sjeiti

No example page (yet). Got a screenshot here though:
http://www.sjeiti.com/wp-content/uploads/2008/11/sfbrowser.png
But if you download it, it should work right away. There are three
examples on the bottom of the root-index page.


[jQuery] New help with jQuery and Visual Studio

2008-11-21 Thread MorningZ

For those Microsoft-using people like me, thought i'd point out some
recent blog posts helping with getting Visual Studio 2008 Intellisense
working with our beloved jQuery

http://blogs.msdn.com/webdevtools/archive/2008/11/18/jscript-intellisense-faq.aspx

I was pulling my hair out over #6 (childNodes is null) error, but the
tip to make a fake -vsdoc'd got around that (and it was indeed
UI.datepicker with that error)

Good luck


[jQuery] NEWB ALERT: Why when calling a pre-existing function from .click() is it executed on page load?

2008-11-21 Thread .mini.moke


Hi there,

I'm pretty new to JQuery.  I have a couple of elements that need to call the
same function so my code looks like this:

$(#qSearchBut).click(quickSearch());

Pretty simple I thought.  But this call executes the quickSearch() function
on page load.  What fundamental thing am I overlooking?

Thanks in advance

Amanda 
-- 
View this message in context: 
http://www.nabble.com/NEWB-ALERT%3A-Why-when-calling-a-pre-existing-function-from-.click%28%29-is-it-executed-on-page-load--tp20622218s27240p20622218.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: NEWB ALERT: Why when calling a pre-existing function from .click() is it executed on page load?

2008-11-21 Thread Liam Potter


$(#qSearchBut).click(function () {
$(this).quickSearch()
});




.mini.moke wrote:

Hi there,

I'm pretty new to JQuery.  I have a couple of elements that need to call the
same function so my code looks like this:

$(#qSearchBut).click(quickSearch());

Pretty simple I thought.  But this call executes the quickSearch() function
on page load.  What fundamental thing am I overlooking?

Thanks in advance

Amanda 
  




[jQuery] Re: NEWB ALERT: Why when calling a pre-existing function from .click() is it executed on page load?

2008-11-21 Thread Pierre Bellan
Hi,

In your code, i think you call the function. You only need to put the name
of the function.
The code you wrote execute the function quickSearch then put the result as
the name of the function to bind to click

Like this :
$(#qSearchBut).click(quickSearch);

Pierre

Lily Tomlin  - The trouble with the rat race is that even if you win,
you're still a rat.

2008/11/21 .mini.moke [EMAIL PROTECTED]



 Hi there,

 I'm pretty new to JQuery.  I have a couple of elements that need to call
 the
 same function so my code looks like this:

 $(#qSearchBut).click(quickSearch());

 Pretty simple I thought.  But this call executes the quickSearch() function
 on page load.  What fundamental thing am I overlooking?

 Thanks in advance

 Amanda
 --
 View this message in context:
 http://www.nabble.com/NEWB-ALERT%3A-Why-when-calling-a-pre-existing-function-from-.click%28%29-is-it-executed-on-page-load--tp20622218s27240p20622218.html
 Sent from the jQuery General Discussion mailing list archive at Nabble.com.




[jQuery] Re: NEWB ALERT: Why when calling a pre-existing function from .click() is it executed on page load?

2008-11-21 Thread Richard D. Worth
You need to simply pass the name of the function without parentheses like so

$(#qSearchBut).click(quickSearch);

Otherwise it executes the function immediately (upon parsing) and passes the
result as an argument to .click().

- Richard

On Fri, Nov 21, 2008 at 9:30 AM, .mini.moke [EMAIL PROTECTED]wrote:



 Hi there,

 I'm pretty new to JQuery.  I have a couple of elements that need to call
 the
 same function so my code looks like this:

 $(#qSearchBut).click(quickSearch());

 Pretty simple I thought.  But this call executes the quickSearch() function
 on page load.  What fundamental thing am I overlooking?

 Thanks in advance

 Amanda
 --
 View this message in context:
 http://www.nabble.com/NEWB-ALERT%3A-Why-when-calling-a-pre-existing-function-from-.click%28%29-is-it-executed-on-page-load--tp20622218s27240p20622218.html
 Sent from the jQuery General Discussion mailing list archive at Nabble.com.




[jQuery] Re: Jquery Countdown!!!

2008-11-21 Thread bthreesix


I pasted this in and it didnt work

$('div#countdowntimer').countdown({until:new Date
(2009,9,15,14,0,0),format:'odHMS'});

is there something im not doing right? heres my whole page

!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd 


html xmlns=http://www.w3.org/1999/xhtml;
head

titlecountdown/title
link href=css/style.css type=text/css rel=stylesheet/
link href=css/jquery.countdown.css type=text/css rel=stylesheet/
script src=js/jquery.js type=text/javascript/script
script src=js/countdown.js type=text/javascript/script
script type=text/javascript
$('div#countdowntimer').countdown({until:new Date
(2009,9,15,14,0,0),format:'odHMS'});
/script
/head
body
div id=countdowntimer/div
/body
/html

I'm trying to make it countdown to December 15th, which I can do  
myself but I'm trying to figure out why this won't work because I want  
to place more than 1 type of countdown on my site


On Nov 18, 2008, at 2:51 17 PM, Mihai wrote:


$('div#countdowntimer').countdown({until:new Date
(2009,9,15,14,0,0),format:'odHMS'});




[jQuery] Re: SFBrowser updated to 2.5.1

2008-11-21 Thread Mickster

Thanks for your quick answer!

I've downloaded it but I can't get it to work - for some reason the
define constants doesn't work (suspect my setup has a bad day :) ).
Anyhow, I changed all the constants and got all js-files to load.
But when I click the examples, nothing happen - no errors, no
nothing...

Most likely something is wrong with my setup, so I'll keep checking...

Thanks!


On Nov 21, 3:26 pm, Sjeiti [EMAIL PROTECTED] wrote:
 No example page (yet). Got a screenshot here 
 though:http://www.sjeiti.com/wp-content/uploads/2008/11/sfbrowser.png
 But if you download it, it should work right away. There are three
 examples on the bottom of the root-index page.


[jQuery] set default action for all links

2008-11-21 Thread EC

Hi, i would like to know if is possible to set a default action for
all href in a page...

I know i can use selectors to find all href but i don't know what to
put in function.

I just would like that all link open in a lightbox...

Someone can help me?

Thanks


[jQuery] Re: exclude children from selected elements

2008-11-21 Thread Bob O

Why dont you fire an event after the children have been loaded that
removes them?



On Nov 21, 3:07 am, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
 My mistake, it is working. The problem was my lack of understanding
 about how Dialog works.  main is the div from which I create a Dialog
 and I didn't want the event listener to be added to the elements of
 main. However main is NOT the first element of the Dialog. I the
 background it is wrapped around other elements and the top one has
 class .ui-dialog  . All sorted. Thanks .

 On 21 nov, 09:32, [EMAIL PROTECTED]

 [EMAIL PROTECTED] wrote:
  It still doesn't work. I think part of the problem is because the
  children of main are added after I create the event listener.

  Second solution is to check in the event listener if the target is a
  child of main and if so, return.  I know how to get the children of
  main , but how to I check the current tartget is one of them ?

  ricardobeat I need to select all objects of the page because I want
  to do a DOM inspector. But yes you are right, maybe I should only
  start from body !

  Thanks

  On 20 nov, 18:25, ricardobeat [EMAIL PROTECTED] wrote:

   Are you sure you want to apply it to *all* elements on the page? That
   sounds a bit awkward.

   var main =  $('#main, #main *');
   $('body *').not(main).mouseover(function(){...});

   On Nov 20, 2:07 pm, [EMAIL PROTECTED]

   [EMAIL PROTECTED] wrote:
Hi,

I want to apply a mouseover event on all elements but one and its
children. I can't use class name to filter. How can I do it ?  I've
tried unsuccessfully :

$(*:not(#main)).not($(#main).children()).mouseover(function() {

});

thanks


[jQuery] Re: SFBrowser updated to 2.5.1

2008-11-21 Thread Sjeiti

I checked it here on two webservers :-(
What version php are you running?
And if you have Firebug installed, what does the console say?
or maybe...
ah... bloody... you must be running IE
The last version ran just fine in IE so I didn't bother to check
(Firefox and Chrome were working so I presumed...)
oh well... back to the drawing board :.(



On Nov 21, 4:37 pm, Mickster [EMAIL PROTECTED] wrote:
 Thanks for your quick answer!

 I've downloaded it but I can't get it to work - for some reason the
 define constants doesn't work (suspect my setup has a bad day :) ).
 Anyhow, I changed all the constants and got all js-files to load.
 But when I click the examples, nothing happen - no errors, no
 nothing...

 Most likely something is wrong with my setup, so I'll keep checking...

 Thanks!


[jQuery] Re: Load JQuery only once

2008-11-21 Thread Eric Martin

Raphael,

Since you are creating a WordPress plugin, I suggest looking at the
wp_enqueue_script() function[1].

Using your example, you'd include your scripts with something like:
?php wp_enqueue_script('plugin1', '/wp-content/plugins/plugin1/js/
plugin1.js', array('jquery') ); ?
?php wp_enqueue_script('plugin2', '/wp-content/plugins/plugin2/js/
plugin2.js', array('jquery') ); ?

And WordPress will handle the loading of jQuery and your plugin
scripts.

-Eric

[1] http://codex.wordpress.org/Function_Reference/wp_enqueue_script



On Nov 20, 4:16 pm, Raphael Jolivet [EMAIL PROTECTED] wrote:
 Hello,

 I've developped several plugins for wordpress that require JQuery.
 As I have packaged and distributed these plugins separately, they come
 all with one version of JQuery.

 The problem is that if someone uses two of these plugins, the HTML
 header will look like :
 script type=text/javascript src=http://mysite/plugin1/jquery.js;/script

 script type=text/javascript src=http://mysite/plugin1/
 jquery.plugin1.js /script
 script type=text/javascript src=http://mysite/plugin2/jquery.js;/script

 script type=text/javascript src=http://mysite/plugin2/
 jquery.plugin2.js /script

 There are two issues here :
 * JQuery is loaded twice
 * The plugin declared by plugin1 will be erased by the second load of
 Jquery.js.

 Can I load Jquery dynamically by testing it is not already loaded ?

 I'm searching for a way to replace :

 script type=text/javascript src=http/mysite/plugin1/jquery.js /
 script

 by

 script type=text/javascript
 if (!jquery_loaded) {
     dynamic_load(http://mysite/plugin1/jquery.js;);}

 /script

 Thanks in advance for your help.

 Raphael


[jQuery] Re: SFBrowser updated to 2.5.1

2008-11-21 Thread Mickster

Using Firefox 3, PHP 5.2.2. Firefox is quiet, says nothing.

But don't worry about it - there's obviously something wrong on my
side when not even the constants work - your code is good!
I'll look into it again later!

Leave the drawing board and have a beer at Rembrandtpleijn(?)
instead :)

Thanks!

On Nov 21, 5:04 pm, Sjeiti [EMAIL PROTECTED] wrote:
 I checked it here on two webservers :-(
 What version php are you running?
 And if you have Firebug installed, what does the console say?
 or maybe...
 ah... bloody... you must be running IE
 The last version ran just fine in IE so I didn't bother to check
 (Firefox and Chrome were working so I presumed...)
 oh well... back to the drawing board :.(

 On Nov 21, 4:37 pm, Mickster [EMAIL PROTECTED] wrote:

  Thanks for your quick answer!

  I've downloaded it but I can't get it to work - for some reason the
  define constants doesn't work (suspect my setup has a bad day :) ).
  Anyhow, I changed all the constants and got all js-files to load.
  But when I click the examples, nothing happen - no errors, no
  nothing...

  Most likely something is wrong with my setup, so I'll keep checking...

  Thanks!


[jQuery] Re: set default action for all links

2008-11-21 Thread Pierre Bellan
Hi,

I don't know what lightbox is but it's not important.
Like you said, you just need an selector for all links.

$('a').click(function(){
myUrl = $(this).attr('href');
openLightbox(myUrl);
});

I think this code works, but i have not test it.

Pierre

Yogi Berra  - I never said most of the things I said.

2008/11/21 EC [EMAIL PROTECTED]


 Hi, i would like to know if is possible to set a default action for
 all href in a page...

 I know i can use selectors to find all href but i don't know what to
 put in function.

 I just would like that all link open in a lightbox...

 Someone can help me?

 Thanks



[jQuery] Re: SFBrowser updated to 2.5.1

2008-11-21 Thread Mickster

Found it.
The config.php wasn't included but I didn't get any error message from
my php...
So in index.php, I changed line 10 to include the config.php before
the init.php:
?php include_once(sfbrowser/config.php);include_once(sfbrowser/
init.php); ?

Works and looks really good!

Keep up the good job!

On Nov 21, 5:17 pm, Mickster [EMAIL PROTECTED] wrote:
 Using Firefox 3, PHP 5.2.2. Firefox is quiet, says nothing.

 But don't worry about it - there's obviously something wrong on my
 side when not even the constants work - your code is good!
 I'll look into it again later!

 Leave the drawing board and have a beer at Rembrandtpleijn(?)
 instead :)

 Thanks!

 On Nov 21, 5:04 pm, Sjeiti [EMAIL PROTECTED] wrote:

  I checked it here on two webservers :-(
  What version php are you running?
  And if you have Firebug installed, what does the console say?
  or maybe...
  ah... bloody... you must be running IE
  The last version ran just fine in IE so I didn't bother to check
  (Firefox and Chrome were working so I presumed...)
  oh well... back to the drawing board :.(

  On Nov 21, 4:37 pm, Mickster [EMAIL PROTECTED] wrote:

   Thanks for your quick answer!

   I've downloaded it but I can't get it to work - for some reason the
   define constants doesn't work (suspect my setup has a bad day :) ).
   Anyhow, I changed all the constants and got all js-files to load.
   But when I click the examples, nothing happen - no errors, no
   nothing...

   Most likely something is wrong with my setup, so I'll keep checking...

   Thanks!


[jQuery] Re: SFBrowser updated to 2.5.1

2008-11-21 Thread Sjeiti

:-) heh... will do in just a minute... got a beer right here... just
waiting for some people to show up so we can hit the streets.
IE sucks though: can't see what is wrong there yet, guess I'm gonna
have to make the php write a log file .


On Nov 21, 5:17 pm, Mickster [EMAIL PROTECTED] wrote:
 Leave the drawing board and have a beer at Rembrandtpleijn(?)
 instead :)


[jQuery] Re: set default action for all links

2008-11-21 Thread Richard D. Worth
On Fri, Nov 21, 2008 at 11:28 AM, Pierre Bellan [EMAIL PROTECTED] wrote:

 Hi,

 I don't know what lightbox is but it's not important.
 Like you said, you just need an selector for all links.

 $('a').click(function(){
 myUrl = $(this).attr('href');
 openLightbox(myUrl);
 });


Don't forget the var keyword for myUrl, and return false; so the link
doesn't get followed.

$('a').click(function(){
  var myUrl = $(this).attr('href');
  openLightbox(myUrl);
  return false;
});

- Richard


[jQuery] Tablesorter pager and ajax

2008-11-21 Thread led

I've noted that tablesorter and the pager don't work in ajax response
such as the content returned in the jquery load(), with or without
previous Table tags
How can i fix this .
See this demo of the problem in  http://realferias.com/pager.asp


[jQuery] jQuery Quicksearch Plugin Help

2008-11-21 Thread abovegaucho

I am having issues with the jquery.quicksearch plugin.  I first
created some php code to pull a csv file into a table.  Then I used
the plugin to search the table that was loaded through the php code.

The table wasn't very large so it worked like a charm.  However, I
tried doing the same thing with a much larger csv file (about 4000
rows and 3 columns).  The plugin was very slow to respond.

I also just ran some tests and it is slow in IE7 but it will
work...now I did the same thing in firefox and it crashes firefox.  It
also works in IE6 slow but it works.

I did some google searches and found this:

http://orderedlist.com/articles/live-search-with-quicksilver-style-fo...

However this code is for list itemsli  I am not much of a programmer
so I don't know how to modify to search the large table that is loaded
through the csv file.

Any suggestions!?

Thanks


[jQuery] Re: jQuery Quicksearch Plugin Help

2008-11-21 Thread Rik Lomas

Hi, I'm the author of the quicksearch plugin, unfortunately the code
*is* a bit slow when dealing with large sets of data and it is one of
the issues I'm trying to fix, I would recommend not having any extra
features enabled to help speed it up (e.g. row striping)

Someone might correct me, but I do think that Javascript in general
isn't particularly speedy when dealing with that much data, so I might
be able to make that much difference to the speed, but I will carry on
working to get it faster

Rik


2008/11/21 abovegaucho [EMAIL PROTECTED]:

 I am having issues with the jquery.quicksearch plugin.  I first
 created some php code to pull a csv file into a table.  Then I used
 the plugin to search the table that was loaded through the php code.

 The table wasn't very large so it worked like a charm.  However, I
 tried doing the same thing with a much larger csv file (about 4000
 rows and 3 columns).  The plugin was very slow to respond.

 I also just ran some tests and it is slow in IE7 but it will
 work...now I did the same thing in firefox and it crashes firefox.  It
 also works in IE6 slow but it works.

 I did some google searches and found this:

 http://orderedlist.com/articles/live-search-with-quicksilver-style-fo...

 However this code is for list itemsli  I am not much of a programmer
 so I don't know how to modify to search the large table that is loaded
 through the csv file.

 Any suggestions!?

 Thanks




-- 
Rik Lomas
http://rikrikrik.com


[jQuery] Re: jQuery Quicksearch Plugin Help

2008-11-21 Thread abovegaucho

First I must say that I really like your plugin...and I did go and
read some other stuff on your site about your latest
plugin...congrats!

I have the following options in the jquery.quicksearch.js file...I
believe that row striping is off...but I am not much of a programmer
so let me know what I need to do if I haven't done your suggestions.

;(function( $ ){
$.fn.quicksearch = function(options) {

options = jQuery.extend({
position: 'prepend',
attached: 'body',
formId: 'quicksearch',
labelText: 'Quick Search',
labelClass: 'qs_label',
inputText: null,
inputClass: 'qs_input',
loaderId: 'loader',
loaderClass: 'loader',
loaderImg: null,
loaderText: '',
stripeRowClass: null,
hideElement: null,
delay: 500,
focusOnLoad: false,
onBefore: null,
onAfter: null,
filter: null,
randomElement: 'qs'+Math.floor(Math.random()*100)
}, options);

var timeout;
var cache;
var score = {};
var el = this;
var stripeRowLength = (!is_empty(options.stripeRowClass)) ?
options.stripeRowClass.length : 0;
var doStripe = (stripeRowLength  0) ? true : false;

function is_empty (i)
{
return (i == null || i == undefined || i == false) ? 
true: false;
}

function get_cache (el)
{
cache = 
$(el).not('.'+options.noResultsClass).map(function(){
return strip_html(normalise(this.innerHTML));
});
}

function normalise (i)
{
return $.trim(i.toLowerCase().replace(/\n/, 
'').replace(/\s{2,}/, '
'));
}

function get_key()
{
var input = strip_html(normalise($('input[rel=' +
options.randomElement + ']').val()));

if (typeof options.filter == function) { input = 
options.filter
(input); }

if (input.indexOf(' ') == -1)
{
return input;
}
else
{
return input.split( );
}
}

function test_key(k, value, type)
{
if (type == string)
{
return test_key_string(k, value);
}
else
{
return test_key_arr(k, value);
}
}

function test_key_string(k, value)
{
return (value.indexOf(k)  -1);
}

function test_key_arr(k, value)
{
for (var i = 0; i  k.length; i++) {
var test = value.indexOf(k[i]);
if (test == -1) {
return false;
}
}
return true;
}

function strip_html (input)
{
var regexp = new RegExp(/\[^\]+\/g);
var output = input.replace(regexp, );
output = output.toLowerCase();
return output;
}

function select_element (el)
{
if(options.hideElement == grandparent)
{
return $(el).parent().parent();
}
else if (options.hideElement == parent)
{
return $(el).parent();
}
else
{
return $(el);
}
}

function stripe (el)
{
if (doStripe)
{
var i = 0;

select_element(el).filter(':visible').each(function () {

for (var j = 0; j  stripeRowLength; 
j++)

[jQuery] Re: jQuery Quicksearch Plugin Help

2008-11-21 Thread Rik Lomas

I meant in the options, so when you do $(...).quicksearch( options );
there isn't anything other than the basic stuff you need in the object
you're passing through

Rik

2008/11/21 abovegaucho [EMAIL PROTECTED]:

 First I must say that I really like your plugin...and I did go and
 read some other stuff on your site about your latest
 plugin...congrats!

 I have the following options in the jquery.quicksearch.js file...I
 believe that row striping is off...but I am not much of a programmer
 so let me know what I need to do if I haven't done your suggestions.

 ;(function( $ ){
$.fn.quicksearch = function(options) {

options = jQuery.extend({
position: 'prepend',
attached: 'body',
formId: 'quicksearch',
labelText: 'Quick Search',
labelClass: 'qs_label',
inputText: null,
inputClass: 'qs_input',
loaderId: 'loader',
loaderClass: 'loader',
loaderImg: null,
loaderText: '',
stripeRowClass: null,
hideElement: null,
delay: 500,
focusOnLoad: false,
onBefore: null,
onAfter: null,
filter: null,
randomElement: 'qs'+Math.floor(Math.random()*100)
}, options);

var timeout;
var cache;
var score = {};
var el = this;
var stripeRowLength = (!is_empty(options.stripeRowClass)) ?
 options.stripeRowClass.length : 0;
var doStripe = (stripeRowLength  0) ? true : false;

function is_empty (i)
{
return (i == null || i == undefined || i == false) ? 
 true: false;
}

function get_cache (el)
{
cache = 
 $(el).not('.'+options.noResultsClass).map(function(){
return strip_html(normalise(this.innerHTML));
});
}

function normalise (i)
{
return $.trim(i.toLowerCase().replace(/\n/, 
 '').replace(/\s{2,}/, '
 '));
}

function get_key()
{
var input = strip_html(normalise($('input[rel=' +
 options.randomElement + ']').val()));

if (typeof options.filter == function) { input = 
 options.filter
 (input); }

if (input.indexOf(' ') == -1)
{
return input;
}
else
{
return input.split( );
}
}

function test_key(k, value, type)
{
if (type == string)
{
return test_key_string(k, value);
}
else
{
return test_key_arr(k, value);
}
}

function test_key_string(k, value)
{
return (value.indexOf(k)  -1);
}

function test_key_arr(k, value)
{
for (var i = 0; i  k.length; i++) {
var test = value.indexOf(k[i]);
if (test == -1) {
return false;
}
}
return true;
}

function strip_html (input)
{
var regexp = new RegExp(/\[^\]+\/g);
var output = input.replace(regexp, );
output = output.toLowerCase();
return output;
}

function select_element (el)
{
if(options.hideElement == grandparent)
{
return $(el).parent().parent();
}
else if (options.hideElement == parent)
{
return $(el).parent();
}
else
{
return $(el);
}
}

function stripe (el)
{
if (doStripe)
{

[jQuery] document.location.hash and iFrame not working. help me please!

2008-11-21 Thread Mr.Ilia

Dear guys, hi!

Please I need a help! I have stuck with applying a click into iFrame.

I have a page with navigation. so when i need to open a page from URL
with a certain tabs opened and clicked. i just use
document.location.hash property.

It works perfectly if I put the desired (that has to be clicked)
content into div.
then when I type in address line

index.html?tab=0#members_menu1_submenu1

it clicks all off them correctly.

BUT

if the last part that contains submenu i cut and put into iFrame the
whole
thing doesn't get initilized.

I'm sure it is working correctly with divs. but how to force the
document.location.hash click it in a iFrame?? so 2 clicks on the same
page (#members_menu1) and third one (submenu1) in to iFrame??

PLEASE HELP! SPEND 3 days already with that!!

here is .js for document.location.hash



$(document).ready( function () {

if (document.location.hash) {
var pnp = document.location.hash.split('_');


$(a[href='+pnp[0]+']).click();

if (pnp[1]) {
$(a[href='+pnp[0]+'_'+pnp[1]+']).click();
}

if (pnp[2]) {
$(a[href='+location.hash+']).click();
}


}
if ($.browser.mozilla) {
$('a').click(function() {
this.blur();
});
}

});


[jQuery] Re: jQuery Quicksearch Plugin Help

2008-11-21 Thread abovegaucho
I see...

All I have there is very basic things

script type=text/javascript
$(document).ready(function () {
$('table tbody tr').quicksearch({
position: 'before',
attached: 'table',
labelText: 'Search the GPI Fuel Product Manuals',
delay: 50
});
})
/script

If i take the delay:50 out I don't get a search box.  Sorry to be such
a pain...

On Nov 21, 11:27 am, Rik Lomas [EMAIL PROTECTED] wrote:
 I meant in the options, so when you do $(...).quicksearch( options );
 there isn't anything other than the basic stuff you need in the object
 you're passing through

 Rik

 2008/11/21 abovegaucho [EMAIL PROTECTED]:



  First I must say that I really like your plugin...and I did go and
  read some other stuff on your site about your latest
  plugin...congrats!

  I have the following options in the jquery.quicksearch.js file...I
  believe that row striping is off...but I am not much of a programmer
  so let me know what I need to do if I haven't done your suggestions.

  ;(function( $ ){
         $.fn.quicksearch = function(options) {

                 options = jQuery.extend({
                         position: 'prepend',
                         attached: 'body',
                         formId: 'quicksearch',
                         labelText: 'Quick Search',
                         labelClass: 'qs_label',
                         inputText: null,
                         inputClass: 'qs_input',
                         loaderId: 'loader',
                         loaderClass: 'loader',
                         loaderImg: null,
                         loaderText: '',
                         stripeRowClass: null,
                         hideElement: null,
                         delay: 500,
                         focusOnLoad: false,
                         onBefore: null,
                         onAfter: null,
                         filter: null,
                         randomElement: 'qs'+Math.floor(Math.random()*100)
                 }, options);

                 var timeout;
                 var cache;
                 var score = {};
                 var el = this;
                 var stripeRowLength = (!is_empty(options.stripeRowClass)) ?
  options.stripeRowClass.length : 0;
                 var doStripe = (stripeRowLength  0) ? true : false;

                 function is_empty (i)
                 {
                         return (i == null || i == undefined || i == false) ? 
  true: false;
                 }

                 function get_cache (el)
                 {
                         cache = 
  $(el).not('.'+options.noResultsClass).map(function(){
                                 return strip_html(normalise(this.innerHTML));
                         });
                 }

                 function normalise (i)
                 {
                         return $.trim(i.toLowerCase().replace(/\n/, 
  '').replace(/\s{2,}/, '
  '));
                 }

                 function get_key()
                 {
                         var input = strip_html(normalise($('input[rel=' +
  options.randomElement + ']').val()));

                         if (typeof options.filter == function) { input = 
  options.filter
  (input); }

                         if (input.indexOf(' ') == -1)
                         {
                                 return input;
                         }
                         else
                         {
                                 return input.split( );
                         }
                 }

                 function test_key(k, value, type)
                 {
                         if (type == string)
                         {
                                 return test_key_string(k, value);
                         }
                         else
                         {
                                 return test_key_arr(k, value);
                         }
                 }

                 function test_key_string(k, value)
                 {
                         return (value.indexOf(k)  -1);
                 }

                 function test_key_arr(k, value)
                 {
                         for (var i = 0; i  k.length; i++) {
                                 var test = value.indexOf(k[i]);
                                 if (test == -1) {
                                         return false;
                                 }
                         }
                         return true;
                 }

                 function strip_html (input)
                 {
                         var regexp = new RegExp(/\[^\]+\/g);
                         var output = input.replace(regexp, );
                         output = output.toLowerCase();
                         return output;
                 }

                 function select_element (el)
                 {
                         if(options.hideElement == grandparent)
                         {
                  

[jQuery] Re: Pause between each()

2008-11-21 Thread d . williams

This works perfectly!

Thanks, Mike!


[jQuery] Re: jQuery Quicksearch Plugin Help

2008-11-21 Thread Rik Lomas

I would increase the delay to something like 1000, that may help performance

I think the problem with taking the delay out is the comma at the end
of the labelText bit, IE doesn't like those missing commas in objects

Rik

2008/11/21 abovegaucho [EMAIL PROTECTED]:
 I see...

 All I have there is very basic things

 script type=text/javascript
 $(document).ready(function () {
 $('table tbody tr').quicksearch({
 position: 'before',
 attached: 'table',
 labelText: 'Search the GPI Fuel Product Manuals',
 delay: 50
});
 })
 /script

 If i take the delay:50 out I don't get a search box.  Sorry to be such
 a pain...

 On Nov 21, 11:27 am, Rik Lomas [EMAIL PROTECTED] wrote:
 I meant in the options, so when you do $(...).quicksearch( options );
 there isn't anything other than the basic stuff you need in the object
 you're passing through

 Rik

 2008/11/21 abovegaucho [EMAIL PROTECTED]:



  First I must say that I really like your plugin...and I did go and
  read some other stuff on your site about your latest
  plugin...congrats!

  I have the following options in the jquery.quicksearch.js file...I
  believe that row striping is off...but I am not much of a programmer
  so let me know what I need to do if I haven't done your suggestions.

  ;(function( $ ){
 $.fn.quicksearch = function(options) {

 options = jQuery.extend({
 position: 'prepend',
 attached: 'body',
 formId: 'quicksearch',
 labelText: 'Quick Search',
 labelClass: 'qs_label',
 inputText: null,
 inputClass: 'qs_input',
 loaderId: 'loader',
 loaderClass: 'loader',
 loaderImg: null,
 loaderText: '',
 stripeRowClass: null,
 hideElement: null,
 delay: 500,
 focusOnLoad: false,
 onBefore: null,
 onAfter: null,
 filter: null,
 randomElement: 
  'qs'+Math.floor(Math.random()*100)
 }, options);

 var timeout;
 var cache;
 var score = {};
 var el = this;
 var stripeRowLength = (!is_empty(options.stripeRowClass)) ?
  options.stripeRowClass.length : 0;
 var doStripe = (stripeRowLength  0) ? true : false;

 function is_empty (i)
 {
 return (i == null || i == undefined || i == false) 
  ? true: false;
 }

 function get_cache (el)
 {
 cache = 
  $(el).not('.'+options.noResultsClass).map(function(){
 return 
  strip_html(normalise(this.innerHTML));
 });
 }

 function normalise (i)
 {
 return $.trim(i.toLowerCase().replace(/\n/, 
  '').replace(/\s{2,}/, '
  '));
 }

 function get_key()
 {
 var input = strip_html(normalise($('input[rel=' +
  options.randomElement + ']').val()));

 if (typeof options.filter == function) { input = 
  options.filter
  (input); }

 if (input.indexOf(' ') == -1)
 {
 return input;
 }
 else
 {
 return input.split( );
 }
 }

 function test_key(k, value, type)
 {
 if (type == string)
 {
 return test_key_string(k, value);
 }
 else
 {
 return test_key_arr(k, value);
 }
 }

 function test_key_string(k, value)
 {
 return (value.indexOf(k)  -1);
 }

 function test_key_arr(k, value)
 {
 for (var i = 0; i  k.length; i++) {
 var test = value.indexOf(k[i]);
 if (test == -1) {
 return false;
 }
 }
 return true;
 }

 function strip_html (input)
 {
 var regexp = new RegExp(/\[^\]+\/g);
 var output = input.replace(regexp, );
   

[jQuery] Re: Crazy tables with checkboxes

2008-11-21 Thread c.barr

err, correction to what I wrote, shift-selection only works when
selecting top to bottom, not the other way around.


[jQuery] Re: Tablesorter pager and ajax

2008-11-21 Thread Balazs Endresz

http://tablesorter.com/docs/example-ajax.html

inside the callback (the third argument for .load )
// let the plugin know that we made a update
$(table).trigger(update);


On Nov 21, 5:43 pm, led [EMAIL PROTECTED] wrote:
 I've noted that tablesorter and the pager don't work in ajax response
 such as the content returned in the jquery load(), with or without
 previous Table tags
 How can i fix this .
 See this demo of the problem in  http://realferias.com/pager.asp


[jQuery] detect element width change

2008-11-21 Thread Adam

How can I detect when an element's width (or height) has changed?  For
instance, on a div element.


[jQuery] Re: detect element width change

2008-11-21 Thread MorningZ

Check out:

http://www.west-wind.com/Weblog/posts/478985.aspx



On Nov 21, 1:45 pm, Adam [EMAIL PROTECTED] wrote:
 How can I detect when an element's width (or height) has changed?  For
 instance, on a div element.


[jQuery] smoother .animate()?

2008-11-21 Thread bnlps


Hi, kids --

there's a nice Flash site ... marcecko dot com ( especially, the
window-content-movement, mouse.x/y)

... ported to html/jQ, but couldn't find a way to realise the smooth
sliding part while moving; it's f'd, scratchy.
any solutions? or, a Flash-only thing?

thanks!
-B


now, have a look:
(tested on FF3, IE7 -- XP)
-

!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://
www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd


html xmlns=http://www.w3.org/1999/xhtml; lang=en xml:lang=en

head

titlejQx/title

meta http-equiv=content-type content=text/html;charset=utf-8/

style type=text/css media=all
!--
html{width:100%;height:100%;overflow:hidden;}
body,div{margin:0;padding:0;}
div{position:absolute;left:0px;top:0px;width:1600px;height:1200px;}
span{position:absolute;}
--
/style



script type=text/javascript src=http://jqueryjs.googlecode.com/
files/jquery-1.2.6.min.js/script


script type=text/javascript
//![CDATA[

var mx,my;

$(function(){

$().mousemove(function(e){

  mx=$(window).width();
  mx=Math.ceil((-e.pageX/mx*(16E2-mx)));

  my=$(window).height();
  my=Math.ceil((-e.pageY/my*(12E2-my)));

  $('#k').dequeue().animate({left:mx,top:my,duration:1}); // !

  //$('#k').css({left:mx,top:my}); ... 1:1

});

});


//]]
/script


/head



body

div id=k
span style=top:0px;left:0px;height:50px;width:50px;background-
color:#cff;/span
span style=bottom:0px;left:1550px;height:50px;width:50px;background-
color:#e10;/span
span style=top:0px;left:1550px;height:50px;width:50px;background-
color:#0cc;/span
span style=top:1150px;left:0px;height:50px;width:50px;background-
color:#3fa;/span
span style=top:50px;left:300px;height:100px;width:300px;background-
color:#333;/span
span style=top:300px;left:200px;height:700px;width:150px;background-
color:#f6c;/span
span style=top:500px;left:400px;height:500px;width:850px;background-
color:#aba;/span
span style=top:300px;left:600px;height:100px;width:950px;background-
color:#ff0;/span
/div

/body


/html


[jQuery] Re: A better way

2008-11-21 Thread Brendan

Very good to know! Now I know what to look for :)

On Nov 20, 6:11 pm, Dave Methvin [EMAIL PROTECTED] wrote:
  I was looking at the jQuery docs for toggle here
   http://docs.jquery.com/Events/toggle

 The toggle() without any arguments implements show/hide functionality,
 so it's in the Effects section:

 http://docs.jquery.com/Effects/toggle

 There are a few other words that overlap like this, such as .load()
 which either loads some content via ajax or sets an onload handler,
 depending on its arguments.


[jQuery] Simple Validate if empty

2008-11-21 Thread coughlinsmyalias

Hey,

I have been trying to look for a simple way to validate one field, if
its empty then do X, how would I check? I have this:

term = $('#term').attr('value');

Would I check if term is empty? Then don't allow the submit, my code
is here: http://pastie.org/320870

Any thoughts?

Thanks,

Ryan


[jQuery] Plucking values from multiple inputs at once

2008-11-21 Thread Hector Virgen
From what I undstand, jQuery#val() returns the value of the first matched
element.

Sample HTML:

input type=hidden name=test[] value=foo /
input type=hidden name=test[] value=bar /

$('input[type=hidden][name=test\[\]]').val(); // returns foo

Is there an easy way to get an array of values from all of the elements that
matched the selector?

So far I have this, but I'd like to reduce this to a jQuery method if there
is one:

var values = [];
$('input[type=hidden][name=test\[\]]').each(function()
{
values.push($(this).val());
});

console.log(values); // [foo, bar]

-Hector


[jQuery] ajaxForm Error: Permission denied to call method Location.toString

2008-11-21 Thread Tolis Christomanos
Hi all,

I have this form

http://www.fares.gr/tests/well_fares_form/

And i am trying to load the server response to a div in the same page but i
get the Permission denied to call method Location.toString

Any ideas?


[jQuery] Re: jQuery Quicksearch Plugin Help

2008-11-21 Thread abovegaucho
Rik that worked!  The only thing that I can't seem to explain is why I
get a box that reads:

A script on this page may be busy, or it may have stopped responding.
You can stop the script now, or you can continue to see if the script
will complete.

Script: http://localhost/sort/js/jquery-1.2.6.pack.js:11;

Only inf FireFox?  Any suggestions?


On Nov 21, 11:42 am, Rik Lomas [EMAIL PROTECTED] wrote:
 I would increase the delay to something like 1000, that may help performance

 I think the problem with taking the delay out is the comma at the end
 of the labelText bit, IE doesn't like those missing commas in objects

 Rik

 2008/11/21 abovegaucho [EMAIL PROTECTED]:

  I see...

  All I have there is very basic things

  script type=text/javascript
  $(document).ready(function () {
  $('table tbody tr').quicksearch({
  position: 'before',
  attached: 'table',
  labelText: 'Search the GPI Fuel Product Manuals',
  delay: 50
                         });
  })
  /script

  If i take the delay:50 out I don't get a search box.  Sorry to be such
  a pain...

  On Nov 21, 11:27 am, Rik Lomas [EMAIL PROTECTED] wrote:
  I meant in the options, so when you do $(...).quicksearch( options );
  there isn't anything other than the basic stuff you need in the object
  you're passing through

  Rik

  2008/11/21 abovegaucho [EMAIL PROTECTED]:

   First I must say that I really like your plugin...and I did go and
   read some other stuff on your site about your latest
   plugin...congrats!

   I have the following options in the jquery.quicksearch.js file...I
   believe that row striping is off...but I am not much of a programmer
   so let me know what I need to do if I haven't done your suggestions.

   ;(function( $ ){
          $.fn.quicksearch = function(options) {

                  options = jQuery.extend({
                          position: 'prepend',
                          attached: 'body',
                          formId: 'quicksearch',
                          labelText: 'Quick Search',
                          labelClass: 'qs_label',
                          inputText: null,
                          inputClass: 'qs_input',
                          loaderId: 'loader',
                          loaderClass: 'loader',
                          loaderImg: null,
                          loaderText: '',
                          stripeRowClass: null,
                          hideElement: null,
                          delay: 500,
                          focusOnLoad: false,
                          onBefore: null,
                          onAfter: null,
                          filter: null,
                          randomElement: 
   'qs'+Math.floor(Math.random()*100)
                  }, options);

                  var timeout;
                  var cache;
                  var score = {};
                  var el = this;
                  var stripeRowLength = (!is_empty(options.stripeRowClass)) 
   ?
   options.stripeRowClass.length : 0;
                  var doStripe = (stripeRowLength  0) ? true : false;

                  function is_empty (i)
                  {
                          return (i == null || i == undefined || i == 
   false) ? true: false;
                  }

                  function get_cache (el)
                  {
                          cache = 
   $(el).not('.'+options.noResultsClass).map(function(){
                                  return 
   strip_html(normalise(this.innerHTML));
                          });
                  }

                  function normalise (i)
                  {
                          return $.trim(i.toLowerCase().replace(/\n/, 
   '').replace(/\s{2,}/, '
   '));
                  }

                  function get_key()
                  {
                          var input = strip_html(normalise($('input[rel=' +
   options.randomElement + ']').val()));

                          if (typeof options.filter == function) { input 
   = options.filter
   (input); }

                          if (input.indexOf(' ') == -1)
                          {
                                  return input;
                          }
                          else
                          {
                                  return input.split( );
                          }
                  }

                  function test_key(k, value, type)
                  {
                          if (type == string)
                          {
                                  return test_key_string(k, value);
                          }
                          else
                          {
                                  return test_key_arr(k, value);
                          }
                  }

                  function test_key_string(k, value)
                  {
                          return (value.indexOf(k)  -1);
                  }

                  function test_key_arr(k, value)
                  {
                     

[jQuery] Re: has anyone come across a plugin like this ?

2008-11-21 Thread heysatan

jBreadCrumb RELEASED

Hi all, I've put the breadcrumb plugin up on jquery's site:

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

Here's a link to the working example (also linked to from the jquery
page)

http://www.comparenetworks.com/developers/jqueryplugins/jbreadcrumb.html

Let me know what you think, there are some improvements that can be
made for sure.  It's decently smart but I think I will improve the
collapsing algorithm to know what it needs to collapse based on
individual elements width.

Oh, and it's compatible with ie 6, ie 7 and all standards compliant
browsers.

Thanks,

Jason


On Nov 20, 6:14 pm, heysatan [EMAIL PROTECTED] wrote:
 I am just finishing up version 0.1, it will be up tomorrow morning
 (Pacific time).

 On Nov 18, 2:04 pm, yvonney [EMAIL PROTECTED] wrote:

  Oh YES!!! that WOULD be fabulous I know how busy life gets of
  course... Jason! when you have time we'd all love to play with a
  plugin version I bet!

  best wishes

  On Nov 11, 2:32 pm, Andy Matthews [EMAIL PROTECTED] wrote:

   I'd be interested in this as a plugin as well.

   On Nov 11, 4:21 pm, heysatan [EMAIL PROTECTED] wrote:

That's a start.

On Nov 10, 4:13 pm, Microbe [EMAIL PROTECTED] wrote:

 Demand # 1

 :o)

 On Nov 11, 8:57 am, heysatan [EMAIL PROTECTED] wrote:

  Hi Sean,

  I built this breadcrumb animation.  Due to time limitations at the 
  end
  of the project I wasn't able to make it into a plugin (I built a lot
  of other plugins for this project), but I'd like to when I get a
  chance.

  I really solved a problem for us because our category and page 
  titles
  are so long (scientists are long winded).  Before we would show 
  only a
  couple of steps in the HTML to get around this.  This method was 
  more
  SEO friendly, more usable, and I thought, kind of cool.

  If there is a demand for it I'll work on porting it to a plugin, but
  probably not for the next 2 weeks or so.

  Jason
  Lead UI Developer - CompareNetworks

  On Nov 10, 1:21 am, CliffordSean [EMAIL PROTECTED] wrote:

   see the breadcrumb on here 
   :http://www.biocompare.com/ProductDetails/386912/1/Mutation-Generation...
   has anyone come across a plugin like this ?

   tnx
   sean
   --
   View this message in 
   context:http://www.nabble.com/has-anyone-come-across-a-plugin-like-this---tp2...
   Sent from the jQuery General Discussion mailing list archive at 
   Nabble.com.


[jQuery] Re: Crazy tables with checkboxes

2008-11-21 Thread c.barr

It seems jsbin.com is down right now, so I've uploaded it to my site:
http://chris-barr.com/files/checkboxes/
source: http://chris-barr.com/files/checkboxes/DTcheckboxes.js

Also, I've fixed the issue with shift-selection, but the other
problems still remain.

On Nov 21, 12:01 pm, c.barr [EMAIL PROTECTED] wrote:
 err, correction to what I wrote, shift-selection only works when
 selecting top to bottom, not the other way around.


[jQuery] Cycle plugin: using two #next controllers

2008-11-21 Thread Garreth

Hi.

Im trying build a gallery using the wonderful jquery cycle plugin.
Everything works fine, Im just wondering if it is possible to use two
next controllers. One next controller on image-click, and one using a
link  (a href= id=next )

I can use them one at a time, but when I try them together only one of
them works: Here is my code:

$('#slideshow').cycle({
fx: 'fade',
speed:  '2000',
timeout: 0,
pager:  '#nav',
next:'#slideshow', // Change the image when user clicks on image
next:'#next', // Change the image when user clicks on the next 
link
prev:'#previous',
pagerAnchorBuilder: function(idx, slide) {
// return selector string for existing anchor
return '#nav li:eq(' + idx + ') a';
}
});

Is there some way to do this, or do I have to duplicate the next code,
inside the plugin script, to achieve this?

Regards


[jQuery] Removing selector a

2008-11-21 Thread adrianopons

Hello everyine!

I have a grid with some links on it. I need to copy the object to a
var and remove the selector a when I click on a button.

How can I do it?

Thanks!


[jQuery] Cycle plugin: using two #next controllers

2008-11-21 Thread Garreth


Hi!


Im trying to build a gallery using the wonderful cycle plugin. Everything
works fine, Im just wondering if it is possible to use to next intances? One
next controller on the image, and another one on a link (a href=#
id=next)

Here is my code:

$('#slideshow').cycle({ 
fx: 'fade', 
speed:  '2000', 
timeout: 0, 
pager:  '#nav',
next:'#slideshow', //Changes the image when user clicks inside 
the
slideshow div
next:'#next', //Changes the image when user clicks on the link
prev:'#previous',
pagerAnchorBuilder: function(idx, slide) { 
// return selector string for existing anchor 
return '#nav li:eq(' + idx + ') a'; 
} 
}); 

Is there any way to do this, or do I have to copy the next function inside
the plugin to achieve this?

Regards
-- 
View this message in context: 
http://www.nabble.com/Cycle-plugin%3A-using-two--next-controllers-tp20628984s27240p20628984.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] jQuery XHR problems with safari 3.2

2008-11-21 Thread Ronnyek

Ok, I've tried a number of grids including flexigrid, and jqgrid, and
both fail to load via ajax, and json...

I know things are next to impossible to troubleshoot, but the
developer menu stuff shows error on line 2699 of jquery-1.2.6.js
and the error is permission denied.

Both grids worked flawless in chrome, ie, ff but safari on mac broke.
Any ideas?


[jQuery] jCarousel (by Jan Sorgalla) scrolling integer problem

2008-11-21 Thread [EMAIL PROTECTED]

I am using Jan Sorgalla's jcarousel, and it seems that the integer for
the scroll doesn't really work. No matter what I do, or set it to, it
always scrolls/advances by 3 frames.

scroll  integer 3   The number of items to scroll by.

If I set the above to 1 or 100, it always scrolls by three.

Here is a test link:
http://brandaiddesignco.com/jcarousel/jcarousel.html

Any advice? I REALLY would appreciate it. Unfortunately, Jan has
eliminated post responses on his tutorial page for this where he
created it.


[jQuery] autocomplete and google toolbar autofill conflict

2008-11-21 Thread jjh

I have been on this issue for the past 24hrs and I can't seem to find
the solution. There seems to be a conflict between the jQuery
autocomplete plug-in (http://bassistance.de/jquery-plugins/jquery-
plugin-autocomplete/) and google toolbar's autofill function. I'm
testing this in IE 7. What really confuses me is that the result is
inconsistent. Sometimes the results will show and sometime it doesn't.

The problem is that when autofill is enabled, it makes the input field
(with autocomplete) loose focus while I'm entering my triggering key
stroke (minChars was set to 3). This triggers the onBlur event in the
autocomplete plug-in and the result will be hidden.

My JS Code:
var autocompleteUrl = airport_list.php?q=60limit=10;
var autocompleteSettingsObj = {
minChars:3,
width: 300,
scrollHeight: 350,
formatResult: function(data, i, total) { return (data  data.length
 1) ? data[2] : ' '; }
};
//setup autocomplete
$(#myInput).autocomplete(autocompleteUrl, autocompleteSettingsObj);

My HTML Code:
input type=text name=formname id=myInput value= size=30
maxlength=50 class=myclass autocomplete=off /

Note: Firefox works fine.

Thanks in advance.


[jQuery] newbie wanting to get started

2008-11-21 Thread H-man

I am in charge of a high school website using Dreamweaver 8. I ran
across jquery tabs one day.  It looks cool and I would like to use it
but have no javascript experience.  Anyone willing to help?  I really
have no idea how to get started.  I download jquery and then what?

Thanks,
H-man


[jQuery] autocomplete and google toolbar autofill conflict

2008-11-21 Thread jjh

I have been on this issue for the past 24hrs and I can't seem to find
the solution. There seems to be a conflict between the jQuery
autocomplete plug-in (http://bassistance.de/jquery-plugins/jquery-
plugin-autocomplete/) and google toolbar's autofill function. I'm
testing this in IE 7. What really confuses me is that the result is
inconsistent. Sometimes the results will show and sometime it doesn't.

The problem is that when autofill is enabled, it makes the input field
(with autocomplete) loose focus while I'm entering my triggering key
stroke (minChars was set to 3). This triggers the onBlur event in the
autocomplete plug-in and the result will be hidden.

My JS Code:
var autocompleteUrl = airport_list.php?q=60limit=10;
var autocompleteSettingsObj = {
minChars:3,
width: 300,
scrollHeight: 350,
formatResult: function(data, i, total) { return (data  data.length
 1) ? data[2] : ' '; }
};
//setup autocomplete
$(#myInput).autocomplete(autocompleteUrl, autocompleteSettingsObj);

My HTML Code:
input type=text name=formname id=myInput value= size=30
maxlength=50 class=myclass autocomplete=off /

Note: Firefox works fine.

Thanks in advance.


[jQuery] Re: Cycle plugin: using two #next controllers

2008-11-21 Thread Mike Alsup

 I can use them one at a time, but when I try them together only one of
 them works: Here is my code:

         $('#slideshow').cycle({
                 fx:     'fade',
                 speed:  '2000',
                 timeout: 0,
                 pager:  '#nav',
                 next:'#slideshow', // Change the image when user clicks on 
 image
                 next:'#next', // Change the image when user clicks on the 
 next link
                 prev:'#previous',
                 pagerAnchorBuilder: function(idx, slide) {
                         // return selector string for existing anchor
                         return '#nav li:eq(' + idx + ') a';
                 }
         });


The 'next' option takes a normal jQuery selector, so you can just do
this:

next: '#slideshow, #next',
prev: '#previous',




[jQuery] Re: newbie wanting to get started

2008-11-21 Thread Youssef EL ALAOUI
Hi,

You can get started by having a look @ :
http://www.jcargoo.org/2008/10/you-said-jquery-yes-we-love-it.html.

Regards,
--
Youssef ELALAOUI
JCargoo Founder
www.jcargoo.org


Pensez à l'environnement avant d'imprimer ce message / Think of the
environment before printing out this message


On Fri, Nov 21, 2008 at 8:34 PM, H-man [EMAIL PROTECTED] wrote:


 I am in charge of a high school website using Dreamweaver 8. I ran
 across jquery tabs one day.  It looks cool and I would like to use it
 but have no javascript experience.  Anyone willing to help?  I really
 have no idea how to get started.  I download jquery and then what?

 Thanks,
 H-man



[jQuery] Re: jQuery Quicksearch Plugin Help

2008-11-21 Thread Rik Lomas

That's due to the script taking too much time to parse the
information, it's just one of those things that will happen when you
have such a large data set to iterate over

Rik


2008/11/21 abovegaucho [EMAIL PROTECTED]:
 Rik that worked!  The only thing that I can't seem to explain is why I
 get a box that reads:

 A script on this page may be busy, or it may have stopped responding.
 You can stop the script now, or you can continue to see if the script
 will complete.

 Script: http://localhost/sort/js/jquery-1.2.6.pack.js:11;

 Only inf FireFox?  Any suggestions?


 On Nov 21, 11:42 am, Rik Lomas [EMAIL PROTECTED] wrote:
 I would increase the delay to something like 1000, that may help performance

 I think the problem with taking the delay out is the comma at the end
 of the labelText bit, IE doesn't like those missing commas in objects

 Rik

 2008/11/21 abovegaucho [EMAIL PROTECTED]:

  I see...

  All I have there is very basic things

  script type=text/javascript
  $(document).ready(function () {
  $('table tbody tr').quicksearch({
  position: 'before',
  attached: 'table',
  labelText: 'Search the GPI Fuel Product Manuals',
  delay: 50
 });
  })
  /script

  If i take the delay:50 out I don't get a search box.  Sorry to be such
  a pain...

  On Nov 21, 11:27 am, Rik Lomas [EMAIL PROTECTED] wrote:
  I meant in the options, so when you do $(...).quicksearch( options );
  there isn't anything other than the basic stuff you need in the object
  you're passing through

  Rik

  2008/11/21 abovegaucho [EMAIL PROTECTED]:

   First I must say that I really like your plugin...and I did go and
   read some other stuff on your site about your latest
   plugin...congrats!

   I have the following options in the jquery.quicksearch.js file...I
   believe that row striping is off...but I am not much of a programmer
   so let me know what I need to do if I haven't done your suggestions.

   ;(function( $ ){
  $.fn.quicksearch = function(options) {

  options = jQuery.extend({
  position: 'prepend',
  attached: 'body',
  formId: 'quicksearch',
  labelText: 'Quick Search',
  labelClass: 'qs_label',
  inputText: null,
  inputClass: 'qs_input',
  loaderId: 'loader',
  loaderClass: 'loader',
  loaderImg: null,
  loaderText: '',
  stripeRowClass: null,
  hideElement: null,
  delay: 500,
  focusOnLoad: false,
  onBefore: null,
  onAfter: null,
  filter: null,
  randomElement: 
   'qs'+Math.floor(Math.random()*100)
  }, options);

  var timeout;
  var cache;
  var score = {};
  var el = this;
  var stripeRowLength = 
   (!is_empty(options.stripeRowClass)) ?
   options.stripeRowClass.length : 0;
  var doStripe = (stripeRowLength  0) ? true : false;

  function is_empty (i)
  {
  return (i == null || i == undefined || i == 
   false) ? true: false;
  }

  function get_cache (el)
  {
  cache = 
   $(el).not('.'+options.noResultsClass).map(function(){
  return 
   strip_html(normalise(this.innerHTML));
  });
  }

  function normalise (i)
  {
  return $.trim(i.toLowerCase().replace(/\n/, 
   '').replace(/\s{2,}/, '
   '));
  }

  function get_key()
  {
  var input = strip_html(normalise($('input[rel=' 
   +
   options.randomElement + ']').val()));

  if (typeof options.filter == function) { input 
   = options.filter
   (input); }

  if (input.indexOf(' ') == -1)
  {
  return input;
  }
  else
  {
  return input.split( );
  }
  }

  function test_key(k, value, type)
  {
  if (type == string)
  {
  return test_key_string(k, value);
  }
  else
  {
  return test_key_arr(k, value);
  }
  }

 

[jQuery] Jquery Forms plugin and fileupload

2008-11-21 Thread cambazz

Hello,

I am using the file upload capacities of the form plugin successfully.
However I could not find how to do two things.

The first one, is how can one cancel an upload while upload is in
progress.

The second one is the progress indicator. I am using commons file
upload, so I can calculate how much of file is left, and I can append
this to servlets output.

However, I could not figure out how to get this servlets output and
turn it into a progress bar, using the form plugin.

Best Regards,
-C.B.


[jQuery] Re: jQuery Quicksearch Plugin Help

2008-11-21 Thread abovegaucho
Good to know...again thanks for helping me with this. Hope you have a
good rest of today.

On Nov 21, 2:53 pm, Rik Lomas [EMAIL PROTECTED] wrote:
 That's due to the script taking too much time to parse the
 information, it's just one of those things that will happen when you
 have such a large data set to iterate over

 Rik

 2008/11/21 abovegaucho [EMAIL PROTECTED]:

  Rik that worked!  The only thing that I can't seem to explain is why I
  get a box that reads:

  A script on this page may be busy, or it may have stopped responding.
  You can stop the script now, or you can continue to see if the script
  will complete.

  Script:http://localhost/sort/js/jquery-1.2.6.pack.js:11;

  Only inf FireFox?  Any suggestions?

  On Nov 21, 11:42 am, Rik Lomas [EMAIL PROTECTED] wrote:
  I would increase the delay to something like 1000, that may help 
  performance

  I think the problem with taking the delay out is the comma at the end
  of the labelText bit, IE doesn't like those missing commas in objects

  Rik

  2008/11/21 abovegaucho [EMAIL PROTECTED]:

   I see...

   All I have there is very basic things

   script type=text/javascript
   $(document).ready(function () {
   $('table tbody tr').quicksearch({
   position: 'before',
   attached: 'table',
   labelText: 'Search the GPI Fuel Product Manuals',
   delay: 50
                          });
   })
   /script

   If i take the delay:50 out I don't get a search box.  Sorry to be such
   a pain...

   On Nov 21, 11:27 am, Rik Lomas [EMAIL PROTECTED] wrote:
   I meant in the options, so when you do $(...).quicksearch( options );
   there isn't anything other than the basic stuff you need in the object
   you're passing through

   Rik

   2008/11/21 abovegaucho [EMAIL PROTECTED]:

First I must say that I really like your plugin...and I did go and
read some other stuff on your site about your latest
plugin...congrats!

I have the following options in the jquery.quicksearch.js file...I
believe that row striping is off...but I am not much of a programmer
so let me know what I need to do if I haven't done your suggestions.

;(function( $ ){
       $.fn.quicksearch = function(options) {

               options = jQuery.extend({
                       position: 'prepend',
                       attached: 'body',
                       formId: 'quicksearch',
                       labelText: 'Quick Search',
                       labelClass: 'qs_label',
                       inputText: null,
                       inputClass: 'qs_input',
                       loaderId: 'loader',
                       loaderClass: 'loader',
                       loaderImg: null,
                       loaderText: '',
                       stripeRowClass: null,
                       hideElement: null,
                       delay: 500,
                       focusOnLoad: false,
                       onBefore: null,
                       onAfter: null,
                       filter: null,
                       randomElement: 
'qs'+Math.floor(Math.random()*100)
               }, options);

               var timeout;
               var cache;
               var score = {};
               var el = this;
               var stripeRowLength = 
(!is_empty(options.stripeRowClass)) ?
options.stripeRowClass.length : 0;
               var doStripe = (stripeRowLength  0) ? true : false;

               function is_empty (i)
               {
                       return (i == null || i == undefined || i == 
false) ? true: false;
               }

               function get_cache (el)
               {
                       cache = 
$(el).not('.'+options.noResultsClass).map(function(){
                               return 
strip_html(normalise(this.innerHTML));
                       });
               }

               function normalise (i)
               {
                       return $.trim(i.toLowerCase().replace(/\n/, 
'').replace(/\s{2,}/, '
'));
               }

               function get_key()
               {
                       var input = 
strip_html(normalise($('input[rel=' +
options.randomElement + ']').val()));

                       if (typeof options.filter == function) { 
input = options.filter
(input); }

                       if (input.indexOf(' ') == -1)
                       {
                               return input;
                       }
                       else
                       {
                               return input.split( );
                       }
               }

               function test_key(k, value, type)
               {
                       if (type == string)
                       {
            

[jQuery] Re: jCarousel (by Jan Sorgalla) scrolling integer problem

2008-11-21 Thread [EMAIL PROTECTED]

Nevermind,

I was able to dig this up from Jan on another post and it fixed my
problem. It was inline on the actual html page, and not controlled by
the js file that is referenced. I still don't understand why the
document that is referenced doesn't control the scrolling, but hey,
I'm a newbie!!

jQuery('#mycarousel').jcarousel({
scroll: 1,
itemFirstInCallback: {onAfterAnimation:
mycarousel_itemFirstInCallback}
});


[jQuery] Re: has anyone come across a plugin like this ?

2008-11-21 Thread Rick Faircloth


Very nice, Jason!

I'll put that one to use!

Rick

heysatan wrote:

jBreadCrumb RELEASED

Hi all, I've put the breadcrumb plugin up on jquery's site:

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

Here's a link to the working example (also linked to from the jquery
page)

http://www.comparenetworks.com/developers/jqueryplugins/jbreadcrumb.html

Let me know what you think, there are some improvements that can be
made for sure.  It's decently smart but I think I will improve the
collapsing algorithm to know what it needs to collapse based on
individual elements width.

Oh, and it's compatible with ie 6, ie 7 and all standards compliant
browsers.

Thanks,

Jason


  



[jQuery] Writing a plugin

2008-11-21 Thread halcyonandon

Hi,

I'm new to JQuery, but I need to convert some regular, working,
javascript code into a JQuery plugin.  I'll need to expand on this
code once its in plugin form, but for now its just converting this
existing code into a working JQuery plugin.  I've reviewed the
documentation on plugin authoring, but it doesnt give a lot of
examples.

I was hoping someone could show me how a snippet of my code would look
as a JQuery plugin to put me on the right track.

function initTabs() {
if (document.getElementById  document.createTextNode) {
var n = document.getElementById('tbs');
var as = n.getElementsByTagName(a);
for (var i = 0; i  as.length; i++) {
as[i].onclick = function() {
showTab(this);
return false;
};
as[i].onfocus = function() {
this.blur();
};
if (i == 0)
currentLink = as[i];
}
if (document.getElementById(currentTab)) {
document.getElementById(currentTab).style.display =
'block';
}
}
}

Thank you for your time.


[jQuery] [offtopic] can you perhaps tell why this page doesnt show in firefox?

2008-11-21 Thread Rene Veerman


This page displays fine in IE, opera and safari.
But not in firefox :(

http://tevlar.net/mytevlar/

any clues greatly appreciated..

--
--
Rene Veerman, creator of web2.5 CMS http://mediabeez.ws/ 



[jQuery] Re: Writing a plugin

2008-11-21 Thread Hector Virgen
You should take a look at jQuery's built-in tabs plugin. It may already do
what you're looking for.

http://docs.jquery.com/UI/Tabs

-Hector


On Fri, Nov 21, 2008 at 1:44 PM, halcyonandon [EMAIL PROTECTED] wrote:


 Hi,

 I'm new to JQuery, but I need to convert some regular, working,
 javascript code into a JQuery plugin.  I'll need to expand on this
 code once its in plugin form, but for now its just converting this
 existing code into a working JQuery plugin.  I've reviewed the
 documentation on plugin authoring, but it doesnt give a lot of
 examples.

 I was hoping someone could show me how a snippet of my code would look
 as a JQuery plugin to put me on the right track.

 function initTabs() {
if (document.getElementById  document.createTextNode) {
var n = document.getElementById('tbs');
var as = n.getElementsByTagName(a);
for (var i = 0; i  as.length; i++) {
as[i].onclick = function() {
showTab(this);
return false;
};
as[i].onfocus = function() {
this.blur();
};
if (i == 0)
currentLink = as[i];
}
if (document.getElementById(currentTab)) {
document.getElementById(currentTab).style.display =
 'block';
}
}
 }

 Thank you for your time.



[jQuery] Re: Jquery Forms plugin and fileupload

2008-11-21 Thread Mike Alsup

 The first one, is how can one cancel an upload while upload is in
 progress.

You can cancel an upload by invoking the abort method on the XHR
object (assuming you have the latest version of the form plugin,
v2.17).   To get a ref to the XHR you can either use the global
'ajaxSend' event handler or the local 'beforeSend' callback property.

Here's a demo:

http://jquery.malsup.com/form/file-upload-cancel.html

Mike



 The second one is the progress indicator. I am using commons file
 upload, so I can calculate how much of file is left, and I can append
 this to servlets output.

 However, I could not figure out how to get this servlets output and
 turn it into a progress bar, using the form plugin.

 Best Regards,
 -C.B.


[jQuery] Re: Cluetip Title displaying in FF and IE

2008-11-21 Thread jmueller0823

Okay.
Looks like this is what's happening (in WordPress)

1. Using a text link, ClueTip works perfectly.
2. If using an image, the title displays when hovering the image.

Ideas anyone?  Thanks.



On Nov 20, 3:22 pm, jmueller0823 [EMAIL PROTECTED] wrote:
 This is installed in Wordpress, wondering if WP default styles are
 causing issue?
 Otherwise, Cluetip works fine.

 Testing outside of Wordpress did not have this issue.

 Thanks!

 Jim


[jQuery] Re: Writing a plugin

2008-11-21 Thread Rik Lomas

I found this to be the best example of how to structure a plug-in:

http://www.learningjquery.com/2007/10/a-plugin-development-pattern

Rik


2008/11/21 Hector Virgen [EMAIL PROTECTED]:
 You should take a look at jQuery's built-in tabs plugin. It may already do
 what you're looking for.
 http://docs.jquery.com/UI/Tabs
 -Hector


 On Fri, Nov 21, 2008 at 1:44 PM, halcyonandon [EMAIL PROTECTED] wrote:

 Hi,

 I'm new to JQuery, but I need to convert some regular, working,
 javascript code into a JQuery plugin.  I'll need to expand on this
 code once its in plugin form, but for now its just converting this
 existing code into a working JQuery plugin.  I've reviewed the
 documentation on plugin authoring, but it doesnt give a lot of
 examples.

 I was hoping someone could show me how a snippet of my code would look
 as a JQuery plugin to put me on the right track.

 function initTabs() {
if (document.getElementById  document.createTextNode) {
var n = document.getElementById('tbs');
var as = n.getElementsByTagName(a);
for (var i = 0; i  as.length; i++) {
as[i].onclick = function() {
showTab(this);
return false;
};
as[i].onfocus = function() {
this.blur();
};
if (i == 0)
currentLink = as[i];
}
if (document.getElementById(currentTab)) {
document.getElementById(currentTab).style.display =
 'block';
}
}
 }

 Thank you for your time.





-- 
Rik Lomas
http://rikrikrik.com


[jQuery] Getting all checked check boxes with a certain id

2008-11-21 Thread Rage9

I'm trying to get the values of all checked check boxes in a certain
section of a page.  Each of the check boxes has the same id, I could
just as easily make it a class or whatnot.

I'm using something like:
var valArray = $('#' + id + ' input:checkbox').serializeArray();

Although I know the above isn't right, what is the proper query to do
this?

Thanks in advance.


[jQuery] Re: Writing a plugin

2008-11-21 Thread halcyonandon

Oh no that function was just a snippet from something working well, im
not writing this for tab functionality, but rather, for a reusable
widget... I'm just wondering what this function would look like
converted into jQuery as a reference for everything else involved.  I
arbitrarily selected that function for the example.


[jQuery] Re: Getting all checked check boxes with a certain id

2008-11-21 Thread Mike Alsup

 I'm trying to get the values of all checked check boxes in a certain
 section of a page.  Each of the check boxes has the same id, I could
 just as easily make it a class or whatnot.

 I'm using something like:
 var valArray = $('#' + id + ' input:checkbox').serializeArray();

 Although I know the above isn't right, what is the proper query to do
 this?

First, you should never, ever, have more than one element on the page
with the same ID.  That is the whole point of IDs, they are unique
identifiers.  Your hunch to use classes instead is a good one.  Once
you've changed the IDs to classes, you just use normal CSS selector
syntax to find them in the DOM.  For example, if you give them the
class of 'test', you would select them like this:

$('.test')

or like this for improved performance:

$('input.test')

Of course if you've used that class name on other controls as well you
can narrow the selection to just your checkboxes like this:

$('input.test:checkbox')

Mike




[jQuery] Clickable DIV possible?

2008-11-21 Thread lukas

Is it possible to click or select a DIV with jquery?

$(DIV ID or Class?).click(function() { .


[jQuery] Re: Writing a plugin

2008-11-21 Thread halcyonandon


oh wow, this was a nice comment someone left... helpful...

(function($) {
// Private Variables and Functions
var privateVariable = {};
function privateFunction() {
};

// Public Variables and Methods
$.namespace = {
options: {},
publicVariable: [];
publicMethod: function() {}
};

// Prototype Methods
$.fn.extend({
usernameMethod: function() {
return this.each(function() {
// Persistent Context Variables
this.contextVariable = 'foo';
}
}.
unusernameMethod: function() {
return this.each(function() {
delete this.contextVariable;
}
}
});

//Initialization Code
$(function() {
});
})(jQuery);


On Nov 21, 2:10 pm, Rik Lomas [EMAIL PROTECTED] wrote:
 I found this to be the best example of how to structure a plug-in:

 http://www.learningjquery.com/2007/10/a-plugin-development-pattern

 Rik

 2008/11/21 Hector Virgen [EMAIL PROTECTED]:



  You should take a look at jQuery's built-in tabs plugin. It may already do
  what you're looking for.
 http://docs.jquery.com/UI/Tabs
  -Hector

  On Fri, Nov 21, 2008 at 1:44 PM, halcyonandon [EMAIL PROTECTED] wrote:

  Hi,

  I'm new to JQuery, but I need to convert some regular, working,
  javascript code into a JQuery plugin.  I'll need to expand on this
  code once its in plugin form, but for now its just converting this
  existing code into a working JQuery plugin.  I've reviewed the
  documentation on plugin authoring, but it doesnt give a lot of
  examples.

  I was hoping someone could show me how a snippet of my code would look
  as a JQuery plugin to put me on the right track.

  function initTabs() {
     if (document.getElementById  document.createTextNode) {
         var n = document.getElementById('tbs');
         var as = n.getElementsByTagName(a);
         for (var i = 0; i  as.length; i++) {
             as[i].onclick = function() {
                 showTab(this);
                 return false;
             };
             as[i].onfocus = function() {
                 this.blur();
             };
             if (i == 0)
                 currentLink = as[i];
         }
         if (document.getElementById(currentTab)) {
             document.getElementById(currentTab).style.display =
  'block';
         }
     }
  }

  Thank you for your time.

 --
 Rik Lomashttp://rikrikrik.com


[jQuery] Re: Clickable DIV possible?

2008-11-21 Thread Hector Virgen
Yes. Any element on the page will respond to click events, except for
disabled form inputs.
$('div#myDiv').click(function()
{
alert('myDiv was clicked');
});

-Hector


On Fri, Nov 21, 2008 at 2:40 PM, lukas [EMAIL PROTECTED] wrote:


 Is it possible to click or select a DIV with jquery?

 $(DIV ID or Class?).click(function() { .


[jQuery] Re: has anyone come across a plugin like this ?

2008-11-21 Thread yvonney

Can't thank you enough Jason. Wonderfully kindand Talented!

On Nov 21, 12:37 pm, heysatan [EMAIL PROTECTED] wrote:
 jBreadCrumb RELEASED

 Hi all, I've put the breadcrumb plugin up on jquery's site:

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

 Here's a link to the working example (also linked to from the jquery
 page)

 http://www.comparenetworks.com/developers/jqueryplugins/jbreadcrumb.html

 Let me know what you think, there are some improvements that can be
 made for sure.  It's decently smart but I think I will improve the
 collapsing algorithm to know what it needs to collapse based on
 individual elements width.

 Oh, and it's compatible with ie 6, ie 7 and all standards compliant
 browsers.

 Thanks,

 Jason

 On Nov 20, 6:14 pm, heysatan [EMAIL PROTECTED] wrote:

  I am just finishing up version 0.1, it will be up tomorrow morning
  (Pacific time).

  On Nov 18, 2:04 pm, yvonney [EMAIL PROTECTED] wrote:

   Oh YES!!! that WOULD be fabulous I know how busy life gets of
   course... Jason! when you have time we'd all love to play with a
   plugin version I bet!

   best wishes

   On Nov 11, 2:32 pm, Andy Matthews [EMAIL PROTECTED] wrote:

I'd be interested in this as a plugin as well.

On Nov 11, 4:21 pm, heysatan [EMAIL PROTECTED] wrote:

 That's a start.

 On Nov 10, 4:13 pm, Microbe [EMAIL PROTECTED] wrote:

  Demand # 1

  :o)

  On Nov 11, 8:57 am, heysatan [EMAIL PROTECTED] wrote:

   Hi Sean,

   I built this breadcrumb animation.  Due to time limitations at 
   the end
   of the project I wasn't able to make it into a plugin (I built a 
   lot
   of other plugins for this project), but I'd like to when I get a
   chance.

   I really solved a problem for us because our category and page 
   titles
   are so long (scientists are long winded).  Before we would show 
   only a
   couple of steps in the HTML to get around this.  This method was 
   more
   SEO friendly, more usable, and I thought, kind of cool.

   If there is a demand for it I'll work on porting it to a plugin, 
   but
   probably not for the next 2 weeks or so.

   Jason
   Lead UI Developer - CompareNetworks

   On Nov 10, 1:21 am, CliffordSean [EMAIL PROTECTED] wrote:

see the breadcrumb on here 
:http://www.biocompare.com/ProductDetails/386912/1/Mutation-Generation...
has anyone come across a plugin like this ?

tnx
sean
--
View this message in 
context:http://www.nabble.com/has-anyone-come-across-a-plugin-like-this---tp2...
Sent from the jQuery General Discussion mailing list archive at 
Nabble.com.


[jQuery] Re: Clickable DIV possible?

2008-11-21 Thread lukas

Thanks for your kind help. I had the wrong path to jquery!


[jQuery] Re: function is not a valid function

2008-11-21 Thread flycast

I am sure that I will be embarrassed by what the problem turns out to
be but does anybody have any ideas here? I'm still stuck.


[jQuery] Submitting the submit input value

2008-11-21 Thread Phil Haack

I noticed that when I use the .ajaxSubmit button to post a form, it
doesn't send the value of the submit button in the form data. For
example:


form name=form1
input type=text name=foo value=bar /
input type=submit name=button value=click /
/form

If I call
jQuery('form1').ajaxSubmit();

The value sent to the server is foo=bar and not foo=barbutton=click.

Is there an easy way to get this to work? It's needed by my backend
server.


[jQuery] Re: Submitting the submit input value

2008-11-21 Thread Mike Alsup

 If I call
 jQuery('form1').ajaxSubmit();

 The value sent to the server is foo=bar and not foo=barbutton=click.

 Is there an easy way to get this to work? It's needed by my backend
 server.


Use ajaxForm instead of ajaxSubmit and you will get that behavior.
Note that you call ajaxForm once to prepare the form and it will
submit it for you whenever the user decides to submit it.  ajaxSubmit,
on the other hand, submits the form immediately and is typically used
within a submit event handler.

Mike



[jQuery] I have problem with Ajax and DIV

2008-11-21 Thread Ziki

Hi,

I use jQuery fadeOut function and it works ok, but i have problem when
I want to call it from some other file; I have some form and it's
works with Ajax and return You have successfully post it! in some
div tag, and I want to fade out that div tag, but I don't know hoe to
call that function, from where i can call it??

I hope that u understand me :)

Please help!!


[jQuery] Re: exclude children from selected elements

2008-11-21 Thread ricardobeat

By the way, you could use event delegation to simplify things a lot:

$(document).ready(function(){
   $('body').mouseover(function(e){
var elm = e.target || e.srcElement;
if ( !$(elm).parents('.ui-dialog').length ) { //if .ui-dialog
is not an ancestor
   $(elm).doStuff();
}
   });
});

It might be slower than binding the function straight to each element,
but it will pay off on very large DOMs.

- ricardo

On Nov 21, 8:07 am, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
 My mistake, it is working. The problem was my lack of understanding
 about how Dialog works.  main is the div from which I create a Dialog
 and I didn't want the event listener to be added to the elements of
 main. However main is NOT the first element of the Dialog. I the
 background it is wrapped around other elements and the top one has
 class .ui-dialog  . All sorted. Thanks .

 On 21 nov, 09:32, [EMAIL PROTECTED]

 [EMAIL PROTECTED] wrote:
  It still doesn't work. I think part of the problem is because the
  children of main are added after I create the event listener.

  Second solution is to check in the event listener if the target is a
  child of main and if so, return.  I know how to get the children of
  main , but how to I check the current tartget is one of them ?

  ricardobeat I need to select all objects of the page because I want
  to do a DOM inspector. But yes you are right, maybe I should only
  start from body !

  Thanks

  On 20 nov, 18:25, ricardobeat [EMAIL PROTECTED] wrote:

   Are you sure you want to apply it to *all* elements on the page? That
   sounds a bit awkward.

   var main =  $('#main, #main *');
   $('body *').not(main).mouseover(function(){...});

   On Nov 20, 2:07 pm, [EMAIL PROTECTED]

   [EMAIL PROTECTED] wrote:
Hi,

I want to apply a mouseover event on all elements but one and its
children. I can't use class name to filter. How can I do it ?  I've
tried unsuccessfully :

$(*:not(#main)).not($(#main).children()).mouseover(function() {

});

thanks


[jQuery] Re: Cycle plugin: using two #next controllers

2008-11-21 Thread Garreth

Wow, that was easy!

Thank you Mike!



On 21 Nov, 21:51, Mike Alsup [EMAIL PROTECTED] wrote:
  I can use them one at a time, but when I try them together only one of
  them works: Here is my code:

          $('#slideshow').cycle({
                  fx:     'fade',
                  speed:  '2000',
                  timeout: 0,
                  pager:  '#nav',
                  next:'#slideshow', // Change the image when user clicks on 
  image
                  next:'#next', // Change the image when user clicks on the 
  next link
                  prev:'#previous',
                  pagerAnchorBuilder: function(idx, slide) {
                          // return selector string for existing anchor
                          return '#nav li:eq(' + idx + ') a';
                  }
          });

 The 'next' option takes a normal jQuery selector, so you can just do
 this:

 next: '#slideshow, #next',
 prev: '#previous',


[jQuery] Re: I have problem with Ajax and DIV

2008-11-21 Thread Ziki

I'm from Croatia, i solve it on Balcan way :

On 22 stu, 00:33, Ziki [EMAIL PROTECTED] wrote:
 Hi,

 I use jQuery fadeOut function and it works ok, but i have problem when
 I want to call it from some other file; I have some form and it's
 works with Ajax and return You have successfully post it! in some
 div tag, and I want to fade out that div tag, but I don't know hoe to
 call that function, from where i can call it??

 I hope that u understand me :)

 Please help!!


[jQuery] Re: has anyone come across a plugin like this ?

2008-11-21 Thread CliffordSean


jason - your a legend

thanks alot i look forward to playing with this!
-- 
View this message in context: 
http://www.nabble.com/Please-REPLY-if-you-want-to-see-Jason-develop-this-Plugin-for-us-%21-tp20406388s27240p20631956.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: setRequestHeader('Cache-Control', 'private') ... does not work in $.ajax call

2008-11-21 Thread frankadelic

When the browser requests a page, it can demand an uncached copy by
sending these headers:

Pragma: no-cache
Cache-Control: no-cache

For example, if you hit ctrl+F5 to refresh a page in Firefox, these
headers will be sent in the Request. This tells the server to return
an uncached page.

My problem is, the jQuery $.ajax() call is passing these headers every
time. I can't force it to exclude the headers. As a result, the web
service returns a cached copy.
Is it possible to change these headers in the $.ajax() call?

The example you listed below is using a different jQuery method, load
(), to retrieve the content. It's not sending the headers, which is
good. But I think I need to use the $.ajax() method.


 You can see the behavior of your own browser here:

http://www.corry.biz/iecache/


[jQuery] Re: Crazy tables with checkboxes

2008-11-21 Thread Karl Swedberg

Hey Chris,

It looks like you managed to fix the other problems, too. When I click  
the header checkbox, only the rows with checkboxes are being  
highlighted now. And the rows aren't remaining highlighted when I  
check one and then check and uncheck a header.


--Karl


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




On Nov 21, 2008, at 3:46 PM, c.barr wrote:



It seems jsbin.com is down right now, so I've uploaded it to my site:
http://chris-barr.com/files/checkboxes/
source: http://chris-barr.com/files/checkboxes/DTcheckboxes.js

Also, I've fixed the issue with shift-selection, but the other
problems still remain.

On Nov 21, 12:01 pm, c.barr [EMAIL PROTECTED] wrote:

err, correction to what I wrote, shift-selection only works when
selecting top to bottom, not the other way around.




[jQuery] Re: Crazy tables with checkboxes

2008-11-21 Thread c.barr

Yes, I was able to (finally) solve all these problems, it just took a
bit longer than I thought.  I forgot to post an update here that I've
fixed it.  Thanks for taking a look anyway though, if you see anything
that can be improved, please let me know!

On Nov 21, 7:00 pm, Karl Swedberg [EMAIL PROTECTED] wrote:
 Hey Chris,

 It looks like you managed to fix the other problems, too. When I click  
 the header checkbox, only the rows with checkboxes are being  
 highlighted now. And the rows aren't remaining highlighted when I  
 check one and then check and uncheck a header.

 --Karl

 
 Karl Swedbergwww.englishrules.comwww.learningjquery.com

 On Nov 21, 2008, at 3:46 PM, c.barr wrote:



  It seems jsbin.com is down right now, so I've uploaded it to my site:
 http://chris-barr.com/files/checkboxes/
  source:http://chris-barr.com/files/checkboxes/DTcheckboxes.js

  Also, I've fixed the issue with shift-selection, but the other
  problems still remain.

  On Nov 21, 12:01 pm, c.barr [EMAIL PROTECTED] wrote:
  err, correction to what I wrote, shift-selection only works when
  selecting top to bottom, not the other way around.


[jQuery] Re: highlighting elements of the page

2008-11-21 Thread Karl Swedberg

Try using the .hover() method instead.

http://docs.jquery.com/Events/hover#overout

From the docs:

Additionally, checks are in place to see if the mouse is still  
within the specified element itself (for example, an image inside of  
a div), and if it is, it will continue to 'hover', and not move out  
(a common error in using a mouseout event handler).



You could also use .bind('mouseenter', fn) and .bind('mouseleave',  
fn) , but .hover(fn, fn) is usually more convenient



--Karl


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




On Nov 19, 2008, at 10:03 AM, [EMAIL PROTECTED] wrote:



Hi,

I'm trying to highlights elements of the page on mouseover. I want to
highlight all td's h1's and p's when the mouse is over.

$(td, h1, p).mouseover(function() {
   $(this).css(backgroundColor, CC);
 });

 $(p, h1, td).mouseout(function() {
   $(this).css(backgroundColor, mObj.prevBGColor);
 });

That doesn't do what I want. Indeed if a p  is inside a td, only
the td gets highlighted (or maybe the p too, but then since the td is
also hightlighted, it doesn't look right)

How can I specify that only top element should be highlighted ?

Thanks




  1   2   >