[jQuery] Re: validate

2009-08-03 Thread Stanislas Zaychenko
Hi Jörn,
Thanks for reply,

now here the context why I need to use *id* instead of *name*
I have a form somethink like this:

form
div class=box-col-l
   div class=det-prptylabel for=FirstNameFirst Name:*/label/div
   div class=det-valueinput id=txtPersonFirstName
name=Order.CustomerPerson.FirstName type=text value= //div
   div class=det-prptylabel for=LastNameLast Name:*/label/div
   div class=det-valueinput id=txtPersonLastName
name=Order.CustomerPerson.LastName type=text value= //div
   div class=det-prptylabel for=EmailEmail:*/label/div
   div class=det-valueinput id=txtPersonEmail
name=Order.CustomerPerson.Email type=text value= //div
   div class=det-prptylabel for=TelephoneTelephone:*/label/div
   div class=det-valueinput id=txtAddressPhoneNumber
name=Order.Address.PhoneNumber type=text value= //div
   div class=det-prptylabel for=CompanyCompany:/label/div
   div class=det-valueinput id=txtPersonCompany
name=Order.CustomerPerson.Company type=text value= //div
/div
/form

so, as you can see the name attribute is already used for server side
processing,  it's .net syntax doesn't work within validate plugin for
construction {rules:{
fieldName:value
}
}

Certainly, I can add rules for each form input separately using
$(#inputId).rules(), but it looks a bit ugly if we have many fields are
been validated

Stani


2009/7/30 Jörn Zaefferer joern.zaeffe...@googlemail.com


 The plugin supports only names, you'd have to hack the plugin to change
 that.

 If you provide some context on why you think you need that, it would
 be easier to propose a solution.

 Jörn

 On Wed, Jul 29, 2009 at 8:15 AM, zaka29zak...@gmail.com wrote:
 
  Hi,
 
  Please give advise, how to assign rules for form elements using their
  ids attributes instead of name e.g
 
  rules:{
   name: required, //plugin retrieves form element by name,
  but should be id
   email: required
 }
 
  Thanks
 



[jQuery] Re: form submit

2009-08-03 Thread solow

$(#itemId).val(); I found this one here http://docs.jquery.com/Attributes/val
now, when I place this inside the live() function, this should work
right? because it's already 'live' so it already has the elements from
the dynamically loaded page.

On Aug 3, 7:35 am, solow solow.wes...@gmail.com wrote:
 and for the input text input?

 On 3 aug, 07:11, waseem sabjee waseemsab...@gmail.com wrote:



  var tcC = typecoinsCASHIN.val();
  please add values to all your option tag.

  if(tcC == 1) {

  }
  On Mon, Aug 3, 2009 at 4:03 AM, solow solow.wes...@gmail.com wrote:

   hello,

   Recently i've discovered how to use dynamicaly loaded content, with
   javascript.

   $(div ul li a).live(click, function() {
       //.
   }

   Now I want to know I'm using a small form, with more than 1 field,
   and a 'submit button'.

   which looks like this:

   Type: select name=typecoinsCASHIN id=typecoinsCASHINoption
   value=0Normal chips/optionoptionPremium chips/options/
   select
   Amount: input type=text name=amountCOINSCASHIN /
   input type=submit name=chipInChips id=chipInChips value=Chip
   in! /

   And the javascript checking if the button  is clicked:

   $(div input[type=submit]).live(click, function() {
       //.
   }

   Now... within the javascript function, how can I use the values within
   chupInChips, and amountCOINSCASHIN in the function.

   I have no clue, as checking for dynamically loaded content, and using
   this onclick, mouseover, whatever, was hard enough for me to figure
   out.

   So all I want is to use the values in these input items, within the
   called function.

   I hope someone is able to help me.

   solow.- Tekst uit oorspronkelijk bericht niet weergeven -

  - Tekst uit oorspronkelijk bericht weergeven -- Hide quoted text -

 - Show quoted text -


[jQuery] Image dimensions

2009-08-03 Thread Pops

I am trying to get  some cross browser consistency of obtaining the
true image size.

In Firefox, there is two fields,

   image.naturalWidth
   image.natualHeight

IE does not recognize these fields.  I think I am either over thinking
the issue, and probably not seeing something I thought jQuery provided
with cross browser width/height wrappers

Background:

I am loading a batch of images with various sizes.

div id=photos
img src=title.png style=height: 240px; /
img src=photo1.png style=height: 240px; /
img src=photo2.png style=height: 240px; /
img src=photo3.png style=height: 240px; /
...
img src=photoX.png style=height: 240px; /

/div

By fixing the height, the width is proportionally resized as I want
it.  Under FF it behaves as I want.

However, under  IE,  the first image title1.png dimensions 357x115.
The   height is smaller then 240px so what happens is that it resizes
the height to 240 but the width is resized proportionally

 (240/115)*357 = 745 width

If I put a larger image as the first one, then its behaves ok.

I tried to use max-width, but that doesn't work under IE. I even tried
the width:expression() hacks.

So, like I said, I might be over thinking this, but this is why I want
to get the real sizes so I can adjust it.

Any tips, guidance?

Thanks


[jQuery] Re: Image dimensions

2009-08-03 Thread HLS

Geez, why is it after posting something, many time you answer the
answer? I guess the act of writing making you think of other
things. :-)

This was a case of following an example with width:expression() IE
hack, using the wrong  width to compare,  so doing this  solveed the
issue:

 /* IE hack */
 width: expression(width  321?320px:auto);
 /* other browser */
 max-width: 320px;

I would still like to know if jQuery is consistent with its width/
height functions.

Thanks


On Aug 3, 2:58 am, Pops sant9...@gmail.com wrote:
 I am trying to get  some cross browser consistency of obtaining the
 true image size.

 In Firefox, there is two fields,

image.naturalWidth
image.natualHeight

 IE does not recognize these fields.  I think I am either over thinking
 the issue, and probably not seeing something I thought jQuery provided
 with cross browser width/height wrappers

 Background:

 I am loading a batch of images with various sizes.

 div id=photos
 img src=title.png style=height: 240px; /
 img src=photo1.png style=height: 240px; /
 img src=photo2.png style=height: 240px; /
 img src=photo3.png style=height: 240px; /
 ...
 img src=photoX.png style=height: 240px; /

 /div

 By fixing the height, the width is proportionally resized as I want
 it.  Under FF it behaves as I want.

 However, under  IE,  the first image title1.png dimensions 357x115.
 The   height is smaller then 240px so what happens is that it resizes
 the height to 240 but the width is resized proportionally

  (240/115)*357 = 745 width

 If I put a larger image as the first one, then its behaves ok.

 I tried to use max-width, but that doesn't work under IE. I even tried
 the width:expression() hacks.

 So, like I said, I might be over thinking this, but this is why I want
 to get the real sizes so I can adjust it.

 Any tips, guidance?

 Thanks


[jQuery] Re: validate

2009-08-03 Thread Jörn Zaefferer

The syntax is just fine:

rules: {
 bla.blu.blub: required
}

See also 
http://docs.jquery.com/Plugins/Validation/Reference#Fields_with_complex_names_.28brackets.2C_dots.29

Jörn

On Mon, Aug 3, 2009 at 8:42 AM, Stanislas Zaychenkozak...@gmail.com wrote:
 Hi Jörn,
 Thanks for reply,

 now here the context why I need to use id instead of name
 I have a form somethink like this:

 form
 div class=box-col-l
    div class=det-prptylabel for=FirstNameFirst Name:*/label/div
    div class=det-valueinput id=txtPersonFirstName
 name=Order.CustomerPerson.FirstName type=text value= //div
    div class=det-prptylabel for=LastNameLast Name:*/label/div
    div class=det-valueinput id=txtPersonLastName
 name=Order.CustomerPerson.LastName type=text value= //div
    div class=det-prptylabel for=EmailEmail:*/label/div
    div class=det-valueinput id=txtPersonEmail
 name=Order.CustomerPerson.Email type=text value= //div
    div class=det-prptylabel for=TelephoneTelephone:*/label/div
    div class=det-valueinput id=txtAddressPhoneNumber
 name=Order.Address.PhoneNumber type=text value= //div
    div class=det-prptylabel for=CompanyCompany:/label/div
    div class=det-valueinput id=txtPersonCompany
 name=Order.CustomerPerson.Company type=text value= //div
 /div
 /form

 so, as you can see the name attribute is already used for server side
 processing,  it's .net syntax doesn't work within validate plugin for
 construction {rules:{
     fieldName:value
     }
 }

 Certainly, I can add rules for each form input separately using
 $(#inputId).rules(), but it looks a bit ugly if we have many fields are
 been validated

 Stani


 2009/7/30 Jörn Zaefferer joern.zaeffe...@googlemail.com

 The plugin supports only names, you'd have to hack the plugin to change
 that.

 If you provide some context on why you think you need that, it would
 be easier to propose a solution.

 Jörn

 On Wed, Jul 29, 2009 at 8:15 AM, zaka29zak...@gmail.com wrote:
 
  Hi,
 
  Please give advise, how to assign rules for form elements using their
  ids attributes instead of name e.g
 
  rules:{
           name: required, //plugin retrieves form element by name,
  but should be id
           email: required
         }
 
  Thanks
 




[jQuery] Re: Looking for a Good JavaScript Editor that Supports JQuery

2009-08-03 Thread ggerri

I'd suggest a simple solution here. Notepad+ (http://notepad-
plus.sourceforge.net/de/site.htm) and Firebug Plugin for FF3.5 which
has a nice Debugger incluced.

You might also want to try Amaya by w3.org (http://www.w3.org/Amaya/
Amaya.html) if you're looking for more IDE like editor than  Notepad+.


On Aug 3, 2:37 am, lists li...@commadelimited.com wrote:
 I believe that Aptana offers jQuery support.



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

 Behalf Of S2
 Sent: Saturday, August 01, 2009 8:21 PM
 To: jQuery (English)
 Subject: [jQuery] Looking for a Good JavaScript Editor that Supports JQuery

 Does anyone know of a good JavaScript editor that supports JQuery?
 Anyone sucessfully integrate JQuery into Eclipse/WTP or JSEclipse?- Hide 
 quoted text -

 - Show quoted text -


[jQuery] Re: validate

2009-08-03 Thread Stanislas Zaychenko
Thanks

2009/8/3 Jörn Zaefferer joern.zaeffe...@googlemail.com


 The syntax is just fine:

 rules: {
  bla.blu.blub: required
 }

 See also
 http://docs.jquery.com/Plugins/Validation/Reference#Fields_with_complex_names_.28brackets.2C_dots.29

 Jörn

 On Mon, Aug 3, 2009 at 8:42 AM, Stanislas Zaychenkozak...@gmail.com
 wrote:
  Hi Jörn,
  Thanks for reply,
 
  now here the context why I need to use id instead of name
  I have a form somethink like this:
 
  form
  div class=box-col-l
 div class=det-prptylabel for=FirstNameFirst
 Name:*/label/div
 div class=det-valueinput id=txtPersonFirstName
  name=Order.CustomerPerson.FirstName type=text value= //div
 div class=det-prptylabel for=LastNameLast Name:*/label/div
 div class=det-valueinput id=txtPersonLastName
  name=Order.CustomerPerson.LastName type=text value= //div
 div class=det-prptylabel for=EmailEmail:*/label/div
 div class=det-valueinput id=txtPersonEmail
  name=Order.CustomerPerson.Email type=text value= //div
 div class=det-prptylabel
 for=TelephoneTelephone:*/label/div
 div class=det-valueinput id=txtAddressPhoneNumber
  name=Order.Address.PhoneNumber type=text value= //div
 div class=det-prptylabel for=CompanyCompany:/label/div
 div class=det-valueinput id=txtPersonCompany
  name=Order.CustomerPerson.Company type=text value= //div
  /div
  /form
 
  so, as you can see the name attribute is already used for server side
  processing,  it's .net syntax doesn't work within validate plugin for
  construction {rules:{
  fieldName:value
  }
  }
 
  Certainly, I can add rules for each form input separately using
  $(#inputId).rules(), but it looks a bit ugly if we have many fields are
  been validated
 
  Stani
 
 
  2009/7/30 Jörn Zaefferer joern.zaeffe...@googlemail.com
 
  The plugin supports only names, you'd have to hack the plugin to change
  that.
 
  If you provide some context on why you think you need that, it would
  be easier to propose a solution.
 
  Jörn
 
  On Wed, Jul 29, 2009 at 8:15 AM, zaka29zak...@gmail.com wrote:
  
   Hi,
  
   Please give advise, how to assign rules for form elements using their
   ids attributes instead of name e.g
  
   rules:{
name: required, //plugin retrieves form element by name,
   but should be id
email: required
  }
  
   Thanks
  
 
 



[jQuery] jQuery and window.print

2009-08-03 Thread m.ugues

Hallo all.

I need to enhance the window.print function adding an header and a
footer to the page.

Is there any way or suggestion to achieve this goal?

Kind regards

Max


[jQuery] Re: jQuery and window.print

2009-08-03 Thread Tomáš Kavalek

I don't know how to do it in jQuery, but it's simple in CSS. You can
transform it to jQuery, using .css().


Insert at the begin of document content:

div id=printheadYour header for printing/div


Insert at the end of document content:
div id=printfootYour footer for printing/div


Create this styles with media=screen:

#printhead {
  display: none;
}

#printfoot {
  display: none;
}

Create this styles with media=print:

#printhead {
 display: block;
 position: fixed;
 text-align: center;
 top: 0px;
 left: 0px;
 width: 100%;
 border-bottom: 1px solid #00;
}

#printfoot {
 margin-top: 25px;
 width: 100%;
 text-align: right;
}



This example show you, how to print header on each page and footer on
last page. You can modify CSS for print both on each page.

Hope it's help.


On 3 srp, 11:16, m.ugues m.ug...@gmail.com wrote:
 Hallo all.

 I need to enhance the window.print function adding an header and a
 footer to the page.

 Is there any way or suggestion to achieve this goal?

 Kind regards

 Max


[jQuery] Re: jQuery and window.print

2009-08-03 Thread Mazi

Thanks a lot Tomas.

I'm trying to test it out.

One question: in my page I have a css that refer for some elements to
soma images.
When I use the window.print function I lose all the background-images.
Is there e way to print them all?

Kind regards

MAx

On Aug 3, 11:32 am, Tomáš Kavalek tomas.kava...@gmail.com wrote:
 I don't know how to do it in jQuery, but it's simple in CSS. You can
 transform it to jQuery, using .css().

 Insert at the begin of document content:

 div id=printheadYour header for printing/div

 Insert at the end of document content:
 div id=printfootYour footer for printing/div

 Create this styles with media=screen:

 #printhead {
   display: none;

 }

 #printfoot {
   display: none;

 }

 Create this styles with media=print:

 #printhead {
  display: block;
  position: fixed;
  text-align: center;
  top: 0px;
  left: 0px;
  width: 100%;
  border-bottom: 1px solid #00;

 }

 #printfoot {
  margin-top: 25px;
  width: 100%;
  text-align: right;

 }

 This example show you, how to print header on each page and footer on
 last page. You can modify CSS for print both on each page.

 Hope it's help.

 On 3 srp, 11:16, m.ugues m.ug...@gmail.com wrote:

  Hallo all.

  I need to enhance the window.print function adding an header and a
  footer to the page.

  Is there any way or suggestion to achieve this goal?

  Kind regards

  Max


[jQuery] Re: jQuery and window.print

2009-08-03 Thread Jonathan Vanherpe (T T NV)


Not really, You pretty much have to tell users to enable the 'print 
backgrounds' feature in their browser.


Jonathan

Mazi wrote:

Thanks a lot Tomas.

I'm trying to test it out.

One question: in my page I have a css that refer for some elements to
soma images.
When I use the window.print function I lose all the background-images.
Is there e way to print them all?

Kind regards

MAx

On Aug 3, 11:32 am, Tomáš Kavalek tomas.kava...@gmail.com wrote:

I don't know how to do it in jQuery, but it's simple in CSS. You can
transform it to jQuery, using .css().

Insert at the begin of document content:

div id=printheadYour header for printing/div

Insert at the end of document content:
div id=printfootYour footer for printing/div

Create this styles with media=screen:

#printhead {
  display: none;

}

#printfoot {
  display: none;

}

Create this styles with media=print:

#printhead {
 display: block;
 position: fixed;
 text-align: center;
 top: 0px;
 left: 0px;
 width: 100%;
 border-bottom: 1px solid #00;

}

#printfoot {
 margin-top: 25px;
 width: 100%;
 text-align: right;

}

This example show you, how to print header on each page and footer on
last page. You can modify CSS for print both on each page.

Hope it's help.

On 3 srp, 11:16, m.ugues m.ug...@gmail.com wrote:


Hallo all.
I need to enhance the window.print function adding an header and a
footer to the page.
Is there any way or suggestion to achieve this goal?
Kind regards
Max





--
Jonathan Vanherpe - Tallieu  Tallieu NV - jonat...@tnt.be


[jQuery] [tooltip] Top and left won't work

2009-08-03 Thread Lleoun

Hi all,

I've donwloaded the jquery tooltip form:
http://bassistance.de/jquery-plugins/jquery-plugin-tooltip/
and it is working great except for the following:

I need to put the tooltip closer to the cursor so I've edited
jquery.tooltip.js and changed
$.tooltip = {
top: 15,
left: 15
to
top: 1,
left: 1

As this did not work, in my page I've added:
$('#content img').tooltip({
track: true,
delay: 0,
showURL: false,
showBody:  - ,
fade: 250,
top: 1,
left: 1,
id: tooltip
});

But it does not work again, the tooltip is still quite far from the
cursor.
Please give me a hand here, I'm using the tooltip inside of an iframe
and if it is this far from the cursor it gets cut off by the iframe
border (that I cannot make bigger).

Thanks a ton in advance!



[jQuery] [validate] - translate generic error messages

2009-08-03 Thread Jnew

Plugin: http://bassistance.de/jquery-plugins/jquery-plugin-validation/

How translate generic error messages, without editing the javascript
file?

My test:
messages: {
required: Don't work,
username: {
required: Work
},
email: Work
}


But I need to change one by one? I just want all the messages required
to be changed and not a specific field.

Exemple:
change all This field is required.
to Campito el obrigatoriozito delo prenxings. Thanks!


[jQuery] Re: Superfish z-index problem with googlemap in IE

2009-08-03 Thread CanisVoriCanis

I just had a similar problem and my here is my solution.
first some html
div idcontainer
div id=menumenu.../div
div id=map_container/div
/div
You must set all of the div tags two properties of position and z-
index, ie.
{
position:relative;
z-index:;
}
You can set other style properties but you must set those two.  If you
remove either one it will not work.
Then make sure your menu z-index exceeds your container AND
map_container.
Then (THIS IS NOT INTUITIVE) your container should exceed your
map_container.

I have mine set as follows
container z-index = 
menu z-index = 99
map_container z-index = 1

Good luck I hope this helps your particular case.

On Jul 31, 6:06 am, appu rupakn...@gmail.com wrote:
 Hi All
 I am using the superfish menu on a page that also has a google map on
 it. It work fine in FF but  the menu will display below the  google
 map in IE.  I have already change the z-index:999 and
 position:absolute, but the result remains same for IE.

 Thanks in advance for your help


[jQuery] How to access an iFrame ID from within

2009-08-03 Thread Tommy1402

Sorry if report

I have an iFrame

iframe id=myframe src=index.php/iframe

it loads a content, how can I access the iFrame ID, which is myframe
from inside index.php?
I have tried:

//index.php
jQuery(document).ready(function() {
  alert(jQuery('#myframe').attr('id'));
});

but not succeed.


[jQuery] validations

2009-08-03 Thread pramothireddy

Hi,
 I am verymuch new to jquery and wanted to use jauery validations for
textbox controls in my project.
how can i...can u please guide me using asp.net with c# we are doing
web applications

Ex: textbox accepts only alphabets and should not be empty


[jQuery] Re: Looking for a Good JavaScript Editor that Supports JQuery

2009-08-03 Thread InVmedia

Komodo Edit, for sure. http://www.activestate.com/komodo/downloads/

Comes built in with auto complete / code sense for jQuery. Free and
has built in FTP. Works well with Filezilla. Been using it for about a
year and it keeps getting better by the month (sometimes week!).

On Aug 1, 6:21 pm, S2 smnthsm...@gmail.com wrote:
 Does anyone know of a good JavaScript editor that supports JQuery?
 Anyone sucessfully integrate JQuery into Eclipse/WTP or JSEclipse?


[jQuery] problem Form plugin + UI sortable

2009-08-03 Thread Antoine Blanchard

Hi everyone,

I'm new to ajax and I can't figure out how to set my jqueries in the
response.

Yet, I'm using a basic way for my Ajax.

I have set with the form plugin an ajaxForm and when the response is
ready, it displays it in the targetted div:
/
***/
//CODE of assembler.jsp
html
head
/head
body
script type=text/javascript src=/scripts/jquery.js/script //
v1.3.2
script type=text/javascript src=/scripts/jquery_form.js/
script//v2.07
script type=text/javascript
  $(document).ready( function() {
$('#listFileForm').ajaxForm({
 type: 'POST',
 target: '#listFileResult',
 resetForm:true
});
  });
/script

form:form id=listFileForm action=assembler.do enctype=multipart/
form-data
  input type=file name=theForm.file width=25px /
  input type=submit class=button name=assemblerAjaxSubmit
value='Add' /
/form:form

div id=listFileResult/div
/body
/html
/
***/

The response that will be display in the div is a JSP-file which
create a list (ul li). I want this list to be sortable but I can't
figure out how to set it as sortable

I have tried this but it does not work. I assume there is no document-
ready event when this view is displayed. I have also tried to set it
in the page that calls this ajax function (without believing that it
would work) and it didn't work
/
***/
//CODE of ajaxReturn.jsp
script type=text/javascript src=/scripts/jquery-
ui-1.7.2.custom.js/script

script type=text/javascript
// When the document is ready set up our sortable with it's inherant
function(s)
$(document).ready(function() {
  $(#test-list).sortable({
update : function () {
var order = $('#test-list').sortable('serialize');
alert(order);
}
  });
});
/script

ul id=test-list
//list items created by my jsp
/ul
/
***/

So where am I wrong please? How should I do?
Thanks for your help.


[jQuery] How to retreive Excel Documents via jQuery's $.ajax()?

2009-08-03 Thread Daigo

Hi there!

I've written a GUI which represents data from a DB. Each row has a
table-head with its own search field in there, so you can filter the
displayed data.

To realize this, I use $.ajax() and I post the serialized data from
these inputs. I retrieve a JSON object to update the current view.

This works perfectly, but now, I also want to send the current view
as an Excel Spreadsheet.

In order to realize this, I use the PEAR Spreadsheet class and I send
the Excel Document instead of the json_encoded array, but the problem
is, that the Excel Document will not be send; I just receive the
source code from this Document.

I think I have to alter the dataType option of the $.ajax() method, so
the headers will be correct, but I don't get the trick


Thanks for your help!


regards!


[jQuery] Re: Superfish z-index problem with googlemap in IE

2009-08-03 Thread rupak mandal
Thanks for the suggestion.I got the solution.We have to just change the
superfish.css

.sf-menu li:hover {
  visibility:   inherit; /* fixes IE7 'sticky bug' */
position:relative;
 z-index:999;
}


and  it will work.


On Mon, Aug 3, 2009 at 11:38 AM, CanisVoriCanis code.l...@gmail.com wrote:


 I just had a similar problem and my here is my solution.
 first some html
 div idcontainer
 div id=menumenu.../div
 div id=map_container/div
 /div
 You must set all of the div tags two properties of position and z-
 index, ie.
 {
position:relative;
z-index:;
 }
 You can set other style properties but you must set those two.  If you
 remove either one it will not work.
 Then make sure your menu z-index exceeds your container AND
 map_container.
 Then (THIS IS NOT INTUITIVE) your container should exceed your
 map_container.

 I have mine set as follows
 container z-index = 
 menu z-index = 99
 map_container z-index = 1

 Good luck I hope this helps your particular case.

 On Jul 31, 6:06 am, appu rupakn...@gmail.com wrote:
  Hi All
  I am using the superfish menu on a page that also has a google map on
  it. It work fine in FF but  the menu will display below the  google
  map in IE.  I have already change the z-index:999 and
  position:absolute, but the result remains same for IE.
 
  Thanks in advance for your help



[jQuery] Re: Looking for a Good JavaScript Editor that Supports JQuery

2009-08-03 Thread András Csányi

2009/8/2 S2 smnthsm...@gmail.com:

 Does anyone know of a good JavaScript editor that supports JQuery?
 Anyone sucessfully integrate JQuery into Eclipse/WTP or JSEclipse?

Hi,

I'm using Netbeans and I like it very much. But telling the truth my
golal is generate jquery source code by php. So, I'm using less time
than a normal developers.



-- 
- -
--  Csanyi Andras  -- http://sayusi.hu -- Sayusi Ando
--  Bízzál Istenben és tartsd szárazon a puskaport!.-- Cromwell


[jQuery] Re: [validate] - translate generic error messages

2009-08-03 Thread Jörn Zaefferer

$.validator.message.requires = my new default message;

Or use on of the provided localization files (in the zip file).

Jörn

On Mon, Aug 3, 2009 at 6:40 AM, Jnewidn...@gmail.com wrote:

 Plugin: http://bassistance.de/jquery-plugins/jquery-plugin-validation/

 How translate generic error messages, without editing the javascript
 file?

 My test:
                messages: {
                                required: Don't work,
                        username: {
                                required: Work
                        },
                        email: Work
                }


 But I need to change one by one? I just want all the messages required
 to be changed and not a specific field.

 Exemple:
 change all This field is required.
 to Campito el obrigatoriozito delo prenxings. Thanks!



[jQuery] Re: validations

2009-08-03 Thread Anoop kumar V

You can try and use the bassistance form validation plugin. For server
side validation I think you need the (malsup) form plugin as well. You
can google for the exact links or go through the search on jquery.com.


On 8/3/09, pramothireddy swapnadot...@gmail.com wrote:

 Hi,
  I am verymuch new to jquery and wanted to use jauery validations for
 textbox controls in my project.
 how can i...can u please guide me using asp.net with c# we are doing
 web applications

 Ex: textbox accepts only alphabets and should not be empty



-- 

Thanks,
Anoop


[jQuery] Re: Does IE support live?

2009-08-03 Thread David .Wu

got it, I need to define it again after I use ajax, it will be more
safe.

On 7月31日, 下午3時25分, rupak mandal rupakn...@gmail.com wrote:
 hi David, you have to bind jump in load callback function.
  $(function() {
        $.ajaxSetup({
                cache: false
        });

        $('#btn').click(function() {
                $('div:first').load('b.html',function(){loadCallback();});
        });

 });

 function  loadCallback()
 {
       $('#jump').live('change', function() {
                alert(1);
        });

 }

 I think this will fulfill your requirement .

 On Fri, Jul 31, 2009 at 12:28 PM, David .Wu chan1...@gmail.com wrote:

  If I load b.html in firefox, alert(1) will work, but ont work in IE.

  page a.html

  !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
  meta http-equiv=Content-Type content=text/html; charset=utf-8 /
  titlelive/title
  script type=text/javascript src=js/jquery-1.3.2.min.js/script
  /head

  body
  div style=width: 300px; height: 300px; border: 1px solid red;/
  div
  input type=button id=btn value=btn /
  script
  $(function() {
         $.ajaxSetup({
                 cache: false
         });

         $('#btn').click(function() {
                 $('div:first').load('b.html');
         });

         $('#jump').live('change', function() {
                 alert(1);
         });
  });
  /script
  /body
  /html

  page b.html
  select id=jump
         option value=11/option
     option value=22/option
  /select


[jQuery] a select question

2009-08-03 Thread David .Wu

if I have 3 div, how to filter the div without class abc?

div/div
div class=abc/div
div/div


[jQuery] jquery droppable propagation problem

2009-08-03 Thread shangl

hi,

i have a problem with nested divs and drag  drop...wenn i drag a
draggable on a droppable div (and the divs are nested -- one
droppable in another droppable) it calls the drop function for both
doppable divs (inner div and parent div)...how could i prevent this?

javascript part:
$(document).ready(function(){
  $('div[class*=acceptable]').draggable( {
revert: true

  });
  $('div[class*=accepting]').droppable( {
drop:   function(event, ui) {
alert($(this).attr('id'));
}

  });


});

html part:
div class=acceptable accepting id=sub style=background-
color:red; z-index:10;
sub
div class=acceptable accepting id=sub1 style=background-
color:blue; z-index:11;
sub1
div class=acceptable accepting id=sub2 style=background-
color:green; z-index:12;
sub2
div class=acceptable accepting id=sub3 
style=background-
color:brown; z-index:13;
sub3
/div
/div
/div
/div

thanks


[jQuery] Re: a select question

2009-08-03 Thread Michael Lawson

mmm a little more information in regards to what exactly you want to do but

$('div').eq(i);  where i is the index of the div you want to access

alternatively you could also do $('div:eq(i)');

cheers

Michael Lawson
Development Lead, Global Solutions, ibm.com
Phone:  1-276-206-8393
E-mail:  mjlaw...@us.ibm.com

'Whether one believes in a religion or not,
and whether one believes in rebirth or not,
there isn't anyone who doesn't appreciate kindness and compassion..'


   
  From:   David .Wu chan1...@gmail.com 
   
  To: jQuery (English) jquery-en@googlegroups.com  
   
  Date:   08/03/2009 09:37 AM  
   
  Subject:[jQuery] a select question   
   






if I have 3 div, how to filter the div without class abc?

div/div
div class=abc/div
div/div

inline: graycol.gifinline: ecblank.gif

[jQuery] Re: a select question

2009-08-03 Thread Liam Potter


I think he just wants to select anything without a certain class
eg
$(div:not('.abc'))

Michael Lawson wrote:


mmm a little more information in regards to what exactly you want to 
do but


$('div').eq(i); where i is the index of the div you want to access

alternatively you could also do $('div:eq(i)');

cheers

Michael Lawson
Development Lead, Global Solutions, ibm.com
Phone: 1-276-206-8393
E-mail: mjlaw...@us.ibm.com

'Whether one believes in a religion or not,
and whether one believes in rebirth or not,
there isn't anyone who doesn't appreciate kindness and compassion..'

Inactive hide details for David .Wu ---08/03/2009 09:37:41 AM---if I 
have 3 div, how to filter the div without class abc?David .Wu 
---08/03/2009 09:37:41 AM---if I have 3 div, how to filter the div 
without class abc?



From:   
David .Wu chan1...@gmail.com

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

Date:   
08/03/2009 09:37 AM

Subject:
[jQuery] a select question






if I have 3 div, how to filter the div without class abc?

div/div
div class=abc/div
div/div




[jQuery] Re: a select question

2009-08-03 Thread shangl

$('div[class*=abc]').function-you-need filters all div's, filters all
divs, which are not of the class abc

On Aug 3, 3:37 pm, David .Wu chan1...@gmail.com wrote:
 if I have 3 div, how to filter the div without class abc?

 div/div
 div class=abc/div
 div/div


[jQuery] htmlFile: No such interface supported / jQuery .html()

2009-08-03 Thread Dunc

Hi,

I'm using jQuery on my website.  Nothing has changed client side,
though server-side I have upgraded to asp.net 3.5 page (from 2.0) and
now all of my jQuery .html(value) calls have stopped working and are
giving the javascript error from within the jQuery file: htmlFile: No
such interface supported

All I'm doing is creating some HTML server-side and displaying it
within a given div.  The line that fails is:

$('div#divPopularArea').html(res);

The 2.0 code (still working) is at http://www.fluideating.co.uk/default.aspx
and the javascript is at http://www.fluideating.co.uk/j/quicksearchtabs.js

I have absolutely no clues what's gone wrong here, and have exhausted
my ideas.  I'm sure it's something stupid.  Has anyone come across
something similar, or can anyone point me in the right direction?

Thanks in advance.



[jQuery] Re: problem Form plugin + UI sortable

2009-08-03 Thread Mike Alsup

 I have set with the form plugin an ajaxForm and when the response is
 ready, it displays it in the targetted div:
 /
 *** /
 //CODE of assembler.jsp
 html
 head
 /head
 body
 script type=text/javascript src=/scripts/jquery.js/script //
 v1.3.2
 script type=text/javascript src=/scripts/jquery_form.js/
 script//v2.07
 script type=text/javascript
   $(document).ready( function() {
     $('#listFileForm').ajaxForm({
          type: 'POST',
          target: '#listFileResult',
          resetForm:true
     });
   });
 /script

 form:form id=listFileForm action=assembler.do enctype=multipart/
 form-data
       input type=file name=theForm.file width=25px /
       input type=submit class=button name=assemblerAjaxSubmit
 value='Add' /
 /form:form

 div id=listFileResult/div
 /body
 /html
 /
 *** /

 The response that will be display in the div is a JSP-file which
 create a list (ul li). I want this list to be sortable but I can't
 figure out how to set it as sortable

 I have tried this but it does not work. I assume there is no document-
 ready event when this view is displayed. I have also tried to set it
 in the page that calls this ajax function (without believing that it
 would work) and it didn't work
 /
 *** /
 //CODE of ajaxReturn.jsp
 script type=text/javascript src=/scripts/jquery-
 ui-1.7.2.custom.js/script

 script type=text/javascript
 // When the document is ready set up our sortable with it's inherant
 function(s)
     $(document).ready(function() {
       $(#test-list).sortable({
         update : function () {
         var order = $('#test-list').sortable('serialize');
         alert(order);
         }
       });
     });
 /script

 ul id=test-list
 //list items created by my jsp
 /ul
 /
 *** /

 So where am I wrong please? How should I do?



Try this:

$(document).ready( function() {
$('#listFileForm').ajaxForm({
type: 'POST',
target: '#listFileResult',
resetForm:true,
success: onSuccess
});

function onSuccess() {
$('#test-list').sortable({
update: function () {
var order = $('#test-list').sortable('serialize');
alert(order);
}
});
});
});



[jQuery] Re: How to change message while the page is blocked using blockUI plugin

2009-08-03 Thread Mike Alsup

 Hello people, i'd like to know if it's possible change de message
 while the page is block by blockUI jquery plugin. I've tried a lot
 of things, but none was good. One thing i've tried was using CSS
 selectors like:

 $('blockUI blockMsg blockPage').innerHTML

 but it hasn't worked.


You can just call blockUI again with a different message:

$.blockUI({ message: 'New message' });


[jQuery] Re: jquery form plugin ajaxSubmit / fieldvalue inconsistent behaviour [jquery form]

2009-08-03 Thread Mike Alsup

 if you have in html the following:

 input type=checkbox value=true name=check/
 input type=hidden value=false name=check/

 ajaxSubmit will submit :

 check : true
 check : false

 $(#check).fieldValue() will return
 [ true ]

 so, this is inconsistent with the result of ajaxSubmit, it should
 return  [true,false]


What is #check?  Unless it's a select element you'll only have one
value for that element.  ajaxSubmit submits an entire form but your
call to fieldValue is asking for the value of a specific element.


[jQuery] Re: jQuery Cycle - Get Current Slide Number

2009-08-03 Thread Mike Alsup

 Hi, I'm working on the same issue with Cycle. I have multiple slideshows on
 a page, each with current/total slide counter, example: 2 of 5 images
 (oddly, there are no examples of this particular implementation on Mike
 Alsup's otherwise ridiculously varied and helpful cycle demo pages).

There is an example of this:

http://www.malsup.com/jquery/cycle/count.html


[jQuery] [linkselect] Positioning menus off bottom of window

2009-08-03 Thread Sherri

Hi all,

I'm working on a website where we're using the jquery.linkselect
plugin, and we're running into a situation where we have one of the
dropdown linkselect menus happening near the very bottom of the users'
window.  Imagine that we have a list of articles with abstracts,
authors, etc. running down the left hand side in a div which is set to
show a scrollbar if the results list gets long, and each article has a
linkselect dropdown menu.

Unexpectedly, if you've scrolled to the bottom of the scrolling div
and you're on the last item in the list, linkselect is allowing the
menu to drop down extending past the bottom of the scrolling div and
outside the boundary of the browser window.  This is problematic, as
it makes the menu items inaccessible.

We're looking for a way to have it automatically detect the bottom of
the screen and reposition the menu accordingly (similarly to the way
it does it to make sure it doesn't get positioned off the right hand
side of the screen).  I might be able to hack it, but was hoping maybe
the linkselect team might be able to put something in more quickly and
efficiently than I can.  :)

Alternately, a way to specify that a menu drops up rather than drops
down would also be a great solution to our situation (I didn't see
that in the options, though please let me know if I missed it).

Thanks in advance for any help,

--Sherri



[jQuery] ajaxForm doesnt work in Internet Explorer

2009-08-03 Thread Shervin Asgari
Hi. We have added ajax to our forms by using iframe and it works fine in
Firefox. However in Internet Explorer it does not.

Can anyone spot why it doesnt work?
http://pastebin.com/fe04a2f3

We are using JQuery 1.2.6


[jQuery] animate{width} method not working.

2009-08-03 Thread shearn89

Hey guys - wondering if you can help me. I've been working on a
friend's simple website using jQuery to animate the buttons. I've got
them to bump when I move the mouse onto them, but when I click to
move them (and hopefully resize them) they not only don't resize, but
also when the mouse leaves them they return to the original position.
I did something similar on my own site using a state attribute in
the variable for each div, and it works fine.

My site is at http://www.isthat.it/main.html, and as you can see on
the right, the click-to-open works fine.
The friend's site is at http://www.weaponize.co.uk, and it clearly
doesn't work.

My site's script: http://www.isthat.it/scripts/homepage.js
His site's script: http://www.weaponize.co.uk/homepage.js


any info would be appreciated...


[jQuery] how to display a message layer after form-submit?

2009-08-03 Thread michbeck

hey all,

i'm using the form validation plugin to validate my form (http://
docs.jquery.com/Plugins/Validation), works great.
now i want to display a layer after clicking the submit-button.
unfortunatly i don't know ho i can do that, thanks in advance for
help :-)

please take a look at my js-code i'm using to validate my form:
--
my javascript:

// JavaScript Document
$(document).ready(function(){
$(#signupform).validate({

rules: {
username: {
required: true,
minlength: 2,
remote: /_misc/formcheck/username.cfm
},
password1: {
required: true,
minlength: 5
},
password2: {
required: true,
minlength: 5,
equalTo: #password1
},
email: {
required: true,
email: true,
remote: /_misc/formcheck/email.cfm
},
email2: {
required: true,
email: true,
equalTo: #email
},
usage: required
},
messages: {
username: {
required: provide username!,
minlength: more than 1 chars!
},
password1: {
required: provide password!,
minlength: more than 4 chars
},
password2: {
required: provide password,
minlength: more than 4 chars!,
equalTo: password doesn't match
},
email: enter valid email,
email2: {
required: enter valid email,
equalTo: emails doesn't match
},
usage: please accept terms!
},

// set this class to error-labels to indicate valid fields
success: function(status) {
// set nbsp; as text for IE
status.html(nbsp;).addClass(checked);
}


});
})
--


[jQuery] google.load speed with jquery

2009-08-03 Thread matt

I'm using google jsapi to load jquery. The example shows to do this:
script type=text/javascript src=http://www.google.com/jsapi;/
script
script type=text/javascript
   google.load(jquery, 1.3.2);
   google.setOnLoadCallback(function() {
// Place init code here instead of $(document).ready()
  });
/script


The problem I'm having is this... I'm also including google map api,
google search api and jquery ui.  all using .load.  I then have
several jquery plugins I'm using along with alot of code in the
document.ready.  My thinking was that I include two js files the first
being
http://www.google.com/jsapi

and the 2nd having this:

   google.load(jquery, 1.3.2);
 google.load(jqueryui, 1.7.2);
   google.setOnLoadCallback(function() {

  });

so my code would like like this in the index file:
script type=text/javascript src=http://www.google.com/jsapi;/
script
script type=text/javascript src=http://myserver.com/js/combined-
load-js-files-and-doc-read.js/script


I'm wondering if this is hurting performance on the site by
putting .load in another script file.  My reasoning was that to
include 30k+ of js plugins and code in index.php file would be bloat,
so I figured I would put it in a separate file.

Does anyone have any tips on how to do this properly, even if lets say
I just include the google.load in the header and have the
document.ready how do I pull in this massive js file?

Secondly... and I think this steams from the performance problem
but i'm using jquery ui tabs... and they take forever to render,
mostly because I think all of this js is loading.  TIA!





[jQuery] Internet Explorer 7 doesn't .animate() correctly.

2009-08-03 Thread Simon

Hey, so I'm having a very curious problem with IE and the animate
effect.

I have a page which shifts left and right when you click on a certain
part of it. When you hover over this section of the page it become
opaque, and the image that was visible behind it should no longer be
visible.

This is the basic HTML:

div id=focusedpage

   div id=backgroundblue/div

   div id=image
   /div!--end image--

   div id=centerpiece
   /div!--end centerpiece--

   div id=blurb
   /div!--end blurb--
/div!--focused page--

So when you click on #image the entire #focusedpage shifts left x
amount of pixels. At the moment, #image is overlaying #backgroundblue,
both are the same size, but I shifted #image left -256 pixels to make
it align with #backgroundblue, so that they were exactly overlapping.
This is so that #image gets a blue tint when you hover over it (the
reason I can't do this with just a background color is because #image
has rounded corners).

the CSS is like this:

#image{
  z-index:1;
  opacity:0.6;
  filter:alpha(opacity=60);
  height:410px;
  display:inline;
  margin-left:-256px;
  position:relative;
  width:256px;
  float:left;
  background-image:url('../images/image.png');
}


#backgroundblue{
  margin-left:-112px;
  background-image:url('../images/blue.png');
  z-index:0;
  height:410px;
  display:inline;
  position:relative;
  width:256px;
  float:left;
}

The relevant javascript code that I'm using is:

window.focus = $(#focusedpage).css('marginLeft');
$(#image).click(function(){

if ((window.focus == '0px') || (window.focus == 
'-112px')){
$(#image).animate( { opacity: '1.0', 
marginLeft: '-256px' },
'slow');
$(#focusedpage).animate( {marginLeft: '112px' 
}, 'slow');
window.focus = '112px';

} else {
$(#image).animate( { opacity: '0.6' }, 
'slow');
$(#focusedpage).animate( {marginLeft: '0px' 
}, 'slow');
window.focus = '0px';

}

});

what the Javascript does is it checks whether the window is focused in
a certain position, and then depending on the position it animates the
#focusedpage to a relevant position.

The problem is, this works perfectly fine in Firefox and Safari, and
the code technically does what I want it to do in Internet Explorer 7,
however, during the animation, it apparently sets the position of the
#image (by ignoring the margin-left I think) shifts everything left,
and then jumps the image back into place. Sometimes it doesn't do the
last bit. I was wondering whether anyone could tell me why this
happened, and what I could do to augment this.

Thanks,

Simon


[jQuery] Re: jquery form plugin ajaxSubmit / fieldvalue inconsistent behaviour [jquery form]

2009-08-03 Thread rekna



On Aug 3, 4:57 pm, Mike Alsup mal...@gmail.com wrote:
  if you have in html the following:

  input type=checkbox value=true name=check/
  input type=hidden value=false name=check/

  ajaxSubmit will submit :

  check : true
  check : false

  $(#check).fieldValue() will return
  [ true ]

thanks for the comment... i should probably use $
('[name=check]').fieldValue() instead of use the id...
still this results in ['on','false' ] when the checkbox is checked,
while ajaxSubmit posts check:true , check:false
  so, this is inconsistent with the result of ajaxSubmit, it should
  return  [true,false]

 What is #check?  Unless it's a select element you'll only have one
 value for that element.  ajaxSubmit submits an entire form but your
 call to fieldValue is asking for the value of a specific element.


[jQuery] Re: css on dynamic table row

2009-08-03 Thread dealkk

can you give me full working example?

This is what i try. The dummy td did apply css style ,but all dynamic
td are not apply css style.

table id=tbid
trtddummy/td/tr
 [row append dynamiccly]
 /table



On Aug 2, 6:54 pm, Stefano ares...@gmail.com wrote:
 this is a more css problem than a jquery problem.
 you have to make the right order in your css and use right selector. i
 had the same problem.
 example 1
 td.td-class div a {
 /*some styles*/}

 a.active:hover {
 /*some styles such as background-image dondt wordek but border worked.
 in my case dont worked on dynamic generated markup because its not
 very DOMified i think- that are not 100% clear paths and maybe its
 troube for the js interpreter and the render engine- this is only
 speculation*/}

 /example 1

 example 2
 td.td-class div a {
 /*some styles*/}

 ...
 ...
 td.td-class div a.active:hover { /*  look at the selector */
 /* i think now the js interpreter sees the path better than before in
 my case it worked- try to mani pulate your css order and use right
 selectors*/}

 /example 2

 example 2 worked in my case

 try it out ;)

 On 2 Aug., 05:53, dealkk jasonpha...@gmail.com wrote:

  i create tatble row dynamic using append after calling web service. It
  create ok.

  After create table i try to add css to the td but it doesn't seem to
  work. any idea how to resolve this. the syntax is correct. I notice
  when i view source, the all the row are not there.

  table id=tbid
   [row append dynamiccly]
  /table


[jQuery] set certain items in a select list to selected.

2009-08-03 Thread shaded

Ok lets say i have a multiple select list

select id=mylist name=mylist[]
  option id=1first/option
  option id=2second/option
  option id=3third/option
  option id=4fourth/option
  option id=5fifth/option
/select

then i have a string of id's that i want to set to selected like so.

var selectedIds = '1,3,5';

is it possible to use jquery (preferably in a one liner) to set first,
third and fifth to selected.?


[jQuery] Re: set certain items in a select list to selected.

2009-08-03 Thread Simon

If I understand correctly what you're asking, would a simple if
statement (using OR operators to select 1, 3, or 5) and then using
jQuery's .addClass do the trick?

http://docs.jquery.com/Attributes/addClass#class

complete speculation, but you may also be interested in:
http://docs.jquery.com/Selectors/odd

Hope that helps,
Simon

On Aug 3, 12:26 pm, shaded dar...@eztransition.com wrote:
 Ok lets say i have a multiple select list

 select id=mylist name=mylist[]
   option id=1first/option
   option id=2second/option
   option id=3third/option
   option id=4fourth/option
   option id=5fifth/option
 /select

 then i have a string of id's that i want to set to selected like so.

 var selectedIds = '1,3,5';

 is it possible to use jquery (preferably in a one liner) to set first,
 third and fifth to selected.?


[jQuery] Re: jquery droppable propagation problem

2009-08-03 Thread shangl

no solutions? :(

On Aug 3, 3:38 pm, shangl simon.ha...@uibk.ac.at wrote:
 hi,

 i have a problem with nested divs and drag  drop...wenn i drag a
 draggable on a droppable div (and the divs are nested -- one
 droppable in another droppable) it calls the drop function for both
 doppable divs (inner div and parent div)...how could i prevent this?

 javascript part:
 $(document).ready(function(){
           $('div[class*=acceptable]').draggable( {
                 revert: true

           });
           $('div[class*=accepting]').droppable( {
                 drop:   function(event, ui) {
                                         alert($(this).attr('id'));
                                 }

           });

         });

 html part:
 div class=acceptable accepting id=sub style=background-
 color:red; z-index:10;
         sub
         div class=acceptable accepting id=sub1 style=background-
 color:blue; z-index:11;
                 sub1
                 div class=acceptable accepting id=sub2 style=background-
 color:green; z-index:12;
                         sub2
                         div class=acceptable accepting id=sub3 
 style=background-
 color:brown; z-index:13;
                                 sub3
                         /div
                 /div
         /div
 /div

 thanks


[jQuery] Re: (Cycle Plugin) ScrollHorz problem in FF and Safari 3

2009-08-03 Thread bcbounders

Mike,

Thanks!  Sorry for the long delay... I got side-tracked by having to
move my 74 year old mother-in-law into her new house!  UGGGH!

Anyway... this looks like it's doing the trick.  I really appreciate
your help.

 - John

On Jul 25, 8:00 am, Mike Alsup mal...@gmail.com wrote:
 On Jul 21, 9:51 pm, bcbounders bcbound...@gmail.com wrote:

  When using the ScrollHorz effect in theCyclePlugin for inline HTML
  content, in Firefox and Safari 3, the very first time you trigger the
  transition, the content of the first slide appears to be being
  squished and ends up overlapping with the incoming slide/text.  See an
  example here:  http://tinyurl.com/mmddkn (click on any of the white
  text in the vertical image or click the Begin link at the bottom of
  the first block of text).

 Try giving your slides an explicit width.  Instead of 95%, try 220px
 for example.


[jQuery] Re: jqGrid 35.5 released

2009-08-03 Thread Jack Killpatrick


Really nice work, Tony! Looks like some very useful new features in this 
rev.


- Jack

Tony wrote:

Happy to announce the final 3.5 release of jqGrid.
New wiki Documentation at http://www.trirand.com/jqgridwiki
The demo at http://www.trirand.com/jqgrid/jqgrid.html
and final the home : http://www.trirand.com/blog

Enjoy
Tony

  





[jQuery] Re: Looking for a Good JavaScript Editor that Supports JQuery

2009-08-03 Thread Cesar Sanz


+1 Aptana

- Original Message - 
From: InVmedia in-vme...@in-vmedia.com

To: jQuery (English) jquery-en@googlegroups.com
Sent: Monday, August 03, 2009 2:37 AM
Subject: [jQuery] Re: Looking for a Good JavaScript Editor that Supports 
JQuery




Komodo Edit, for sure. http://www.activestate.com/komodo/downloads/

Comes built in with auto complete / code sense for jQuery. Free and
has built in FTP. Works well with Filezilla. Been using it for about a
year and it keeps getting better by the month (sometimes week!).

On Aug 1, 6:21 pm, S2 smnthsm...@gmail.com wrote:

Does anyone know of a good JavaScript editor that supports JQuery?
Anyone sucessfully integrate JQuery into Eclipse/WTP or JSEclipse? 




[jQuery] Re: Looking for expand/collapse tree directory navigation

2009-08-03 Thread Cesar Sanz
Search in google for dynatree.
  - Original Message - 
  From: Anoop kumar V 
  To: jquery-en@googlegroups.com 
  Sent: Sunday, July 26, 2009 1:34 AM
  Subject: [jQuery] Re: Looking for expand/collapse tree directory navigation


  Would this work for you?

  http://jquery.bassistance.de/treeview/demo/

  sample 0 seems to fit your requirements.

  Thanks,
  Anoop



  On Sat, Jul 25, 2009 at 4:10 PM, Magnificent 
imightbewrongbutidontthin...@gmail.com wrote:


Hello,

I'm looking for an expanding/collapsing tree directory type of
navigation and was wondering if someone knows of a good one that's out
there and available.

What I'm specifically looking for is one that is triggered on the
click of a *graphic* that toggles the show/hide.  Each text nav item
should be hyperlinkable to it's own link/page.  So for example (the +
and - are the collapse/expand graphics, the dot leader is for some
formatting):

- Nav Item 1 (text should be hyperlinkable)
...Sub Nav 1(text should be hyperlinkable)
...- Sub Nav 2 (text should be hyperlinkable)
..Sub Nav 2a (text should be hyperlinkable)
..Sub Nav 2b (text should be hyperlinkable)
..Sub Nav 2c (text should be hyperlinkable)
...Sub Nav 3 (text should be hyperlinkable)
+ Nav Item 2 (text should be hyperlinkable)
+ Nav Item 3 (text should be hyperlinkable)
+ Nav Item 4 (text should be hyperlinkable)

Ideally, this would work for plain old ul and li structure.  I
suppose infinite nesting would be cool, but I don't think I need to go
beyond 3 levels with the first 2 levels having the show/hide graphic
triggers.



[jQuery] Re: Listnav initial display of no items?

2009-08-03 Thread rubycat


Still at a deadend on this one...any suggestions to get this working?


[jQuery] Re: Listnav initial display of no items?

2009-08-03 Thread Jack Killpatrick


Do you have your attempt somewhere I can take a look at?

- Jack

rubycat wrote:

Still at a deadend on this one...any suggestions to get this working?

  





[jQuery] create new (blank) XML-Object and populate it

2009-08-03 Thread huehnerhose

Hi!

I'm writing a little FrontEnd where the user can add/remove/edit many
elements. When he is finished he should be able to save the whole
thing as XML. The source-XML is created by an php-backend and load via
ajax-call of jQuery.
Now I want to keep the whole communication between the backend and the
frontend in XML. This is why I want to write a XML-export-function.
Here I need to create an empty XML-object and populate this object
with XML-entities.

Is there a simple way to do this with jQuery? I didn't found anything
in the documentation. Only one plugin that enables me to parse a
string-variable as XML.

Thanks for reply

Greetings
huehnerhose


[jQuery] [autocomplete] textarea - adding selections not only on the end

2009-08-03 Thread wiper

I would like to ask if anyone tried use this plugin like t9 in mobiles
with textarea form. I am currently trying to use this plugin with my
words database for suggesting right words.
This is ok and is working if you write word after word and use suggest
for last word. But if you need to add word between existing words,
autocomplete move cursor to end, the same if you use suggested word.
And this is not useful for my aplication of this plugin .o)

Did anyone here try to solve this problem to manage addding text and
suggestins inside text?


P.S.: I would like to thank autor for this superb plugin.




[jQuery] IE8 Variable Undefined Error

2009-08-03 Thread DMi Partners

I am trying to read the value of the FlashVars parameter off of a
Flash .swf file that's being embedded onto a page using swfobject. I
can't change anything about how the Flash is being put on the page so
I'm trying to manipulate it with JQuery. In Firefox the following
selector works:

$flashvars1 = $(.homepagecolumn1 embed).attr(flashvars);

In IE6  IE7 this works:

var flashvars1 = $(.homepagecolumn1 object param
[name=FlashVars]).attr(value);

Neither one of the above code snippets works in IE8 though. Instead I
get a variable is undefined error. Any tips?

Thanks!


[jQuery] Re: set certain items in a select list to selected.

2009-08-03 Thread shaded


Not exactly. I guess looping through my string would work. but its a
multiple select list so .addclass wont work

i tried using
  $(#mylist option:contains(3)).attr(selected, selected);

this compares against the list value, not the id. Is there a way to
compare against the id?

Better yet, us there a function that will let me drop in my string and
will simply find all the ids that match and then i can use .attr
(selected, selected); on that?


[jQuery] Re: set certain items in a select list to selected.

2009-08-03 Thread amuhlou

Maybe the eq() selecor would help more (http://docs.jquery.com/
Selectors/eq)

something like:

$(#mylist option:eq(2), #mylist option:eq(0), #mylist option:eq
(4)).attr(selected, selected);



On Aug 3, 2:51 pm, shaded dar...@eztransition.com wrote:
 Not exactly. I guess looping through my string would work. but its a
 multiple select list so .addclass wont work

 i tried using
   $(#mylist option:contains(3)).attr(selected, selected);

 this compares against the list value, not the id. Is there a way to
 compare against the id?

 Better yet, us there a function that will let me drop in my string and
 will simply find all the ids that match and then i can use .attr
 (selected, selected); on that?


[jQuery] Cycle - Stop queing effects on pager hovers

2009-08-03 Thread Charlie





Put together a Cycle show with multiple effects triggered with onBefore
and onAfter including sliding text over images and a sliding
highlighter over pager thumbs.

Pause onHover is true. All works great if I use "click" event on pager,
however customer wants to use hover on pager. Trying to figure out a
way ( like a hoverintent) to stop the queing of effects on multiple
hovers of pager


I see methods in plugin functions used to stop on various events but
can't figure out how to apply them in this situation

Slideshow: http://www.teprod.com/

Js :
http://www.teprod.com/wp-content/themes/TracyEvans/js/home_slideshow.js







[jQuery] automatic pause after slide

2009-08-03 Thread Dave

I'm very new to Jquery so please forgive, if this is trivial.

I have a webpage with four automatic slideshows on it. I need to pause
the fade in function of the next slide by 20 seconds for each
slideshow.

Also, Jquery shows each img upon loading the page. Is there a way to
prevent MySlides1-3 from being visible until their fade in?


!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
titleEventus Energy/title
link rel=stylesheet type=text/css media=screen
href=screen.css/
script type=text/javascript src=jquery-1.3.js/script
script type=text/javascript src=jquery.cycle.all.js/script
script type=text/javascript
$(document).ready(function(){
$('#myslides').cycle({
fx: 'fade',
speed: 2000,
timeout: 4000,
autostop: 4,
});
});




$(document).ready(function(){
$('#myslides1').cycle({
fx: 'fade',
speed: 2000,
timeout: 4000,
autostop: 4,
delay: 12000
});
});




$(document).ready(function(){
$('#myslides2').cycle({
fx: 'fade',
speed: 2000,
timeout: 4000,
autostop: 4,
delay:18000
});
});



$(document).ready(function(){
$('#myslides3').cycle({
fx: 'fade',
speed: 2000,
timeout: 4000,
autostop: 4,
delay: 4000
});
});



/script
/head


[jQuery] show hide slideshow

2009-08-03 Thread xandercoded

I know this may be simple, nonetheless I am having issues. Below is
the code im working with. Can someone guide me as to a way of getting
my custom slideshow to work properly.

Expectations: Hide all li's except the first one and then loop
through all the images with a settimeout to fadin and fadeout each
sample image...

Solutions and suggestions will be greatly appreciated!!!

-- This is where I am at in the code at the moment and have been
trying different alternatives with the JQuery, to no avail.


!--HTML--

div id=show
ul
lia href=#
img alt=Css Template Preview
src=images/sample.png /
/a/li
lia href=#
img alt=Css Template Preview
src=images/sample_2.png /
/a/li
lia href=#
img alt=Css Template Preview
src=images/sample.png /
/a/li
lia href=#
img alt=Css Template Preview
src=images/sample_2.png /
/a/li
lia href=#
img alt=Css Template Preview
src=images/sample.png /
/a/li
/ul
/div



//Javascript-

$(function() {
init();


for (var i = 1; i  $(div#show li).size(); i++) {
$(div#show li)[i].hide();
}

for (var i = 0; i  $(div#show li).size(); i++) {
setTimeout(function() {
$(div#show li)[i - 1].fadeOut();
$(div#show li)[i].fadeIn();
}, 8000);
}
});


[jQuery] More fun with decrementing on click

2009-08-03 Thread littlerobothead

I have a status area in an app I'm working on. It shows the number of
unread alerts. As the user clicks each alert, it's subtracted from the
total. The following code counts the number of items to use as my
total:

var trigger = $(#dataset-b tr.unread);
var count = $(trigger).length;
$(.number).html(count);

And then this works to subtract from that number on each click:

$(trigger).click(function(){
$(.number).html(count--);
if (count == 0){
$(trigger).unbind(click);
}
$(this).removeClass('unread');
});

Problem is, nothing happens on the first click. However, on the second
click my number starts to decrement. What's going on here? How can I
make the count work?

Best,
Nick


[jQuery] Re: More fun with decrementing on click

2009-08-03 Thread Peter Edwards


Hi Nick

$(.number).html(count--);

count-- decrements your count variable after it has passed its value to 
the $.html() function.

use --count

Peter

on 03/08/2009 21:15 littlerobothead said::

I have a status area in an app I'm working on. It shows the number of
unread alerts. As the user clicks each alert, it's subtracted from the
total. The following code counts the number of items to use as my
total:

var trigger = $(#dataset-b tr.unread);
var count = $(trigger).length;
$(.number).html(count);

And then this works to subtract from that number on each click:

$(trigger).click(function(){
$(.number).html(count--);
if (count == 0){
$(trigger).unbind(click);
}
$(this).removeClass('unread');
});

Problem is, nothing happens on the first click. However, on the second
click my number starts to decrement. What's going on here? How can I
make the count work?

Best,
Nick

  


[jQuery] Re: More fun with decrementing on click

2009-08-03 Thread Eric Garside

The problem is in how you're applying the decrement operator. If you
put it at the end of the number, as in:

number--

Then, the current number will be returned, THEN decremented. That's
what's happening here.

Simply put the operator before the number, so it is decremented THEN
returned.

$('.number').html( --count );

On Aug 3, 4:15 pm, littlerobothead nickmjo...@gmail.com wrote:
 I have a status area in an app I'm working on. It shows the number of
 unread alerts. As the user clicks each alert, it's subtracted from the
 total. The following code counts the number of items to use as my
 total:

 var trigger = $(#dataset-b tr.unread);
         var count = $(trigger).length;
         $(.number).html(count);

 And then this works to subtract from that number on each click:

         $(trigger).click(function(){
                 $(.number).html(count--);
                 if (count == 0){
                         $(trigger).unbind(click);
                 }
                 $(this).removeClass('unread');
         });

 Problem is, nothing happens on the first click. However, on the second
 click my number starts to decrement. What's going on here? How can I
 make the count work?

 Best,
 Nick


[jQuery] Re: Form Validation

2009-08-03 Thread Ratheesh

Hi,
Usually when validation error occurs, the focus will go to the top
most control which is in error.
But for me the page stay as  it is. it is not scrolling up to display
the first control which is in error.

Thanks

On Aug 1, 6:16 am, G Tupman tuppers...@sky.com wrote:
 Please elaborate? need some more info



 On Fri, Jul 31, 2009 at 9:38 PM, Ratheesh coolra...@gmail.com wrote:

  Hi,
  In my jquery validattion, the control which is invalid doesnt get
  focus..
  Do you guys know what the reason is..?

  Thanks in advance
  Ratheesh- Hide quoted text -

 - Show quoted text -


[jQuery] Re: Form Validation

2009-08-03 Thread Ratheesh

Hi,
It is specified in the documentation as

After submitting an invalid form, the first invalid element is
focused, allowing the user to correct the field. If another invalid
field, that wasn't the first one, was focused before submit, that
field is focused instead, allowing the user start at the bottom, if he
prefers that. 

http://docs.jquery.com/Plugins/Validation

Thanks

On Aug 3, 4:26 pm, Ratheesh coolra...@gmail.com wrote:
 Hi,
 Usually when validation error occurs, the focus will go to the top
 most control which is in error.
 But for me the page stay as  it is. it is not scrolling up to display
 the first control which is in error.

 Thanks

 On Aug 1, 6:16 am, G Tupman tuppers...@sky.com wrote:



  Please elaborate? need some more info

  On Fri, Jul 31, 2009 at 9:38 PM, Ratheesh coolra...@gmail.com wrote:

   Hi,
   In my jquery validattion, the control which is invalid doesnt get
   focus..
   Do you guys know what the reason is..?

   Thanks in advance
   Ratheesh- Hide quoted text -

  - Show quoted text -- Hide quoted text -

 - Show quoted text -


[jQuery] Get append() result

2009-08-03 Thread Brad

If I add a row to a table in the following manner, how can I get a
reference to the added row?

var row = trtd.../td/tr;
var newrow;
newrow = $('#docs tbody').append(row);

With the above code new row references the tbody and not the tr.


[jQuery] Re: Get append() result

2009-08-03 Thread James

How about:

$row = $(trtd.../td/tr);
var newrow = $row.appendTo(#docs tbody);

On Aug 3, 11:51 am, Brad nrmlcrpt...@gmail.com wrote:
 If I add a row to a table in the following manner, how can I get a
 reference to the added row?

 var row = trtd.../td/tr;
 var newrow;
 newrow = $('#docs tbody').append(row);

 With the above code new row references the tbody and not the tr.


[jQuery] Auto-populate and get index in HTML Select

2009-08-03 Thread OccasionalFlyer

I need to modify a complex web app.  The web page has a set of
cascading selects.  That is, choosing A in the first HTML select
needs to trigger code to load a specific list of values into the
second Select and choosing something there needs to trigger code to
load a specific set of values into the third Select, etc.

  Behind this page is already JavaScript that includes jQuery . I
could use lep please in figuriong out two things:
1.  How to auto-populate a Select based upon a user's choice in the
Select above it
2.  Getting the index of what was selected by the user

I have spent all afternoon at the jQuery site looking for how to do
either of these, as well as searching through Google and I have not
found what I need. I realize there might not be one code example that
has both so I can simply copy and paste, but I need more than I have
found, and I do not wish to use another plug-in nor AJAX.  (This has
to be working in two days, so I don't have time to go and learn AJAX
first.)

  Can anyone tell me how to do either of these or give me a link to
specific places that wil cover these exact topics?  Thanks.

Ken


[jQuery] How do I make sub-navigation links?

2009-08-03 Thread banacan

I'm relatively new to jQuery - I'm a server-side man, PHP - and I'm
trying to discover how to make sub-navigation links appear under my
main nav bar when a main link (with children) is hovered.  It is no
problem for me to do in PHP and I am including the sub-nav in a side
bar, but I would also like to have the same links appear under the
main nav bar using jQ  CSS.  Can someone point the way for me on
this?  Is there a plugin that already does this?

In PHP, I have logic that determines the sub-nav links based on the
current page id and applicable pages (and therefore links) based on
their parent id.  I don't know how to get this info to jQuery or AJAX
so that it displays on hover.  Any help would be appreciated.


[jQuery] Re: can't update div through dialog

2009-08-03 Thread Richard D. Worth
When a dialog is initialized it is appended to the end of the body, because
of an IE6 stacking issue. So it's no longer inside the .pane element.
- Richard

2009/8/2 av3nger anto...@gmail.com


 When I try to animate a DIV-element with this code:
 $(this).parents(.pane).animate({ backgroundColor: #fbc7c7 },
 fast)
 .animate({ opacity: hide }, slow)

 everything works fine. But when I try to do it after I press a button
 in a dialog - nothing works! Why?
 Here's the code:
 $(document).ready(function(){

$(#dialog).dialog({
bgiframe: true,
resizable: false,
height:140,
autoOpen: false,
modal: true,
overlay: {
backgroundColor: '#000',
opacity: 0.5
},
buttons: {
'Удалить новость': function() {
$.get(
news.php,
act=deleteid=+id
);
$(this).dialog('close');
$(this).parents(.pane).animate({
 backgroundColor: #fbc7c7 },
 fast)
.animate({ opacity: hide },
 slow)
return false;
},
'Отмена': function() {
$(this).dialog('close');
return false;
}
}
});

$(.pane .btn-delete).click(function(){
id = $(this).parents('.pane').find('td:first').attr('id');
$(#dialog).dialog('open');
return false;
});
 });



[jQuery] Re: jquery droppable propagation problem

2009-08-03 Thread Richard D. Worth
Use the greedy option:
http://jqueryui.com/docs/droppable/#option-greedy

- Richard

On Mon, Aug 3, 2009 at 9:38 AM, shangl simon.ha...@uibk.ac.at wrote:


 hi,

 i have a problem with nested divs and drag  drop...wenn i drag a
 draggable on a droppable div (and the divs are nested -- one
 droppable in another droppable) it calls the drop function for both
 doppable divs (inner div and parent div)...how could i prevent this?

 javascript part:
 $(document).ready(function(){
  $('div[class*=acceptable]').draggable( {
revert: true

  });
  $('div[class*=accepting]').droppable( {
drop:   function(event, ui) {
alert($(this).attr('id'));
}

  });


});

 html part:
 div class=acceptable accepting id=sub style=background-
 color:red; z-index:10;
sub
div class=acceptable accepting id=sub1 style=background-
 color:blue; z-index:11;
sub1
div class=acceptable accepting id=sub2
 style=background-
 color:green; z-index:12;
sub2
div class=acceptable accepting id=sub3
 style=background-
 color:brown; z-index:13;
sub3
/div
/div
/div
 /div

 thanks


[jQuery] Check if element is shown with show()

2009-08-03 Thread StefanCandan

Hello, I'm building a website with JQuery.

Now I need to check if an object is shown, with show()

My jqeury to hide all the elements at start:

$(p.about).hide();
$(p.gallery).hide();
$(p.links).hide();
$(p.contact).hide();
$(p.home).hide();

Then I show the p.home once the page finishes loading.

Then when clicked on a link, the shown p element should be hidden with
the hide() command, and another p element should be shown.

so like:
lia href=Home/a/li
lia href=About/a/li


p class=homeWelcome/p !-- Shown at start !--
p class=aboutAbout me/p !-- Hidden at start !--


so when about is clicked, p class=home should be hidden, using the
hide(slow);

and p class=about should be shown using the show(slow);


Any ideas on how I can do this?


[jQuery] (validate) Form needs to be submitted twice

2009-08-03 Thread Chuck

Hello.  I have encountered a problem using remote validation where my
form does not post until the second time the submit button is
clicked.  If I remove the remote validation everything works
correctly.  As it is everything works except that the submit button
must be clicked twice.  Thank you for any help with this issue.

Below is the relevant .js code.  I can post the entire page if needed.

$(document).ready(function(){
$(#f).validate({
rules: {
first_name: {required: true},
last_name: {required: true},
password: {required: false, minlength: 5},
password_confirm: {equalTo: #f 
input:password},
email: {
required: true,
email: true,
remote: {
url: 
/ajax/unregistered_user_email.php,
type: post,
data: {
email: function() { 
return $(#email).val() },
origemail: function() { 
return $(#origemail).val() }
}
}
}
},
messages: {
email: {remote: This email address has already 
been
registered.},
password_confirm: { equalTo: Confirmation does 
not match the
password.}
}
});
});


[jQuery] IE8 bug/behavior: HTML Selects (DispHTMLOptionElement) and JQuery Form and Validation

2009-08-03 Thread Sean


My JQuery POST is supposed to re-render new content in the Lightbox,
but this was not happening in IE8 and IE8 Document Mode. Would work in
IE8 Browser Mode and IE7 Document Mode.

Turns out there is something odd about how an HTML Select Option on
the form was handled. Regardless of how I defined my HTML Select
(originally without option selected, then with), the following piece
would always evaluate to null:

   op.attributes['value']

In the commented out code below, you’ll see that null is not checked
for, and the code will fail. The fix is to first check for
op.attributes['value']  being null…

   var v = $.browser.msie  !(op.attributes['value'] != null 
   op.attributes['value'].specified) ? op.text : op.value;
// var v = $.browser.msie  !(op.attributes['value'].specified) ?
op.text : op.value;

Had to make same fix in both jquery.form.js and jquery.validation.js

More info:  This happens if you do not select anything in the HTML
Select pulldown. If you do make a choice (changing the defaulted
value) it works.

Any ideas?   Right now the JavaScript fix above works, but wondering
if there is something else I should know about this.


[jQuery] Merge JQuery Element Objects

2009-08-03 Thread lowtech

ul
li id=foo
ul
li class=bar/div
li class=bar/div
li class=bar/div
li class=bar/div
/ul
/li
/ul

function getNodes(e) {
return $.extend(e, $(e).find('li.bar'));
}

var nodes = getNodes($('#foo'));
console.log(nodes);

-

How do I merge these two objects? If I ran a console.log on just $
(e).find('li.bar'), it would return an object with a length of 3 and
those four elements and if i ran a console.log on just $(e), it would
return a length of 0 and just that element.

Instead I would like to see an object returned with a length of 4 and
the #foo element and all the .bar elements attached.

Please don't worry about the function or why i'm not just calling $
('li#foo, li.bar').


[jQuery] Re: Merge JQuery Element Objects

2009-08-03 Thread Richard D. Worth
Use the .add() method:
http://docs.jquery.com/Traversing/add#expr

- Richard

On Mon, Aug 3, 2009 at 5:43 PM, lowtech bbab...@gmail.com wrote:


 ul
li id=foo
ul
li class=bar/div
li class=bar/div
li class=bar/div
li class=bar/div
/ul
/li
 /ul

 function getNodes(e) {
return $.extend(e, $(e).find('li.bar'));
 }

 var nodes = getNodes($('#foo'));
 console.log(nodes);

 -

 How do I merge these two objects? If I ran a console.log on just $
 (e).find('li.bar'), it would return an object with a length of 3 and
 those four elements and if i ran a console.log on just $(e), it would
 return a length of 0 and just that element.

 Instead I would like to see an object returned with a length of 4 and
 the #foo element and all the .bar elements attached.

 Please don't worry about the function or why i'm not just calling $
 ('li#foo, li.bar').



[jQuery] Re: Merge JQuery Element Objects

2009-08-03 Thread Michael Geary

Like Richard said, you can use .add().

But also note that all the lengths you mentioned are off by one. The .length
property of a jQuery object, just like a string or an array, is the actual
length, not the length minus one. Don't be thrown off by the fact that array
indexes start at [0] and so naturally the last *index* is [length-1].

So what you should expect after using .add() is a jQuery object with five
elements indexed [0] through [4], and .length=5.

-Mike

 From: lowtech
 
 ul
 li id=foo
 ul
 li class=bar/div
 li class=bar/div
 li class=bar/div
 li class=bar/div
 /ul
 /li
 /ul
 
 function getNodes(e) {
 return $.extend(e, $(e).find('li.bar')); }
 
 var nodes = getNodes($('#foo'));
 console.log(nodes);
 
 -
 
 How do I merge these two objects? If I ran a console.log on 
 just $ (e).find('li.bar'), it would return an object with a 
 length of 3 and those four elements and if i ran a 
 console.log on just $(e), it would return a length of 0 and 
 just that element.
 
 Instead I would like to see an object returned with a length 
 of 4 and the #foo element and all the .bar elements attached.
 
 Please don't worry about the function or why i'm not just 
 calling $ ('li#foo, li.bar').
 



[jQuery] Re: a select question

2009-08-03 Thread David .Wu

thanks a lot, this is exactly what I want :)

On 8月3日, 下午9時44分, Liam Potter radioactiv...@gmail.com wrote:
 I think he just wants to select anything without a certain class
 eg
 $(div:not('.abc'))

 Michael Lawson wrote:

  mmm a little more information in regards to what exactly you want to
  do but

  $('div').eq(i); where i is the index of the div you want to access

  alternatively you could also do $('div:eq(i)');

  cheers

  Michael Lawson
  Development Lead, Global Solutions, ibm.com
  Phone: 1-276-206-8393
  E-mail: mjlaw...@us.ibm.com

  'Whether one believes in a religion or not,
  and whether one believes in rebirth or not,
  there isn't anyone who doesn't appreciate kindness and compassion..'

  Inactive hide details for David .Wu ---08/03/2009 09:37:41 AM---if I
  have 3 div, how to filter the div without class abc?David .Wu
  ---08/03/2009 09:37:41 AM---if I have 3 div, how to filter the div
  without class abc?

  From:      
  David .Wu chan1...@gmail.com

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

  Date:      
  08/03/2009 09:37 AM

  Subject:  
  [jQuery] a select question

  

  if I have 3 div, how to filter the div without class abc?

  div/div
  div class=abc/div
  div/div


[jQuery] Re: a select question

2009-08-03 Thread David .Wu

thanks a lot, this is exactly what I want :)

On 8月3日, 下午9時44分, Liam Potter radioactiv...@gmail.com wrote:
 I think he just wants to select anything without a certain class
 eg
 $(div:not('.abc'))

 Michael Lawson wrote:

  mmm a little more information in regards to what exactly you want to
  do but

  $('div').eq(i); where i is the index of the div you want to access

  alternatively you could also do $('div:eq(i)');

  cheers

  Michael Lawson
  Development Lead, Global Solutions, ibm.com
  Phone: 1-276-206-8393
  E-mail: mjlaw...@us.ibm.com

  'Whether one believes in a religion or not,
  and whether one believes in rebirth or not,
  there isn't anyone who doesn't appreciate kindness and compassion..'

  Inactive hide details for David .Wu ---08/03/2009 09:37:41 AM---if I
  have 3 div, how to filter the div without class abc?David .Wu
  ---08/03/2009 09:37:41 AM---if I have 3 div, how to filter the div
  without class abc?

  From:      
  David .Wu chan1...@gmail.com

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

  Date:      
  08/03/2009 09:37 AM

  Subject:  
  [jQuery] a select question

  

  if I have 3 div, how to filter the div without class abc?

  div/div
  div class=abc/div
  div/div


[jQuery] Re: More fun with decrementing on click

2009-08-03 Thread littlerobothead

Bingo. Thanks all for you straightforward answers. This had been
dogging me for days.

Thanks!

On Aug 3, 5:12 pm, Peter Edwards p...@bjorsq.net wrote:
 Hi Nick

 $(.number).html(count--);

 count-- decrements your count variable after it has passed its value to
 the $.html() function.
 use --count

 Peter

 on 03/08/2009 21:15 littlerobothead said::



  I have a status area in an app I'm working on. It shows the number of
  unread alerts. As the user clicks each alert, it's subtracted from the
  total. The following code counts the number of items to use as my
  total:

  var trigger = $(#dataset-b tr.unread);
     var count = $(trigger).length;
     $(.number).html(count);

  And then this works to subtract from that number on each click:

     $(trigger).click(function(){
             $(.number).html(count--);
             if (count == 0){
                     $(trigger).unbind(click);
             }
             $(this).removeClass('unread');
     });

  Problem is, nothing happens on the first click. However, on the second
  click my number starts to decrement. What's going on here? How can I
  make the count work?

  Best,
  Nick


[jQuery] Re: Check if element is shown with show()

2009-08-03 Thread rupak mandal
Hi Stefan What i am getting is that, on click you have to display a
paragraph and hide another.

lia href= id=home class=changepara Home/a/li
lia href= id=about  class=changeparaAbout/a/li
lia href= id=contact  class=changeparaContact/a/li
lia href= id=gallery  class=changeparaGallery/a/li

$(.changepara).click(function(){$(.hangepara).hide();
   $(#+this.id).show();
})
})


I think this code will help you.
On Tue, Aug 4, 2009 at 5:29 AM, StefanCandan onlyo...@live.nl wrote:


 Hello, I'm building a website with JQuery.

 Now I need to check if an object is shown, with show()

 My jqeury to hide all the elements at start:

$(p.about).hide();
$(p.gallery).hide();
$(p.links).hide();
$(p.contact).hide();
$(p.home).hide();

 Then I show the p.home once the page finishes loading.

 Then when clicked on a link, the shown p element should be hidden with
 the hide() command, and another p element should be shown.

 so like:
 lia href=Home/a/li
 lia href=About/a/li


 p class=homeWelcome/p !-- Shown at start !--
 p class=aboutAbout me/p !-- Hidden at start !--


 so when about is clicked, p class=home should be hidden, using the
 hide(slow);

 and p class=about should be shown using the show(slow);


 Any ideas on how I can do this?



[jQuery] Jquery + Jquery.layout + Json2007 layout issues

2009-08-03 Thread Nitin

Hello,

I am implementing the Really Simple History(RSH) for my ajax
application on ruby-on-rails. I am using jquery layout for laying out
the page which gets updated with ajax calls. In order to implement the
back button in my application I am trying to use RSH. RSH library has
dependency on Json library. As soon as I include Json2007 library
(included before jquery library otherwise I run into number of java
script errors) the layout of my index page get disturbed. The index
page of my application is login page and the login form simply
disappears as soon as I include the Json2007.

Has anyone hit similar issue and found a solution? Is yes please share
how the problem was resolved.

Any pointers/help/suggestion to help resolve the above issue is
appreciated.

Nitin


[jQuery] Browser back button problem inn IE Chorme

2009-08-03 Thread Appu

Hi all,

I want to restrict page load on back button click. I have attach # in
url. And click on back button first time it remains in the same page.
It wark fine in FF,Opera and safari. But it not working in IE and
Chrome.

Is there any other way by which we can restrict page load on back
button click.

Thanks for the help in advance.


Regards
Appu