[jQuery] Re: Simulate BackSpace key

2009-01-11 Thread ggerri

Hi

I've done something similar with the Tab. Maybe that helps. You'll
need the FIELDS Plugin for that:

$("#PG1_L02-4-5")
.bind('keydown',function(e) {
  switch(e.keyCode) {
case 9:  // tab
  if(e.shiftKey) {
 $(this)
 .movePrev()
 .movePrev();
  }
  else {
 $(this)
 .moveNext()
 .moveNext();
  }
  break;
  };
});

Regards
Gerald

On Jan 9, 12:17 pm, RSol  wrote:
> I write WYSWYG editor and use to editing 'div' tag with .attr
> ('contentEditable','true')
>
> On 9 янв, 08:23, "jQuery Lover"  wrote:
>
>
>
> > Here is how to simulate a backspace in javascript:
>
> >   getElementById('yourTextBox').Select(TextBox1.SelectionStart - 1, 1)
> >   getElementById('yourTextBox').SelectedText = "
>
> > jQuery HowTo Resource  -  http://jquery-howto.blogspot.com- Hide quoted 
> > text -
>
> - Show quoted text -


[jQuery] Re: jQuery 1.3rc1 Ready

2009-01-11 Thread duck!


You mentioned the validate plugin: last I looked it was still using xpath
style '@' for attribute selectors 
( e.g. $(inp...@name=some]), which has been removed from 1.3 in favour of
plain [name=some]. Could be your problem?
 

jQuery.Nikola wrote:
> 
> 
> Well, that was really strange.  The problem was somewhere in the
> validate plug-in, I'm still working on this and not exactly sure what
> happened... but, all is well.
> 
> 

-- 
View this message in context: 
http://www.nabble.com/jQuery-1.3rc1-Ready-tp21407312s27240p21409772.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: jQuery 1.3rc1 Ready

2009-01-11 Thread Nikola

Well, that was really strange.  The problem was somewhere in the
validate plug-in, I'm still working on this and not exactly sure what
happened... but, all is well.


[jQuery] Re: jQuery 1.3rc1 Ready

2009-01-11 Thread Nikola

I was using 1.3b2 with UI1.6rc4 on one particular project I'm working
on.  I threw 1.3rc1 in to try it out and for some reason my tabs are
all over the place.  It will really take me some time to put a minimal
case together but I'll try to narrow this down a bit tomorrow.  Are
there any particular changes between b2 and rc4 that would have a
significant effect on tabs or anything that older plug-ins like
jCarousel or Galleria might not like?


[jQuery] Re: jQuery 1.3rc1 Ready

2009-01-11 Thread Nikola

I was using 1.3b2 with UI1.6rc4 on one particular project I'm working
on.  I threw 1.3rc1 in to try it out and for some reason my tabs are
all over the place.  It will really take me some time to put a minimal
case together but I'll try to narrow this down a bit tomorrow.  Are
there any particular changes between b2 and rc4 that would have a
significant effect on tabs or anything that would effect the
functionality of older plug ins like jCarousel or Galleria might not
like?


[jQuery] Re: Jquery Calling Servlet

2009-01-11 Thread RUQUIA TABASSUM
Here i need to use AJAX because  the servlet called is appended with input
parameters that contains 1 to 5 charectars and when i directly call
the servlet  instead of making ajax call the url is not completely formed
and the servlet is not invoked.

direct call:-

window.opener.location.href="../reports/BillIDPropIDExcelExport?csvstring="+csvstring+"&count="+count+"&proptypeValue="+proptypeValue+"&dbenvi="+dbenvi;

here csvstring contains 5 charectars and because of this the servlet is
not being invoked and the url is not properly formed.


thats the reason i need to use AJAX , now after using ajax i am struck here
at this point where i cant show the output of servlet to the user, that is
the open save and cancel dialogue box.
please help me in this issue.


[jQuery] Re: jQuery UI Tabs Flash

2009-01-11 Thread Chris

On Jan 11, 12:02 pm, Chris  wrote:
> I searched the archives, but I couldn't find an answer. For some
> reason the tabs, when initialized flashes, three times.  Any idea why?
>
> http://www.chris-gwen.com/

No ideas?


[jQuery] Re: jQuery 1.3rc1 Ready

2009-01-11 Thread John Resig

Do you have an example? It's kind of hard to figure out what's going
wrong with only a line to look at.

--John



On Sun, Jan 11, 2009 at 11:07 PM, Canglan  wrote:
>
> Kudos!
>
> John, the RC1's new selector is causing problems with some of my
> existing code base, I've submitted a ticket:
>
> http://dev.jquery.com/ticket/3826
>
> Thanks!


[jQuery] Re: jQuery 1.3rc1 Ready

2009-01-11 Thread John Resig

>> jQuery 1.3rc1 is ready. This means that 1.3 is effectively finished
>> barring a horrible bug between now and the final release on Wednesday
>
> That's great news.  For those of us who haven't been following recent
> development, are there any release notes available?

Nope - but there will be a full set of release notes to go with the
final release of 1.3. Just want to make sure that it's relatively
bug-free, first!

--John


[jQuery] Re: jQuery 1.3rc1 Ready

2009-01-11 Thread Canglan

Kudos!

John, the RC1's new selector is causing problems with some of my
existing code base, I've submitted a ticket:

http://dev.jquery.com/ticket/3826

Thanks!


[jQuery] JQuery Validation - call validate(options) multiple times to append options to current validator [validate]

2009-01-11 Thread phil

I'm wondering if it's possible to call the validate method multiple
times to append more options to the validator.
I haven't tried it, but it seems like it will overwrite previous
options.

Example psuedo code:

var formValidator = $("#myForm").validate(options1);
formValidator += $("#myForm)".validate(options2);

The idea behind this is to build validators using existing options
without rewriting them all, and they may not be stored in the same
options object.

If my above example is incorrect, what is the proper way?
Thanks



[jQuery] Re: [ definition css in other file ]

2009-01-11 Thread Scott Sauyet


Lord Gustavo Miguel Angel wrote:

my question. How i do to used this .css file in  my .html with jQuery¿


You can see a working sample here:

http://scott.sauyet.com/issues/2009-01-11a/

(Choose test.html.)

The key is this:



This points to the CSS file style.css in the same directory as the HTML 
page.  Once that's working you can play with other possible locations 
for the CSS, such as


href = "../../stylesheets/style.css"

which finds the CSS in the directory called "stylesheets" which sits in 
a directory parallel to the parent of the directory holding the HTML 
(because "../" means in essense, "up one level".


Or you could try it with a location such as

href = "/css/style.css"

which points to the root directory for your web content (because it 
starts with "/", then to the directory "css" inside that, and finally to 
the file "style.css" inside that directory.


This question, though, is not at all related to jQuery.  It has to do 
with the basics of CSS.  A great list for CSS is available at


http://www.css-discuss.org/

Good luck,

  -- Scott


[jQuery] Jquery tablesorter problem

2009-01-11 Thread varun

Hi
I was trying to use jquery table sorter plugins:

when ever I use it like :

//row and column here


and jquery:
$("#table1")
.tablesorter({widthFixed: true, widgets: ['zebra']})
.tablesorterPager({container: $("#pager")})

It works fine..

how ever if i use :

//row and column here


and jquery:
$("#"+serverIdPrefix+"table1")// serverIdPrefix nicely found what is
attached by server to id of table
.tablesorter({widthFixed: true, widgets: ['zebra']})
.tablesorterPager({container: $("#pager")})

it doesnt work when ever table is runat="server"

can some one help?

Thanks
Varun


[jQuery] Re: i don´t know how add css to my html wit h jquery.

2009-01-11 Thread Ricardo Tomasi

An external CSS file has nothing to do with any script, just use a
link inside :



On Jan 11, 8:59 pm, goosfancito  wrote:
> Thank´s Mauricio but...
> i like that are declaration stay in other file, not in file (for
> example) index.html...
> how i do?
>
> On 11 ene, 19:52, Kean  wrote:
>
> > Do not use jQuery 1.2.5, use 1.2.6 instead.
>
> > On Jan 11, 2:19 pm, "Mauricio \(Maujor\) Samy Silva"
>
> >  wrote:
> > > The css() jQuery method has two sintaxes.
>
> > > For one css declaration use:
> > > $('#contenido').css('float', 'left');
>
> > > For multiple css declarations use:
> > > $('#contenido').css ({
> > >      float: 'left',
> > >     width: '480px',
> > >     min-height: '250px',
> > >     ...,
> > >     backgroundColor: '#fff'
> > >     });
>
> > > See:http://docs.jquery.com/CSS/css#properties
>
> > > Maurício
>
> > > -Mensagem Original-
> > > De: "goosfancito" 
> > > Para: "jQuery (English)" 
> > > Enviada em: domingo, 11 de janeiro de 2009 18:07
> > > Assunto: [jQuery] i don´t know how add css to my html with jquery.
>
> > > Hello all!
>
> > > I have this .html
> > > -
> > >     
>
> > > 
> > > $(document).ready(function(){
>
> > > $("p").click(function(event){
> > > alert("Thanks for visiting!");});
> > > });
>
> > >     
>
> > > 
>
> > > 
> > > 
> > >         Escoger del menu
> > >     
>
> > > 
>
> > > 
>
> > > --- eof 8< 
>
> > > and i have this other .css:
>
> > > -
> > > #contenidos{
> > >     float:left;
> > >     width:480px;
> > >     min-height: 250px;
> > >     border: 3px solid grey;
> > >     margin-left: 10px;
> > >     padding: 5px;
> > >     padding-bottom: 8px;
> > >     background-color: #fff;
>
> > > }
>
> > > -EOF 8<-
>
> > > my question. How i do to used this .css file in  my .html with jQuery¿
>
> > > Thank´s


[jQuery] Re: jQuery 1.3rc1 Ready

2009-01-11 Thread Scott Sauyet


John Resig wrote:

jQuery 1.3rc1 is ready. This means that 1.3 is effectively finished
barring a horrible bug between now and the final release on Wednesday


That's great news.  For those of us who haven't been following recent 
development, are there any release notes available?


Cheers,

  -- Scott


[jQuery] jQuery 1.3rc1 Ready

2009-01-11 Thread Mike Alsup

Changing subject line back to original.

> > Hey Everyone -
>
> > jQuery 1.3rc1 is ready. This means that 1.3 is effectively finished
> > barring a horrible bug between now and the final release on Wednesday
> > (the 14th).
>
> > You can grab the source here:
> >http://code.jquery.com/jquery-1.3rc1.js
>
> > Please let me know, personally, if you find some bad new bug and we
> > can triage it together.
>
> > A screenshot of the final test run can be found here (on 8 browsers):
> >http://flickr.com/photos/jeresig/3189240673/
>
> > Who else here is excited to get this out the door?
>
> > --John


[jQuery] Re: Saving HTML as an image...

2009-01-11 Thread brian

You'll certainly have to look at something server-side. I suggest you
create a form with hidden fields that jQuery populates (I'm assuming
that the data is user-generated) and which is then sent to an
application to create the chart/graph.

If you use PHP, you coulduse the PEAR Image_Graph package, for example.

On Sun, Jan 11, 2009 at 7:02 PM, mumbojumbo  wrote:
>
> Hello,
>
> I'm working on an application that will use jquery to make charts and
> graphs and I want to allow the user to save the html as an image. Can
> this be done? This really isn't a jquery question per se, but I would
> like to know if jquery could do it/ or if it can be done at all.
>
> MJ


[jQuery] john. please example css

2009-01-11 Thread Lord Gustavo Miguel Angel


John, please publish full example of the use
one fine .html and other .css both with jquery.

Thank´s.
Please Not use .css inside .html file.


- Original Message - 
From: "John Resig" 

To: ; 
Sent: Sunday, January 11, 2009 11:15 PM
Subject: [jQuery] jQuery 1.3rc1 Ready




Hey Everyone -

jQuery 1.3rc1 is ready. This means that 1.3 is effectively finished
barring a horrible bug between now and the final release on Wednesday
(the 14th).

You can grab the source here:
http://code.jquery.com/jquery-1.3rc1.js

Please let me know, personally, if you find some bad new bug and we
can triage it together.

A screenshot of the final test run can be found here (on 8 browsers):
http://flickr.com/photos/jeresig/3189240673/

Who else here is excited to get this out the door?

--John 




[jQuery] jQuery 1.3rc1 Ready

2009-01-11 Thread John Resig

Hey Everyone -

jQuery 1.3rc1 is ready. This means that 1.3 is effectively finished
barring a horrible bug between now and the final release on Wednesday
(the 14th).

You can grab the source here:
http://code.jquery.com/jquery-1.3rc1.js

Please let me know, personally, if you find some bad new bug and we
can triage it together.

A screenshot of the final test run can be found here (on 8 browsers):
http://flickr.com/photos/jeresig/3189240673/

Who else here is excited to get this out the door?

--John


[jQuery] Re: jQuery UI tabs widget problem

2009-01-11 Thread Klaus Hartl

Again, everything works as expected for me. Could you possibly put up
a test case?

Also, could you try and update to latest version from the repository?
It may be related to a bug that occured when initializing a div
instead of a ul element.

BTW, in your first example you need to use the data method:

jQuery('#product').data("disabled.tabs", [1,2,3,4]);


--Klaus


On 12 Jan., 00:03, Jesse  wrote:
> I would like to confirm that the array methods for disabling tabs does
> not work.
>
> I have 1.6rc4 installed.  5 Tabs 4 of which I need disabled on page
> load
>
>                 jQuery('#product').tabs();
>                 jQuery('#product').tabs("disabled.tabs", [1,2,3,4]);
>
> does not work.. neither does
>
>                 jQuery('#product').tabs({ disabled: [1,2,3,4] });
>
> However this does work
>
>                 jQuery('#product').tabs();
>                 jQuery('#product').tabs("disable", 1);
>                 jQuery('#product').tabs("disable", 2);
>                 jQuery('#product').tabs("disable", 3);
>                 jQuery('#product').tabs("disable", 4);
>
> J
>
> On Jan 10, 4:25 am, Klaus Hartl  wrote:
>
> > $("#tabs").data('disabled.tabs', [1,2]) as well as $("#tabs").tabs
> > ({ disabled: [1,2] }) both do work fine for me.
>
> > --Klaus
>
> > On 9 Jan., 12:47, tesdev  wrote:
>
> > > Using jquery.ui-1.6rc4\jquery.ui-1.6rc4\demos\tabs\default.html as a
> > > base
> > > Getting there... ui-state-disabled is assigned but...
> > > line 11 ...
> > >         $(function() {
> > >                 $("#tabs").tabs();
> > >                 // tried 3disablevariations from different sources
> > >                 //$("#tabs").data('disabled.tabs', [1,2]);
> > >                 $("#tabs").tabs("disable", 1);  //works
> > >                 $("#tabs").tabs("disable", 2); //works
> > >                 //$("#tabs").tabs({disabled: [1,2]});
> > >         });
> > > The array versions dont work - should they in this context?
> > > Danny
>
> > > On Dec 31 2008, 5:26 pm, Klaus Hartl 
> > > wrote:
>
> > > > No suggestions unless you show us some code...
>
> > > > --Klaus
>
> > > > On 31 Dez., 08:11, JasonR  wrote:
>
> > > > > Hello,
> > > > > I have some content and am using thetabswidget to reload without
> > > > > refreshing. Everything is working fine except for one problem...the 
> > > > > ui-
> > > > >tabs-disabled class is not being assigned to any of thetabs.
> > > > > Whichever tab I click is assigned the ui-tabs-selected class, and the
> > > > > tab adopts the styles for that class. But my styles for the disabled
> > > > >tabsare not showing up. Checking in Firebug I can verify that the
> > > > > class is not being assigned.
>
> > > > > Any suggestions? Thanks.


[jQuery] Re: [ definition css in other file ]

2009-01-11 Thread Lord Gustavo Miguel Angel
no problem. 
don´t work
thank´s
  - Original Message - 
  From: Varun Khatri 
  To: jquery-en@googlegroups.com 
  Sent: Sunday, January 11, 2009 9:58 PM
  Subject: [jQuery] Re: [ definition css in other file ]


  
// remove this line from your code
 
   
   Parte del contenido

  Escoger del menu
  

  check your file is in css folder as you are writing :  css/estilos.css

  estilos.css should be in folder name css...
  I tried your code and it works fine...

 
  


  On Sun, Jan 11, 2009 at 5:18 PM, Lord Gustavo Miguel Angel 
 wrote:

no work sorry i write in spanish.
but in file that i send you can see this lines:

but when i use this:



   
 
 Parte del contenido

Escoger del menu


   

it no work

  - Original Message - 
  From: Varun Khatri 
  To: jquery-en@googlegroups.com 
  Sent: Sunday, January 11, 2009 9:03 PM
  Subject: [jQuery] Re: [ definition css in other file ]


  u can try like :

 




  2009/1/11 Lord Gustavo Miguel Angel 

ok. i trade explaint problem.

i have 2 file:
index.html( i send file with name html.txt)
style.css( i send file with name style.txt)

my problem:
how i do to use index.html and style.css and jQuery?



- Original Message - 
  From: Varun Khatri 
  To: jquery-en@googlegroups.com 
  Sent: Sunday, January 11, 2009 8:45 PM
  Subject: [jQuery] Re: [ definition css in other file ]


  i dint get you ?
  tell what is the problem?


  On Sun, Jan 11, 2009 at 3:05 PM, goosfancito  
wrote:


thank´s but i before do this

   

but don´t...




On 11 ene, 19:59, "Varun Khatri"  wrote:
> make a .css file like test.css and use it like:
> 
> hope this helps!!
>
> On Sun, Jan 11, 2009 at 3:56 PM, Lord Gustavo Miguel Angel <
>

> goosfanc...@gmail.com> wrote:
> >  Hello all!
>
> > I have this .html
> > -
> > 
>
> > 
> > $(document).ready(function(){
>
> > $("p").click(function(event){
> > alert("Thanks for visiting!");
> > });
> > });
> > 
>
> > 
>
> > 
> > 
> > Escoger del menu
> > 
>
> > 
>
> > 
>
> > --- eof 8< 
>
> > and i have this other .css:
>
> > -
> > #contenidos{
> > float:left;
> > width:480px;
> > min-height: 250px;
> > border: 3px solid grey;
> > margin-left: 10px;
> > padding: 5px;
> > padding-bottom: 8px;
> > background-color: #fff;
> > }
>
> > -EOF 8<-
>
> > my question. How i do to used this .css file in  my .html with 
jQuery¿
>
> > Thank´s







[jQuery] Re: [ definition css in other file ]

2009-01-11 Thread Varun Khatri

   *   // remove this line from your code*

 
 Parte del contenido
Escoger del menu


check your file is in css folder as you are writing :  *css/estilos.css*

*estilos.css should be in folder name css...
I tried your code and it works fine...
*



On Sun, Jan 11, 2009 at 5:18 PM, Lord Gustavo Miguel Angel <
goosfanc...@gmail.com> wrote:

>  no work sorry i write in spanish.
> but in file that i send you can see this lines:
> 
> but when i use this:
>
> 
> 
>
>  
>  Parte del contenido
> Escoger del menu
> 
>
>
> 
> it no work
>
>
> - Original Message -
> *From:* Varun Khatri 
> *To:* jquery-en@googlegroups.com
> *Sent:* Sunday, January 11, 2009 9:03 PM
> *Subject:* [jQuery] Re: [ definition css in other file ]
>
> u can try like :
>   
>
>
>
>
> 2009/1/11 Lord Gustavo Miguel Angel 
>
>>  ok. i trade explaint problem.
>>
>> i have 2 file:
>> index.html( i send file with name html.txt)
>> style.css( i send file with name style.txt)
>>
>> my problem:
>> how i do to use index.html and style.css and jQuery?
>>
>>
>>
>> - Original Message -
>>
>> *From:* Varun Khatri 
>> *To:* jquery-en@googlegroups.com
>> *Sent:* Sunday, January 11, 2009 8:45 PM
>> *Subject:* [jQuery] Re: [ definition css in other file ]
>>
>> i dint get you ?
>> tell what is the problem?
>>
>> On Sun, Jan 11, 2009 at 3:05 PM, goosfancito wrote:
>>
>>>
>>> thank´s but i before do this
>>>
>>> but don´t...
>>>
>>>
>>>
>>> On 11 ene, 19:59, "Varun Khatri"  wrote:
>>> > make a .css file like test.css and use it like:
>>> > 
>>> > hope this helps!!
>>> >
>>> > On Sun, Jan 11, 2009 at 3:56 PM, Lord Gustavo Miguel Angel <
>>> >
>>>  > goosfanc...@gmail.com> wrote:
>>> > >  Hello all!
>>> >
>>> > > I have this .html
>>> > > -
>>> > > 
>>> >
>>> > > 
>>> > > $(document).ready(function(){
>>> >
>>> > > $("p").click(function(event){
>>> > > alert("Thanks for visiting!");
>>> > > });
>>> > > });
>>> > > 
>>> >
>>> > > 
>>> >
>>> > > 
>>> > > 
>>> > > Escoger del menu
>>> > > 
>>> >
>>> > > 
>>> >
>>> > > 
>>> >
>>> > > --- eof 8< 
>>> >
>>> > > and i have this other .css:
>>> >
>>> > > -
>>> > > #contenidos{
>>> > > float:left;
>>> > > width:480px;
>>> > > min-height: 250px;
>>> > > border: 3px solid grey;
>>> > > margin-left: 10px;
>>> > > padding: 5px;
>>> > > padding-bottom: 8px;
>>> > > background-color: #fff;
>>> > > }
>>> >
>>> > > -EOF 8<-
>>> >
>>> > > my question. How i do to used this .css file in  my .html with
>>> jQuery¿
>>> >
>>> > > Thank´s
>>>
>>
>>
>


[jQuery] Re: Saving HTML as an image...

2009-01-11 Thread Scott Sauyet


mumbojumbo wrote:

I'm working on an application that will use jquery to make charts and
graphs and I want to allow the user to save the html as an image. Can
this be done? This really isn't a jquery question per se, but I would
like to know if jquery could do it/ or if it can be done at all.


AFAIK, there is nothing in jQuery to do this for you and no easy way to 
build it in Javascript.  You probably need to look toward server-side 
solutions.  But depending upon how wedded you are to an image format, it 
might be feasible to use jQuery along with only minor server-side 
handling to build something which saves an HTML page that includes a 
link to jQuery and some Javascript that regenerates the image in a 
browser.  I've never tried anything like that, but it seems possible, 
and in fact seems a bit intriguing.


Good luck,

  -- Scott


[jQuery] How to move an image to another div??

2009-01-11 Thread webmas...@terradon.nl

Hi all,
i cant find a way to move an image from one div to another.
I only found UI but that all works with mouseclicks??

What already works:
when i click on an image, i use the taconite plugin, for processing
game results (great plugin) and returning xml data so i can update
some content (text).

The only way i can update the game page, is refreshing the page, so
retrieving, including the renewed one, all data again. waste of
resources and certainly not a nice thing to view.

What i am looking for, is a method i really can see the image moving
to his destination div, without the need to click on it again. ( the
first time is to select the image, secondly click on the destination
div. This second click, triggers the ajax call to process the gamedata
and should also nicely upgrade the on screen view.

I can't figured it out with UI.

Somebody any hints for me?
Thanks in advance for helping me out.


[jQuery] Re: Panorama Viewer

2009-01-11 Thread Mikeytown2

by overlapping 4px I never get any white space after 10 min of
looping. The IE hack is 2 fold. I need a wrapper div, and I also have
to use position:absolute;. In FF you can use position: relative; and
no wrapper, much cleaner. This is my first Jquery Script, so if there
is any advice/tips for improvement, I'm all ears. I should probably
make it all JS so I can auto detect the image size, ect...

On Jan 11, 6:53 am, donb  wrote:
> I simply saved the html to my hard drive and opened it.
>
> What I don't get is the 2044.  2x1024 = 2048.  What's significant
> about the number used?  And where is the 'ugly IE hack?'
>
> On Jan 11, 9:03 am, Mike Alsup  wrote:
>
> > > First made one using canvas, but ExplorerCanvas didn't like the 
> > > it.https://developer.mozilla.org/en/Canvas_tutorial/Basic_animationshttp...
>
> > > Source 
> > > Imagehttp://commons.wikimedia.org/wiki/File:Capitan_Meadows,_Yosemite_Nati...
>
> > > So next I did it using jQuery, here is my result. Tested in FF3,
> > > IE6/7. Would have been easy to do except for the ugly IE css hacks.
>
> > >  > > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
> > > http://www.w3.org/1999/xhtml";>
>
> > > 
> > > 
> > >   
>
> > >   
> > >   $(document).ready(function(){
> > >     var speed = 3;
> > >     $("#left").click(function () {
> > >     runA();
> > >     runB();
> > >     });
>
> > >         function runA() {
> > >         $("#blockA").animate({"left": "-=1024px"}, speed, "linear");
> > >         $("#blockA").animate({"left": "+=2044px"}, 1, "linear");
> > >         $("#blockA").animate({"left": "-=1024px"}, speed, "linear",runA);
> > >         }
>
> > >         function runB() {
> > >         $("#blockB").animate({"left": "-=1024px"}, speed, "linear");
> > >         $("#blockB").animate({"left": "-=1024px"}, speed, "linear");
> > >         $("#blockB").animate({"left": "+=2044px"}, 1, "linear",runB);
> > >         }
>
> > >   });
> > >   
> > >   
> > >   img {
> > >     padding: 0;
> > >         margin: 0;
> > >         }
> > >   div#t {
> > >         overflow:hidden;
> > >         width:800px;
> > >         height:198px;
> > >         word-wrap: break-word;
> > >   }
>
> > >   #blockA, #blockB {
> > >   position:absolute;
> > >   }
> > >    #blockB {
> > >   left:1023px;
> > >   }
> > >     #wrapper {
> > > height: 100%;
> > > width: 800px;
> > > overflow: hidden;
> > > border: 3px solid; /* this is just for debugging, to see if the
> > > browser actually does something sane */
> > > position: relative;}
>
> > >   
> > > 
>
> > > 
> > >   «
>
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
>
> > > 
> > > 
> > > 
>
> > > 
> > > 
>
> > Can you post a live link to this?  How are we supposed to see it?


[jQuery] Re: Toggle child elements

2009-01-11 Thread Wacko Jacko

Hi donb,

It sounds like you know much more than I do. I am still quite new to
jQuery. Can you point me in the right direction to have these elements
slide in (down)?

Thanks in advance for your help.

Jackson

On Jan 8, 2:01 pm, donb  wrote:
> Ddoesn't the animation actually consist of an expanding div - meaning,
> the contents (and the outermost div) are fixed in position?  Nothing
> is actually 'sliding down'
>
> On Jan 7, 8:58 pm, Wacko Jacko  wrote:
>
> > Hi All,
>
> > Quite new to jQuery so would very much appreciate your help.
>
> >http://www.punklogic.com.au/contact-punk-logic.htmifyou click on the
> > tab in the header called 'PunkLogic elsewhere' you will notice I have
> > used the toggle command to view a div in the header. Problem is, the
> > elements   etc inside that div do not toggle with the main
> > div. I would like all of the elements inside this div to follow the
> > same motion, not just appear once the toggle is finished. Any
> > suggestions would be greatly appreciated.
>
> > Regards,
> > Jacksonwww.punklogic.com.au


[jQuery] Re: [ definition css in other file ]

2009-01-11 Thread Lord Gustavo Miguel Angel
no work sorry i write in spanish.
but in file that i send you can see this lines:

but when i use this:



   
 
 Parte del contenido
Escoger del menu


   

it no work

  - Original Message - 
  From: Varun Khatri 
  To: jquery-en@googlegroups.com 
  Sent: Sunday, January 11, 2009 9:03 PM
  Subject: [jQuery] Re: [ definition css in other file ]


  u can try like :

 




  2009/1/11 Lord Gustavo Miguel Angel 

ok. i trade explaint problem.

i have 2 file:
index.html( i send file with name html.txt)
style.css( i send file with name style.txt)

my problem:
how i do to use index.html and style.css and jQuery?



- Original Message - 
  From: Varun Khatri 
  To: jquery-en@googlegroups.com 
  Sent: Sunday, January 11, 2009 8:45 PM
  Subject: [jQuery] Re: [ definition css in other file ]


  i dint get you ?
  tell what is the problem?


  On Sun, Jan 11, 2009 at 3:05 PM, goosfancito  
wrote:


thank´s but i before do this

   

but don´t...




On 11 ene, 19:59, "Varun Khatri"  wrote:
> make a .css file like test.css and use it like:
> 
> hope this helps!!
>
> On Sun, Jan 11, 2009 at 3:56 PM, Lord Gustavo Miguel Angel <
>

> goosfanc...@gmail.com> wrote:
> >  Hello all!
>
> > I have this .html
> > -
> > 
>
> > 
> > $(document).ready(function(){
>
> > $("p").click(function(event){
> > alert("Thanks for visiting!");
> > });
> > });
> > 
>
> > 
>
> > 
> > 
> > Escoger del menu
> > 
>
> > 
>
> > 
>
> > --- eof 8< 
>
> > and i have this other .css:
>
> > -
> > #contenidos{
> > float:left;
> > width:480px;
> > min-height: 250px;
> > border: 3px solid grey;
> > margin-left: 10px;
> > padding: 5px;
> > padding-bottom: 8px;
> > background-color: #fff;
> > }
>
> > -EOF 8<-
>
> > my question. How i do to used this .css file in  my .html with 
jQuery¿
>
> > Thank´s





[jQuery] Re: [ definition css in other file ]

2009-01-11 Thread Varun Khatri
u can try like :
  
   



2009/1/11 Lord Gustavo Miguel Angel 

>  ok. i trade explaint problem.
>
> i have 2 file:
> index.html( i send file with name html.txt)
> style.css( i send file with name style.txt)
>
> my problem:
> how i do to use index.html and style.css and jQuery?
>
>
>
> - Original Message -
>
> *From:* Varun Khatri 
> *To:* jquery-en@googlegroups.com
> *Sent:* Sunday, January 11, 2009 8:45 PM
> *Subject:* [jQuery] Re: [ definition css in other file ]
>
> i dint get you ?
> tell what is the problem?
>
> On Sun, Jan 11, 2009 at 3:05 PM, goosfancito wrote:
>
>>
>> thank´s but i before do this
>>
>> but don´t...
>>
>>
>>
>> On 11 ene, 19:59, "Varun Khatri"  wrote:
>> > make a .css file like test.css and use it like:
>> > 
>> > hope this helps!!
>> >
>> > On Sun, Jan 11, 2009 at 3:56 PM, Lord Gustavo Miguel Angel <
>> >
>>  > goosfanc...@gmail.com> wrote:
>> > >  Hello all!
>> >
>> > > I have this .html
>> > > -
>> > > 
>> >
>> > > 
>> > > $(document).ready(function(){
>> >
>> > > $("p").click(function(event){
>> > > alert("Thanks for visiting!");
>> > > });
>> > > });
>> > > 
>> >
>> > > 
>> >
>> > > 
>> > > 
>> > > Escoger del menu
>> > > 
>> >
>> > > 
>> >
>> > > 
>> >
>> > > --- eof 8< 
>> >
>> > > and i have this other .css:
>> >
>> > > -
>> > > #contenidos{
>> > > float:left;
>> > > width:480px;
>> > > min-height: 250px;
>> > > border: 3px solid grey;
>> > > margin-left: 10px;
>> > > padding: 5px;
>> > > padding-bottom: 8px;
>> > > background-color: #fff;
>> > > }
>> >
>> > > -EOF 8<-
>> >
>> > > my question. How i do to used this .css file in  my .html with jQuery¿
>> >
>> > > Thank´s
>>
>
>


[jQuery] Saving HTML as an image...

2009-01-11 Thread mumbojumbo

Hello,

I'm working on an application that will use jquery to make charts and
graphs and I want to allow the user to save the html as an image. Can
this be done? This really isn't a jquery question per se, but I would
like to know if jquery could do it/ or if it can be done at all.

MJ


[jQuery] Re: [ definition css in other file ]

2009-01-11 Thread Lord Gustavo Miguel Angel
ok. i trade explaint problem.

i have 2 file:
index.html( i send file with name html.txt)
style.css( i send file with name style.txt)

my problem:
how i do to use index.html and style.css and jQuery?



- Original Message - 
  From: Varun Khatri 
  To: jquery-en@googlegroups.com 
  Sent: Sunday, January 11, 2009 8:45 PM
  Subject: [jQuery] Re: [ definition css in other file ]


  i dint get you ?
  tell what is the problem?


  On Sun, Jan 11, 2009 at 3:05 PM, goosfancito  wrote:


thank´s but i before do this

   

but don´t...




On 11 ene, 19:59, "Varun Khatri"  wrote:
> make a .css file like test.css and use it like:
> 
> hope this helps!!
>
> On Sun, Jan 11, 2009 at 3:56 PM, Lord Gustavo Miguel Angel <
>

> goosfanc...@gmail.com> wrote:
> >  Hello all!
>
> > I have this .html
> > -
> > 
>
> > 
> > $(document).ready(function(){
>
> > $("p").click(function(event){
> > alert("Thanks for visiting!");
> > });
> > });
> > 
>
> > 
>
> > 
> > 
> > Escoger del menu
> > 
>
> > 
>
> > 
>
> > --- eof 8< 
>
> > and i have this other .css:
>
> > -
> > #contenidos{
> > float:left;
> > width:480px;
> > min-height: 250px;
> > border: 3px solid grey;
> > margin-left: 10px;
> > padding: 5px;
> > padding-bottom: 8px;
> > background-color: #fff;
> > }
>
> > -EOF 8<-
>
> > my question. How i do to used this .css file in  my .html with jQuery¿
>
> > Thank´s

http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
http://www.w3.org/1999/xhtml";>



ejemplo de AJAX






$(document).ready(function(){   

$("p").click(function(event){
alert("Thanks for visiting!");
 });
});


 



   

Parte del contenido
Escoger del menu






#contenidos{
float:left;
width:480px;
min-height: 250px;
border: 3px solid grey;
margin-left: 10px;
padding: 5px;
padding-bottom: 8px;
background-color: #fff;
}


[jQuery] Re: [ definition css in other file ]

2009-01-11 Thread Varun Khatri
i dint get you ?
tell what is the problem?

On Sun, Jan 11, 2009 at 3:05 PM, goosfancito  wrote:

>
> thank´s but i before do this
> 
> but don´t...
>
>
>
> On 11 ene, 19:59, "Varun Khatri"  wrote:
> > make a .css file like test.css and use it like:
> > 
> > hope this helps!!
> >
> > On Sun, Jan 11, 2009 at 3:56 PM, Lord Gustavo Miguel Angel <
> >
> > goosfanc...@gmail.com> wrote:
> > >  Hello all!
> >
> > > I have this .html
> > > -
> > > 
> >
> > > 
> > > $(document).ready(function(){
> >
> > > $("p").click(function(event){
> > > alert("Thanks for visiting!");
> > > });
> > > });
> > > 
> >
> > > 
> >
> > > 
> > > 
> > > Escoger del menu
> > > 
> >
> > > 
> >
> > > 
> >
> > > --- eof 8< 
> >
> > > and i have this other .css:
> >
> > > -
> > > #contenidos{
> > > float:left;
> > > width:480px;
> > > min-height: 250px;
> > > border: 3px solid grey;
> > > margin-left: 10px;
> > > padding: 5px;
> > > padding-bottom: 8px;
> > > background-color: #fff;
> > > }
> >
> > > -EOF 8<-
> >
> > > my question. How i do to used this .css file in  my .html with jQuery¿
> >
> > > Thank´s
>


[jQuery] resize event just doesn't what to play ball

2009-01-11 Thread jeremyBass

hello I ve been working on this issues for a month now.. so the issue
is that the resize event is just locking up... and will not work if
the page loads to fast... I have to slow the script down so it doesn't
bind up is seems... here it is...

$(window).bind('resize', function(){
window.setTimeout(function() {doResize();}, 500);
//doResize();
//}).bind(‘mouseover’,function(){
//  doResize();
//  window.setTimeout(function() {doResize();}, 250);
}).load(function(){
doResize();
}).resize(function(){
//doResize();
window.setTimeout(function() 
{doResize();}, 500);
});

$('a').not('a.lightbox').bind('click',function(){
window.setTimeout(function() {doResize();}, 15);
});
window.setTimeout(function() {doResize();}, 15);



now the thing is this.. $('a'). always works 100%... doResize(); fires
every time...
thing is I know 99% it’s resize being the bastard do to ‘mouseover’
also overing 100%

I have two places you can check out

http://www.hellscanyonsportfishing.com/testing.html

which loads slower as it's open... so I don't have to use the
setTimeout there

and
http://www.hellscanyonsportfishing.com/

which is the buttoned down version... and has the window.setTimeout
(function() {doResize();}, 15);


but this it the thing it is like the resize event just doesn't
what to play ball it's allover the map anyone have any ideas?


thank you for the help...

if you need more information you can read more here
http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Jquery/Q_24030572.html#a23349859
and
http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Jquery/Q_23943324.html

tons and tons of talk about how and way the resize may not be
working... It almost seems like a core issue with jQuery it's self???

again thank you for the help...

jeremyBass



[jQuery] Re: $.post not working with object arrays

2009-01-11 Thread Jolyon Terwilliger

change

test.arr = new Array(1, 2, 3);

to

test["arr[]"] = new Array(1, 2, 3);

awkward, but should work..

On Dec 23 2008, 10:52 am, drimsun  wrote:
> Hello,
>
> Whenever I try to pass an object containing array data through jQuery
> AJAX only the
> last value of the array is sent. Consider this example:
>
> var test = new Object();
> test.arr = new Array(1, 2, 3);
> $.post("script.php", test, callback);
>
> If I print_r($_POST) in the script.php all I get is:
> Array ( [arr] => 3 )
>
> Instead of:
> Array ( [arr] => Array ( [0] => 1 [1] => 2 [2] => 3 ) )
>
> Any idea what's causing this? Thanks


[jQuery] resize unstable

2009-01-11 Thread jeremyBass

hello I ve been working on this issues for a month now.. so the issue
is that the resize event is just locking up... and will not work if
the page loads to fast... I have to slow the script down so it doesn't
bind up is seems... here it is...

$(window).bind('resize', function(){
window.setTimeout(function() {doResize();}, 500);
//doResize();
//}).bind(‘mouseover’,function(){
//  doResize();
//  window.setTimeout(function() {doResize();}, 250);
}).load(function(){
doResize();
}).resize(function(){
//doResize();
window.setTimeout(function() 
{doResize();}, 500);
});

$('a').not('a.lightbox').bind('click',function(){
window.setTimeout(function() {doResize();}, 15);
});
window.setTimeout(function() {doResize();}, 15);



now the thing is this.. $('a'). always works 100%... doResize(); fires
every time...

also the mouseover’ works 100% so it's just the resize... it's all
broken...

I have two places you can check out

http://www.hellscanyonsportfishing.com/testing.html

which loads slower as it's open... so I don't have to use the
setTimeout there

and
http://www.hellscanyonsportfishing.com/

which is the buttoned down version... and has the window.setTimeout
(function() {doResize();}, 15);


but this it the thing it is like the resize event just doesn't
what to play ball it's allover the map anyone have any ideas?


thank you for the help...

if you need more information you can read more here
http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Jquery/Q_24030572.html#a23349859
and
http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Jquery/Q_23943324.html

tons and tons of talk about how and way the resize may not be
working... It almost seems like a core issue with jQuery it's self???

again thank you for the help...

jeremyBass



[jQuery] the resize event just doesn't what to play ball

2009-01-11 Thread jeremyBass

hello I ve been working on this issues for a month now.. so the issue
is that the resize event is just locking up... and will not work if
the page loads to fast... I have to slow the script down so it doesn't
bind up is seems... here it is...

$(window).bind('resize', function(){
window.setTimeout(function() {doResize();}, 500);
//doResize();
//}).bind(‘mouseover’,function(){
//  doResize();
//  window.setTimeout(function() {doResize();}, 250);
}).load(function(){
doResize();
}).resize(function(){
//doResize();
window.setTimeout(function() 
{doResize();}, 500);
});

$('a').not('a.lightbox').bind('click',function(){
window.setTimeout(function() {doResize();}, 15);
});
window.setTimeout(function() {doResize();}, 15);



now the thing is this.. $('a'). always works 100%... doResize(); fires
every time...
thing is I know 99% it’s resize being the bastard do to ‘mouseover’
also overing 100%

I have two places you can check out

http://www.hellscanyonsportfishing.com/testing.html

which loads slower as it's open... so I don't have to use the
setTimeout there

and
http://www.hellscanyonsportfishing.com/

which is the buttoned down version... and has the window.setTimeout
(function() {doResize();}, 15);


but this it the thing it is like the resize event just doesn't
what to play ball it's allover the map anyone have any ideas?


thank you for the help...

if you need more information you can read more here
http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Jquery/Q_24030572.html#a23349859
and
http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Jquery/Q_23943324.html

tons and tons of talk about how and way the resize may not be
working... It almost seems like a core issue with jQuery it's self???

again thank you for the help...

jeremyBass



[jQuery] Re: jQuery UI tabs widget problem

2009-01-11 Thread Jesse

I would like to confirm that the array methods for disabling tabs does
not work.

I have 1.6rc4 installed.  5 Tabs 4 of which I need disabled on page
load

jQuery('#product').tabs();
jQuery('#product').tabs("disabled.tabs", [1,2,3,4]);

does not work.. neither does

jQuery('#product').tabs({ disabled: [1,2,3,4] });

However this does work

jQuery('#product').tabs();
jQuery('#product').tabs("disable", 1);
jQuery('#product').tabs("disable", 2);
jQuery('#product').tabs("disable", 3);
jQuery('#product').tabs("disable", 4);

J


On Jan 10, 4:25 am, Klaus Hartl  wrote:
> $("#tabs").data('disabled.tabs', [1,2]) as well as $("#tabs").tabs
> ({ disabled: [1,2] }) both do work fine for me.
>
> --Klaus
>
> On 9 Jan., 12:47, tesdev  wrote:
>
> > Using jquery.ui-1.6rc4\jquery.ui-1.6rc4\demos\tabs\default.html as a
> > base
> > Getting there... ui-state-disabled is assigned but...
> > line 11 ...
> >         $(function() {
> >                 $("#tabs").tabs();
> >                 // tried 3disablevariations from different sources
> >                 //$("#tabs").data('disabled.tabs', [1,2]);
> >                 $("#tabs").tabs("disable", 1);  //works
> >                 $("#tabs").tabs("disable", 2); //works
> >                 //$("#tabs").tabs({disabled: [1,2]});
> >         });
> > The array versions dont work - should they in this context?
> > Danny
>
> > On Dec 31 2008, 5:26 pm, Klaus Hartl 
> > wrote:
>
> > > No suggestions unless you show us some code...
>
> > > --Klaus
>
> > > On 31 Dez., 08:11, JasonR  wrote:
>
> > > > Hello,
> > > > I have some content and am using thetabswidget to reload without
> > > > refreshing. Everything is working fine except for one problem...the ui-
> > > >tabs-disabled class is not being assigned to any of thetabs.
> > > > Whichever tab I click is assigned the ui-tabs-selected class, and the
> > > > tab adopts the styles for that class. But my styles for the disabled
> > > >tabsare not showing up. Checking in Firebug I can verify that the
> > > > class is not being assigned.
>
> > > > Any suggestions? Thanks.


[jQuery] Ok... one more try....the resize event just doesn't what to play ball

2009-01-11 Thread jeremyBass

hello I ve been working on this issues for a month now.. so the issue
is that the resize event is just locking up... and will not work if
the page loads to fast... I have to slow the script down so it doesn't
bind up is seems... here it is...

$(window).bind('resize', function(){
window.setTimeout(function() {doResize();}, 500);
//doResize();
//}).bind(‘mouseover’,function(){
//  doResize();
//  window.setTimeout(function() {doResize();}, 250);
}).load(function(){
doResize();
}).resize(function(){
//doResize();
window.setTimeout(function() 
{doResize();}, 500);
});

$('a').not('a.lightbox').bind('click',function(){
window.setTimeout(function() {doResize();}, 15);
});
window.setTimeout(function() {doResize();}, 15);



now the thing is this.. $('a'). always works 100%... doResize(); fires
every time...
thing is I know 99% it’s resize being the bastard do to ‘mouseover’
also overing 100%

I have two places you can check out

http://www.hellscanyonsportfishing.com/testing.html

which loads slower as it's open... so I don't have to use the
setTimeout there

and
http://www.hellscanyonsportfishing.com/

which is the buttoned down version... and has the window.setTimeout
(function() {doResize();}, 15);


but this it the thing it is like the resize event just doesn't
what to play ball it's allover the map anyone have any ideas?


thank you for the help...

if you need more information you can read more here
http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Jquery/Q_24030572.html#a23349859
and
http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Jquery/Q_23943324.html

tons and tons of talk about how and way the resize may not be
working... It almost seems like a core issue with jQuery it's self???

again thank you for the help...

jeremyBass



[jQuery] Re: [ definition css in other file ]

2009-01-11 Thread goosfancito

thank´s but i before do this

but don´t...



On 11 ene, 19:59, "Varun Khatri"  wrote:
> make a .css file like test.css and use it like:
>     
> hope this helps!!
>
> On Sun, Jan 11, 2009 at 3:56 PM, Lord Gustavo Miguel Angel <
>
> goosfanc...@gmail.com> wrote:
> >  Hello all!
>
> > I have this .html
> > -
> >     
>
> > 
> > $(document).ready(function(){
>
> > $("p").click(function(event){
> > alert("Thanks for visiting!");
> > });
> > });
> >     
>
> > 
>
> > 
> > 
> >         Escoger del menu
> >     
>
> > 
>
> > 
>
> > --- eof 8< 
>
> > and i have this other .css:
>
> > -
> > #contenidos{
> >     float:left;
> >     width:480px;
> >     min-height: 250px;
> >     border: 3px solid grey;
> >     margin-left: 10px;
> >     padding: 5px;
> >     padding-bottom: 8px;
> >     background-color: #fff;
> > }
>
> > -EOF 8<-
>
> > my question. How i do to used this .css file in  my .html with jQuery¿
>
> > Thank´s


[jQuery] Re: i don´t know how add css to my html wit h jquery.

2009-01-11 Thread goosfancito

Thank´s Mauricio but...
i like that are declaration stay in other file, not in file (for
example) index.html...
how i do?


On 11 ene, 19:52, Kean  wrote:
> Do not use jQuery 1.2.5, use 1.2.6 instead.
>
> On Jan 11, 2:19 pm, "Mauricio \(Maujor\) Samy Silva"
>
>  wrote:
> > The css() jQuery method has two sintaxes.
>
> > For one css declaration use:
> > $('#contenido').css('float', 'left');
>
> > For multiple css declarations use:
> > $('#contenido').css ({
> >      float: 'left',
> >     width: '480px',
> >     min-height: '250px',
> >     ...,
> >     backgroundColor: '#fff'
> >     });
>
> > See:http://docs.jquery.com/CSS/css#properties
>
> > Maurício
>
> > -Mensagem Original-
> > De: "goosfancito" 
> > Para: "jQuery (English)" 
> > Enviada em: domingo, 11 de janeiro de 2009 18:07
> > Assunto: [jQuery] i don´t know how add css to my html with jquery.
>
> > Hello all!
>
> > I have this .html
> > -
> >     
>
> > 
> > $(document).ready(function(){
>
> > $("p").click(function(event){
> > alert("Thanks for visiting!");});
> > });
>
> >     
>
> > 
>
> > 
> > 
> >         Escoger del menu
> >     
>
> > 
>
> > 
>
> > --- eof 8< 
>
> > and i have this other .css:
>
> > -
> > #contenidos{
> >     float:left;
> >     width:480px;
> >     min-height: 250px;
> >     border: 3px solid grey;
> >     margin-left: 10px;
> >     padding: 5px;
> >     padding-bottom: 8px;
> >     background-color: #fff;
>
> > }
>
> > -EOF 8<-
>
> > my question. How i do to used this .css file in  my .html with jQuery¿
>
> > Thank´s


[jQuery] Re: [ definition css in other file ]

2009-01-11 Thread Varun Khatri
make a .css file like test.css and use it like:

hope this helps!!

On Sun, Jan 11, 2009 at 3:56 PM, Lord Gustavo Miguel Angel <
goosfanc...@gmail.com> wrote:

>  Hello all!
>
> I have this .html
> -
> 
>
> 
> $(document).ready(function(){
>
> $("p").click(function(event){
> alert("Thanks for visiting!");
> });
> });
> 
>
> 
>
> 
> 
> Escoger del menu
> 
>
> 
>
> 
>
> --- eof 8< 
>
> and i have this other .css:
>
> -
> #contenidos{
> float:left;
> width:480px;
> min-height: 250px;
> border: 3px solid grey;
> margin-left: 10px;
> padding: 5px;
> padding-bottom: 8px;
> background-color: #fff;
> }
>
> -EOF 8<-
>
> my question. How i do to used this .css file in  my .html with jQuery¿
>
> Thank´s
>


[jQuery] [ definition css in other file ]

2009-01-11 Thread Lord Gustavo Miguel Angel
Hello all!

I have this .html
-



$(document).ready(function(){

$("p").click(function(event){
alert("Thanks for visiting!");
});
});






Escoger del menu






--- eof 8< 

and i have this other .css:

-
#contenidos{
float:left;
width:480px;
min-height: 250px;
border: 3px solid grey;
margin-left: 10px;
padding: 5px;
padding-bottom: 8px;
background-color: #fff;
}

-EOF 8<-

my question. How i do to used this .css file in  my .html with jQuery¿

Thank´s

[jQuery] Re: i don´t know how add css to my html wit h jquery.

2009-01-11 Thread Kean

Do not use jQuery 1.2.5, use 1.2.6 instead.

On Jan 11, 2:19 pm, "Mauricio \(Maujor\) Samy Silva"
 wrote:
> The css() jQuery method has two sintaxes.
>
> For one css declaration use:
> $('#contenido').css('float', 'left');
>
> For multiple css declarations use:
> $('#contenido').css ({
>      float: 'left',
>     width: '480px',
>     min-height: '250px',
>     ...,
>     backgroundColor: '#fff'
>     });
>
> See:http://docs.jquery.com/CSS/css#properties
>
> Maurício
>
> -Mensagem Original-
> De: "goosfancito" 
> Para: "jQuery (English)" 
> Enviada em: domingo, 11 de janeiro de 2009 18:07
> Assunto: [jQuery] i don´t know how add css to my html with jquery.
>
> Hello all!
>
> I have this .html
> -
>     
>
> 
> $(document).ready(function(){
>
> $("p").click(function(event){
> alert("Thanks for visiting!");});
> });
>
>     
>
> 
>
> 
> 
>         Escoger del menu
>     
>
> 
>
> 
>
> --- eof 8< 
>
> and i have this other .css:
>
> -
> #contenidos{
>     float:left;
>     width:480px;
>     min-height: 250px;
>     border: 3px solid grey;
>     margin-left: 10px;
>     padding: 5px;
>     padding-bottom: 8px;
>     background-color: #fff;
>
> }
>
> -EOF 8<-
>
> my question. How i do to used this .css file in  my .html with jQuery¿
>
> Thank´s


[jQuery] test

2009-01-11 Thread Lord Gustavo Miguel Angel


[jQuery] Re: IE8.

2009-01-11 Thread Ariel Flesler

I noticed, yesterday, that on IE8, scrollTo doesn't work on overflowed
elements.

http://demos.flesler.com/jquery/scrollTo/

I even tried $('#elem').attr({ scrollLeft:500, scrollTop:500 }) but
that didn't work as well.

--
Ariel Flesler
http://flesler.blogspot.com

On Dec 18 2008, 1:50 pm, sferragne  wrote:
> Our friends at Microsoft have a lot of work to do until their new born
> browser IE8 (Still in Beta 2) actually works the way it should.
>
> It seems that there is a major event triggering issue.  Lots of jQuery
> core functionalities depends of events.
>
> For the ones interested to see some upcoming bugs, download IE8 beta 2
> and visit the following links.
>
> Jquery Corner. (Not working)http://www.malsup.com/jquery/corner/


[jQuery] Re: i don´t know how add css to my html wit h jquery.

2009-01-11 Thread Mauricio (Maujor) Samy Silva


The css() jQuery method has two sintaxes.

For one css declaration use:
$('#contenido').css('float', 'left');

For multiple css declarations use:
$('#contenido').css ({
float: 'left',
   width: '480px',
   min-height: '250px',
   ...,
   backgroundColor: '#fff'
   });

See: http://docs.jquery.com/CSS/css#properties

Maurício





-Mensagem Original- 
De: "goosfancito" 

Para: "jQuery (English)" 
Enviada em: domingo, 11 de janeiro de 2009 18:07
Assunto: [jQuery] i don´t know how add css to my html with jquery.



Hello all!

I have this .html
-
   


$(document).ready(function(){

$("p").click(function(event){
alert("Thanks for visiting!");
});
});
   





   Escoger del menu
   





--- eof 8< 

and i have this other .css:

-
#contenidos{
   float:left;
   width:480px;
   min-height: 250px;
   border: 3px solid grey;
   margin-left: 10px;
   padding: 5px;
   padding-bottom: 8px;
   background-color: #fff;
}

-EOF 8<-

my question. How i do to used this .css file in  my .html with jQuery¿

Thank´s 



[jQuery] Re: IE8.

2009-01-11 Thread Nikola

I'd like to start testing in IE8b2 as well but I can't seem to get it
working.  Has anyone else had difficulties with it?  My PC is running
Windows XP sp3.  I installed IE8, rebooted, but IE8 wouldn't start
up.  I checked the version to confirm it was actually installed and it
was.  I re-installed it again to no avail.  I had the same problem
with Google Chrome.  The installation completed successfully but I was
not able to run the program.  I went ahead and uninstalled IE8 and IE7
works as usual...


[jQuery] Re: IE8.

2009-01-11 Thread Nikola

I'd like to start testing in IE8b2 as well but I can't seem to get it
working.  Has anyone else had difficulties with it?  My PC is running
Windows XP sp3.  I installed IE8, rebooted, but IE8 wouldn't start
up.  I checked the version to confirm it was actually installed and it
was.  I re-installed it again to no avail.  I had the same problem
with Google Chrome.  The installation
completed successfully but I was not able to run the program.  I went
ahead and uninstalled IE8 and IE7 works as usual...


[jQuery] Re: IE8.

2009-01-11 Thread Nikola

I'd like to start testing in IE8b2 as well but I can't seem to get it
installed.  Has anyone else had difficulties getting it up and
running?  I'm running Windows XP sp3.  I installed IE8, rebooted but
IE8 wouldn't start up.  I checked the version to confirm it was
installed and it was.  I re-installed it again to no avail.  I
actually had the same problem with Google Chrome.  The installation
completed successfully but I was not able to run the program.  I
uninstalled IE8 now and am able to use IE7.  I'm stumped...


[jQuery] Re: Mootools user needs to learn jQuery quick!

2009-01-11 Thread gbot

Thanks very much for all your comments and links. I'm looking forward
to getting stuck into jQuery!

On Jan 12, 7:36 am, Rey Bango  wrote:
> Hi Gbot,
>
> Welcome to the jQuery community. I don't think it's necessary to debate
> the merits of the two libs as both provide excellent capabilities.
>
> What is important, if you want to be successful, is that you clear your
> mind of the "Mootools way" while you're trying to learn jQuery. To be
> clear, I'm not telling you to drop MooTools. I'm explicitly saying that
> jQuery's coding style is different and you need to think in terms of
> jQuery during the learning process.
>
> I would suggest a couple of links:
>
> http://docs.jquery.com/Main_Pagehttp://learningjquery.comhttp://nettuts.com/articles/web-roundups/jquery-for-absolute-beginner...http://nettuts.com/freebies/cheat-sheets/jquery-cheat-sheet/
>
> I'd also suggest getting either books:
>
> Learning jQuery
> jQuery In Action
>
> Both are by jQuery project team members and are excellent resources.
>
> The fact that you have worked in another library will actually be good
> for you and I anticipate you being able to hit the ground running. The
> main thing is to be objective when learning jQuery. One of the biggest
> hurdles I see for people coming from other frameworks is that they want
> to do things like they did in the other library.
>
> In terms of effects and controls, I urge you to check out jQuery UI
> (http://ui.jquery.com). I think you'll be pleasantly surprised as to
> what's available.
>
> Feel free to ask plenty of questions. We have, IMO, the best community
> around and we're here to help.
>
> Also, ping the #jquery channel on Freenode if you want more immediate
> assistance.
>
> Rey
> jQuery Project
>
> gbot wrote:
> > Hi,
>
> > I've been a fan of Mootools for quite a while now, but I've got a
> > project coming up very soon that must be done in jQuery - can anyone
> > point me to any tutorials or ideally a cheat sheet that can help me
> > learn the differences between Mootools and jQuery? Any info/tuts/blog
> > posts on switching from Mootools over to jQuery would be greatly
> > appreciated - I need to learn it fast!
>
> > (of course, I'm going to hammer the jQuery site docs etc and use good
> > old google, but I just thought someone here might be able to help me
> > out as I'm in a real hurry!)
>
> > Any assistance appreciated.
>
> > (I make the following comments without really knowing much about
> > jQuery, so I apologise if I'm mis-informed - if anyone feels like
> > putting me straight - then please do so)
>
> > I've been using Mootools for quite a while now, and I feel pretty
> > confident coding with it.
>
> > When I initially evaluated the major js frameworks (over a year ago
> > now) it was a very close call for me between Mootools and jQuery. I
> > went with Mootools for a number of reasons -- like the modularity of
> > the core, smaller file size and faster performance for effects --
> > though I appreciate that things have changed since then and these may
> > no longer apply.
>
> >>From what I can see jQuery looks a little bit more straightforward to
> > code, although it seems to me that Mootools does more "out of the box"
> > - a lot of stuff I can write in Mootools in a few lines of code (using
> > the core) seems to require additional classes or plug ins with jQuery
> > - is that a fair statement?
>
> > There's no doubt jQuery is WAY more widely used and is being more
> > actively developed (which counts for a lot, of course), so I'm
> > wondering if I should switch permanently.
>
> > I'm sure this has been debated widely and vigorously, but at the
> > current time (i.e. current version of jQuery vs Mootools 1.2.1) - what
> > are the main differences between them? Are there any significant
> > things that jQuery can't do?
>
> > Thanks in advance for any assistance and comment.


[jQuery] Re: append() not working on dynamically-created nodes in IE

2009-01-11 Thread Karl Rudd

Try closing the tag, ie:

$('#myDiv').append($(''));

Actually the second $() shouldn't be needed:

$('#myDiv').append('');

Karl Rudd

On Mon, Jan 12, 2009 at 7:35 AM, Joe White  wrote:
>
> I'm troubleshooting a problem where my text wasn't showing up in IE.
> I've narrowed the problem down to creating a DOM node dynamically
> (with $(html)) and then passing it to append(). In FireFox, append
> will add the node as expected; but when passed a dynamically-created
> node in IE, it does nothing. No error message is displayed; it just
> silently fails, and no node is added to the page.
>
> Here's a trivial example:
>
> $('#myDiv').append($(''));
>
> I put that code into the ready event, on a page with a div id="myDiv".
> I also added some CSS to put a border on the h2, so I'd be able to see
> whether it got added. Result: in FireFox, I can see the border,
> proving that the h2 got added. In IE, nothing. No error.
>
> If, instead, I find an existing  using its selector (e.g. $
> ('#myH2')), and append() that (instead of a dynamically-created one),
> then IE works fine; it moves that existing element into myDiv. It
> appears to just be when a DOM element is dynamically created with $
> (html), and then append()ed, that there's a problem.
>
> Full example:
>
> 
> 
> h2{border:1px solid blue;}
> 
> 
> $(function(){
>  $('#myDiv').append($('

')); > }); > > > > > > > > Expected behavior: when you run this, you should get a blank page with > a 2px-tall blue line extending across the page. (This is the border > around the h2.) FireFox shows this expected behavior. > > Actual behavior (IE6 on Windows): you get a blank page. The status bar > just says "Done" like usual, and does not show that any errors > occurred. > > Is this a bug in jQuery? Or am I misunderstanding how $(html) is meant > to be used? >


[jQuery] append() not working on dynamically-created nodes in IE

2009-01-11 Thread Joe White

I'm troubleshooting a problem where my text wasn't showing up in IE.
I've narrowed the problem down to creating a DOM node dynamically
(with $(html)) and then passing it to append(). In FireFox, append
will add the node as expected; but when passed a dynamically-created
node in IE, it does nothing. No error message is displayed; it just
silently fails, and no node is added to the page.

Here's a trivial example:

$('#myDiv').append($(''));

I put that code into the ready event, on a page with a div id="myDiv".
I also added some CSS to put a border on the h2, so I'd be able to see
whether it got added. Result: in FireFox, I can see the border,
proving that the h2 got added. In IE, nothing. No error.

If, instead, I find an existing  using its selector (e.g. $
('#myH2')), and append() that (instead of a dynamically-created one),
then IE works fine; it moves that existing element into myDiv. It
appears to just be when a DOM element is dynamically created with $
(html), and then append()ed, that there's a problem.

Full example:



h2{border:1px solid blue;}


$(function(){
  $('#myDiv').append($('

')); }); Expected behavior: when you run this, you should get a blank page with a 2px-tall blue line extending across the page. (This is the border around the h2.) FireFox shows this expected behavior. Actual behavior (IE6 on Windows): you get a blank page. The status bar just says "Done" like usual, and does not show that any errors occurred. Is this a bug in jQuery? Or am I misunderstanding how $(html) is meant to be used?


[jQuery] jQuery UI Tabs Flash

2009-01-11 Thread Chris

I searched the archives, but I couldn't find an answer. For some
reason the tabs, when initialized flashes, three times.  Any idea why?

http://www.chris-gwen.com/


[jQuery] i don´t know how add css to my html with jq uery.

2009-01-11 Thread goosfancito

Hello all!

I have this .html
-



$(document).ready(function(){

$("p").click(function(event){
alert("Thanks for visiting!");
 });
});






Escoger del menu






--- eof 8< 

and i have this other .css:

-
#contenidos{
float:left;
width:480px;
min-height: 250px;
border: 3px solid grey;
margin-left: 10px;
padding: 5px;
padding-bottom: 8px;
background-color: #fff;
}

-EOF 8<-

my question. How i do to used this .css file in  my .html with jQuery¿

Thank´s


[jQuery] Re: .load() callback

2009-01-11 Thread Ricardo Tomasi

You are defining your watchLinks function outside document.ready, so
it's not available. it should look like this (pay attention to the
closing brackets/parenthesis, you had extra ones at the end):

$(document).ready(function(){
  / CHECK URL
  var pageHash = window.location.hash.substr(1);

  if( pageHash == "" ) openPage("home");
  else  openPage(pageHash);

  watchLinks(); //Watch the links
  pictureIt('graphics/bg/ploughedfield.jpg');

  // WATCH LINKS
  function watchLinks() {
$(document).click(function(e) {
   var $linkClicked = $(e.target);
   if( $linkClicked.is("a") ) {
 var youWantToGoTo = $linkClicked.attr('href').slice(0,-4);
 openPage(youWantToGoTo); // Open destination
 window.location.hash = youWantToGoTo; // Set the url #
 return false;
   };
});
  };

});

cheers,
- ricardo

On Jan 11, 10:01 am, BlueStunt  wrote:
> This still doesn't work, I've stripped it down to this:
>
> $(document).click(function(e)
>     {
>       var $linkClicked = $(e.target);
>       if( $linkClicked.is("a") )
>       {
>         alert("Hi");
>         return false;
>       }
>     });
>
> but nothing registers, the return false doesn't work and neither is there an
> alert.
>
> Here's the relevant jquery in full:
>
> $(document).ready(function()
>   {
>     // CHECK
> URL
>     var pageHash = window.location.hash.substr(1);
>
>     if( pageHash == "" ) // If empty open HOME
>     {
>       openPage("home");
>     }
>
>     else
>     {
>       openPage(pageHash); // Else open relevant
>     }
>
>     watchLinks(); // Watch the links
>     pictureIt('graphics/bg/ploughedfield.jpg');
>
>   });
>
>   
>    WATCH
> LINKS
>   function watchLinks()
>   {
>     $(document).click(function(e)
>     {
>       var $linkClicked = $(e.target);
>       if( $linkClicked.is("a") )
>       {
>         var youWantToGoTo =
> $linkClicked.attr('href').substr(0,$(this).attr('href').length-4); //
> Determine destination
>         openPage(youWantToGoTo); // Open destination
>         window.location.hash = youWantToGoTo; // Set the url #
>         return false;
>       }
>     });
>   };
>     });
>   };
>
>
>
> malsup wrote:
>
> >> I've read through both the link you suggested
> >> andhttp://www.tvidesign.co.uk/blog/improve-your-jquery-25-excellent-tips...
> >> but I can't understand how I would make event delegation work for me.
>
> >> This is what I attempted:
>
> >> function watchLinks()
> >>   {
> >>     $("a").click(function(e)
> >>     {
> >>       var linkClicked = $(e.target);
> >>       if( linkClicked.is("a"))
> >>       {
> >>         var youWantToGoTo =
> >> linkClicked.attr('href').substr(0,$(this).attr('href').length-4); //
> >> Determine destination
> >>         openPage(youWantToGoTo); // Open destination
> >>         window.location.hash = youWantToGoTo; // Set the url #
> >>         return false;
> >>       }
> >>     });
> >>   };
>
> > Don't bind the anchors, bind the document:
>
> > $(document).click(function(e) {
> >    var $el = $(e.target);
> >    if ($el.is('a')) {
> >            var href = $el.attr('href');
> >            var hash = href.substr(0,href.length-4);
> >            openPage(hash);
> >            window.location.hash = hash;
> >            return false;
> >    }
> > });
>
> --
> View this message in 
> context:http://www.nabble.com/.load%28%29-callback-tp21389522s27240p21398423
> Sent from the jQuery General Discussion mailing list archive at Nabble.com.


[jQuery] Re: IE8.

2009-01-11 Thread Thomas Kahn


simonferra...@gmail.com wrote:

Our friends at Microsoft have a lot of work to do until their new born
browser IE8 (Still in Beta 2) actually works the way it should.

It seems that there is a major event triggering issue.  Lots of jQuery
core functionalities depends of events.


Is there more info on jQuery combined with Internet Explorer 8 that I 
could read?


I have a situation where a client wants me to do "bugfixes" for IE8 beta 
2 on a site using a lot of jQuery. The site works fine in all other 
browsers so I would prefer to wait until IE8 comes out of the beta stage.


An open question to other jQuery developers: are you checking your sites 
for IE8 compatibility now or are you waiting until IE8 is out of the 
beta stage?


I'm thinking it's not a very good idea to look for and try to fix bugs 
right now since it's hard to determine if the errors are caused by my 
code, Microsofts code, jQuery+IE8 compatibility issues or a combination 
of all of this.


Thanks in advance!

/Thomas Kahn


[jQuery] Re: i can't modify the header with "beforeSend"

2009-01-11 Thread Karl Rudd

The cross domain JSONP type request doesn't use the XMLHttpRequest
object/system. Indeed it couldn't because XMLHttpRequest can't be done
across domains (at least not yet, standards are being formulated).

What happens is that a script tag with the requested URL is inserted
in the document, so no headers can be set.

You'll have to use a "proxy" on a local server, ie:

http://developer.yahoo.com/javascript/howto-proxy.html

Karl Rudd

On Mon, Jan 12, 2009 at 2:20 AM, ximiff  wrote:
>
> I'm trying to auto login to twitter api with adding a Authorization
> header. When i run my code below , i found that the request headers
> still not modified with firebug, and the browser pop a window to input
> username and password. How can I handle that?
>
> 
>
> var url = "http://twitter.com/account/verify_credentials.json?
> callback=?";
>
>$.ajax({
>  beforeSend: function(XMLHttpRequest) {
>XMLHttpRequest.setRequestHeader("Authorization", "Basic
> eWlzdWRvbmdAZ21haWwuY29tOmV2YTBldwEs");
>  },
>  type: "GET",
>  url: url,
>  dataType: "jsonp",
>  success: function(data){
>alert( "Data Saved: " + data["friends_count"] );
>   }
>});
>
>
> 
>


[jQuery] Some help with drag and drop in JQUERY

2009-01-11 Thread vinit

i am making a website i which the page is divided into two vertical
parts. the left part is a div .

eg
:










I have some more div in the leftnav. now i want to drag and drop the
DIVs(eg 1,2,3) on the leftnav onto  the container div. for which i
made the div(icon1,icon2,icon3) draggable and helper:'clone'.

Now after that i made the  container div droppable. and wrote a drop
function on which a clone is created and appended to the container
div. Now the problem i am facing is  everytime i drag the div which
has been previousl dropped from the leftnav div. and drop it onto
container again. a duplicate clone is created. I want to stop this
extra duplicte copies. What should i do?


[jQuery] i can't modify the header with "beforeSend"

2009-01-11 Thread ximiff

I'm trying to auto login to twitter api with adding a Authorization
header. When i run my code below , i found that the request headers
still not modified with firebug, and the browser pop a window to input
username and password. How can I handle that?



var url = "http://twitter.com/account/verify_credentials.json?
callback=?";

$.ajax({
  beforeSend: function(XMLHttpRequest) {
XMLHttpRequest.setRequestHeader("Authorization", "Basic
eWlzdWRvbmdAZ21haWwuY29tOmV2YTBldwEs");
  },
  type: "GET",
  url: url,
  dataType: "jsonp",
  success: function(data){
alert( "Data Saved: " + data["friends_count"] );
   }
});





[jQuery] Re: Mixed HTML and Javascript and inject into #banners causes problems

2009-01-11 Thread ChristophN

Hi there. Yes it does use (plenty) of document.write. What DOM
manipulation do you mean, any idea?

Christoph

On Jan 9, 4:38 pm, Ricardo Tomasi  wrote:
> If the script being loaded from banners.php uses document.write you're
> out of luck, it's not going to work. You have to change it to use a
> proper DOM manipulation methods.
>
> - ricardo
>
> On Jan 9, 8:54 am, ChristophN  wrote:
>
> > Hi there,
>
> > I tried to use the AJAX load or get-functions to receive output from a
> > file
> > banners.php, that creates mixed javascript and html, and tried to use
> > this
> > output for placing into a div named banners, e. g. via
>
> > $("#banners").load("banners.php")
>
> > to be sure that all jquery submit- and click- functions really work
> > before
> > all banners are going to be loaded (which won´t be the case without
> > the solution
> > above) through the banner-management, OpenX.
>
> > However, the above does not work, the output is behaving very
> > strangly,
> > moving the browser to an empty page only showing the banners. Can´t
> > either
> > make this work with getScript either, as the output from the remote
> > file,
> > banners.php, will not only contain javascript, but also html,
> > generaded by OpenX.
>
> > Alerting the data returned from banners.php shows me the code
> > correctly, but not when it´s placed into a DIV with id #banners.
>
> > Any ideas on how to solve this?
>
> > Cheers,
>
> > Christoph


[jQuery] Re: Mootools user needs to learn jQuery quick!

2009-01-11 Thread Rey Bango


Hi Gbot,

Welcome to the jQuery community. I don't think it's necessary to debate 
the merits of the two libs as both provide excellent capabilities.


What is important, if you want to be successful, is that you clear your 
mind of the "Mootools way" while you're trying to learn jQuery. To be 
clear, I'm not telling you to drop MooTools. I'm explicitly saying that 
jQuery's coding style is different and you need to think in terms of 
jQuery during the learning process.


I would suggest a couple of links:

http://docs.jquery.com/Main_Page
http://learningjquery.com
http://nettuts.com/articles/web-roundups/jquery-for-absolute-beginners-video-series/
http://nettuts.com/freebies/cheat-sheets/jquery-cheat-sheet/

I'd also suggest getting either books:

Learning jQuery
jQuery In Action

Both are by jQuery project team members and are excellent resources.

The fact that you have worked in another library will actually be good 
for you and I anticipate you being able to hit the ground running. The 
main thing is to be objective when learning jQuery. One of the biggest 
hurdles I see for people coming from other frameworks is that they want 
to do things like they did in the other library.


In terms of effects and controls, I urge you to check out jQuery UI 
(http://ui.jquery.com). I think you'll be pleasantly surprised as to 
what's available.


Feel free to ask plenty of questions. We have, IMO, the best community 
around and we're here to help.


Also, ping the #jquery channel on Freenode if you want more immediate 
assistance.


Rey
jQuery Project


gbot wrote:

Hi,

I've been a fan of Mootools for quite a while now, but I've got a
project coming up very soon that must be done in jQuery - can anyone
point me to any tutorials or ideally a cheat sheet that can help me
learn the differences between Mootools and jQuery? Any info/tuts/blog
posts on switching from Mootools over to jQuery would be greatly
appreciated - I need to learn it fast!

(of course, I'm going to hammer the jQuery site docs etc and use good
old google, but I just thought someone here might be able to help me
out as I'm in a real hurry!)

Any assistance appreciated.

(I make the following comments without really knowing much about
jQuery, so I apologise if I'm mis-informed - if anyone feels like
putting me straight - then please do so)

I've been using Mootools for quite a while now, and I feel pretty
confident coding with it.

When I initially evaluated the major js frameworks (over a year ago
now) it was a very close call for me between Mootools and jQuery. I
went with Mootools for a number of reasons -- like the modularity of
the core, smaller file size and faster performance for effects --
though I appreciate that things have changed since then and these may
no longer apply.


From what I can see jQuery looks a little bit more straightforward to

code, although it seems to me that Mootools does more "out of the box"
- a lot of stuff I can write in Mootools in a few lines of code (using
the core) seems to require additional classes or plug ins with jQuery
- is that a fair statement?

There's no doubt jQuery is WAY more widely used and is being more
actively developed (which counts for a lot, of course), so I'm
wondering if I should switch permanently.

I'm sure this has been debated widely and vigorously, but at the
current time (i.e. current version of jQuery vs Mootools 1.2.1) - what
are the main differences between them? Are there any significant
things that jQuery can't do?

Thanks in advance for any assistance and comment.




[jQuery] Re: How can I add a TRUE custom event or modify existing jQuery functions?

2009-01-11 Thread Ariel Flesler

Nice, let me know how it goes.

On Sun, Jan 11, 2009 at 2:05 PM, kape  wrote:
>
> Thanks, I'll actually give that a try.
>
> On Jan 11, 9:46 am, Ariel Flesler  wrote:
>> I just made a plugin to do EXACTLY what you're asking for.
>> It's not formally released yet so there's no documentation. If you
>> want, you can use it.
>>
>> http://test.flesler.com/jquery.broadcast/
>>
>> Note that it requires jQuery 1.3. That means you need to use the
>> version on trunk or any of the recently released betas.
>>
>> Cheers
>> --
>> Ariel Fleslerhttp://flesler.blogspot.com
>>
>> On Jan 9, 5:30 pm, kape  wrote:
>>
>> > I have created custom styled buttons in my page and would like to
>> > toggle their class and therefore their look when they get disabled or
>> > enabled.  So is there any way to call a function when .removeAttr
>> > ('disabled'), .attr('disabled', ''), and .attr('disabled', 'disabled')
>> > are invoked?  Basically, is there any way to have enable/disable act
>> > like an event such as click, mouseover, etc.?
>>
>> > I've tried overwriting the jQuery function as follows:
>>
>> > jQuery.fn.removeAttr = function(name) {
>> >   if(this.eq(0).hasClass('buttonDisabled') && name ==
>> > 'disabled')
>> > this.eq(0).removeClass('buttonDisabled');
>> >   jQuery.attr(this.get(0), name, "" );
>> >   if (this.get(0).nodeType == 1)
>> > this.get(0).removeAttribute(name);
>> > };
>>
>> > and when $('.buttonDisabled').removeAttr('disabled') is called, the
>> > disabled attribute and buttonDisabled class are removed.  This is what
>> > I want, but it doesn't seem right.  I shouldn't be overwriting the
>> > removeAttr function.  Also, I'd have to do the same thing for jQuery's
>> > attr() function to add the buttonDisabled class when .attr('disabled',
>> > 'disabled') is called.  Can I add the code I need to the functions and
>> > then call "super" somehow?  Is there a simpler way to achieve what I
>> > want?
> >
>



-- 
Ariel Flesler
http://flesler.blogspot.com


[jQuery] Re: this inside of click event

2009-01-11 Thread Mauricio (Maujor) Samy Silva


Try inspect this running the following script:

$('.test').click(function() {
  alert('this node name = ' + this.nodeName);
  alert('this nome type  = ' + this.nodeType);
  alert('this  node text = ' + $(this).text());
 });
Hope that help
Maurício


-Mensagem Original- 
De: "bob" 

Para: "jQuery (English)" 
Enviada em: domingo, 11 de janeiro de 2009 14:40
Assunto: [jQuery] this inside of click event




Hi,
What does this inside of
$('.test').click(function() {
refer to?


 $(document).ready(function() {
 $('.test').click(function() {
alert('this = ' + this);
 });

 });


Click Me 




[jQuery] this inside of click event

2009-01-11 Thread bob

Hi,
What does this inside of
$('.test').click(function() {
refer to?


  $(document).ready(function() {
$('.test').click(function() {
alert('this = ' + this);
});

  });


Click Me


[jQuery] offset question

2009-01-11 Thread David .Wu

Hi
the offset function will find the first matched element and show the
offset
but in this case, the ul offset should be 0 to div#demo, but in
firefox it's 8, and in IE is 10
why is that?


http://www.w3.org/1999/xhtml";>


offset









1
2
3
4












[jQuery] Re: How can I add a TRUE custom event or modify existing jQuery functions?

2009-01-11 Thread kape

Thanks, I'll actually give that a try.

On Jan 11, 9:46 am, Ariel Flesler  wrote:
> I just made a plugin to do EXACTLY what you're asking for.
> It's not formally released yet so there's no documentation. If you
> want, you can use it.
>
> http://test.flesler.com/jquery.broadcast/
>
> Note that it requires jQuery 1.3. That means you need to use the
> version on trunk or any of the recently released betas.
>
> Cheers
> --
> Ariel Fleslerhttp://flesler.blogspot.com
>
> On Jan 9, 5:30 pm, kape  wrote:
>
> > I have created custom styled buttons in my page and would like to
> > toggle their class and therefore their look when they get disabled or
> > enabled.  So is there any way to call a function when .removeAttr
> > ('disabled'), .attr('disabled', ''), and .attr('disabled', 'disabled')
> > are invoked?  Basically, is there any way to have enable/disable act
> > like an event such as click, mouseover, etc.?
>
> > I've tried overwriting the jQuery function as follows:
>
> >         jQuery.fn.removeAttr = function(name) {
> >           if(this.eq(0).hasClass('buttonDisabled') && name ==
> > 'disabled')
> >             this.eq(0).removeClass('buttonDisabled');
> >           jQuery.attr(this.get(0), name, "" );
> >           if (this.get(0).nodeType == 1)
> >             this.get(0).removeAttribute(name);
> >         };
>
> > and when $('.buttonDisabled').removeAttr('disabled') is called, the
> > disabled attribute and buttonDisabled class are removed.  This is what
> > I want, but it doesn't seem right.  I shouldn't be overwriting the
> > removeAttr function.  Also, I'd have to do the same thing for jQuery's
> > attr() function to add the buttonDisabled class when .attr('disabled',
> > 'disabled') is called.  Can I add the code I need to the functions and
> > then call "super" somehow?  Is there a simpler way to achieve what I
> > want?


[jQuery] Re: Panorama Viewer

2009-01-11 Thread donb

I simply saved the html to my hard drive and opened it.

What I don't get is the 2044.  2x1024 = 2048.  What's significant
about the number used?  And where is the 'ugly IE hack?'


On Jan 11, 9:03 am, Mike Alsup  wrote:
> > First made one using canvas, but ExplorerCanvas didn't like the 
> > it.https://developer.mozilla.org/en/Canvas_tutorial/Basic_animationshttp...
>
> > Source 
> > Imagehttp://commons.wikimedia.org/wiki/File:Capitan_Meadows,_Yosemite_Nati...
>
> > So next I did it using jQuery, here is my result. Tested in FF3,
> > IE6/7. Would have been easy to do except for the ugly IE css hacks.
>
> >  > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
> > http://www.w3.org/1999/xhtml";>
>
> > 
> > 
> >   
>
> >   
> >   $(document).ready(function(){
> >     var speed = 3;
> >     $("#left").click(function () {
> >     runA();
> >     runB();
> >     });
>
> >         function runA() {
> >         $("#blockA").animate({"left": "-=1024px"}, speed, "linear");
> >         $("#blockA").animate({"left": "+=2044px"}, 1, "linear");
> >         $("#blockA").animate({"left": "-=1024px"}, speed, "linear",runA);
> >         }
>
> >         function runB() {
> >         $("#blockB").animate({"left": "-=1024px"}, speed, "linear");
> >         $("#blockB").animate({"left": "-=1024px"}, speed, "linear");
> >         $("#blockB").animate({"left": "+=2044px"}, 1, "linear",runB);
> >         }
>
> >   });
> >   
> >   
> >   img {
> >     padding: 0;
> >         margin: 0;
> >         }
> >   div#t {
> >         overflow:hidden;
> >         width:800px;
> >         height:198px;
> >         word-wrap: break-word;
> >   }
>
> >   #blockA, #blockB {
> >   position:absolute;
> >   }
> >    #blockB {
> >   left:1023px;
> >   }
> >     #wrapper {
> > height: 100%;
> > width: 800px;
> > overflow: hidden;
> > border: 3px solid; /* this is just for debugging, to see if the
> > browser actually does something sane */
> > position: relative;}
>
> >   
> > 
>
> > 
> >   «
>
> > 
> > 
> > 
> > 
> > 
> > 
>
> > 
> > 
> > 
>
> > 
> > 
>
> Can you post a live link to this?  How are we supposed to see it?


[jQuery] Re: How can I add a TRUE custom event or modify existing jQuery functions?

2009-01-11 Thread Ariel Flesler

I just made a plugin to do EXACTLY what you're asking for.
It's not formally released yet so there's no documentation. If you
want, you can use it.

http://test.flesler.com/jquery.broadcast/

Note that it requires jQuery 1.3. That means you need to use the
version on trunk or any of the recently released betas.

Cheers
--
Ariel Flesler
http://flesler.blogspot.com

On Jan 9, 5:30 pm, kape  wrote:
> I have created custom styled buttons in my page and would like to
> toggle their class and therefore their look when they get disabled or
> enabled.  So is there any way to call a function when .removeAttr
> ('disabled'), .attr('disabled', ''), and .attr('disabled', 'disabled')
> are invoked?  Basically, is there any way to have enable/disable act
> like an event such as click, mouseover, etc.?
>
> I've tried overwriting the jQuery function as follows:
>
>         jQuery.fn.removeAttr = function(name) {
>           if(this.eq(0).hasClass('buttonDisabled') && name ==
> 'disabled')
>             this.eq(0).removeClass('buttonDisabled');
>           jQuery.attr(this.get(0), name, "" );
>           if (this.get(0).nodeType == 1)
>             this.get(0).removeAttribute(name);
>         };
>
> and when $('.buttonDisabled').removeAttr('disabled') is called, the
> disabled attribute and buttonDisabled class are removed.  This is what
> I want, but it doesn't seem right.  I shouldn't be overwriting the
> removeAttr function.  Also, I'd have to do the same thing for jQuery's
> attr() function to add the buttonDisabled class when .attr('disabled',
> 'disabled') is called.  Can I add the code I need to the functions and
> then call "super" somehow?  Is there a simpler way to achieve what I
> want?


[jQuery] Re: z-index issue

2009-01-11 Thread godzilla74

Yes, it was solved!  Thanks for the help everyone.

I had to use a callback in the hoverout animate() function, so the z-
index would actually be taken care of AFTER the animation ran:

$('span.resize').hover(function(){
//testing
//$('#test').html(iWidth +','+ iHeight);
$(this)
.stop()
.css('z-index','9')
.animate({
width:$('span.resize img').width(),
height:$('span.resize img').height()
},1000)
},
function(){
$(this)
.stop()
.animate({
width:oWidth,
height:oHeight
},1000, function(){
$(this)
.css('z-index','1');
});
});

On Jan 10, 11:53 pm, "jQuery Lover"  wrote:
> I guess this was solved in your later repost.
>
> Read jQuery HowTo Resource  -  http://jquery-howto.blogspot.com
>
> On Sat, Jan 10, 2009 at 12:05 PM, godzilla74  wrote:
>
> > Hi,
>
> > I'm just learning jQuery and working on stuff for fun, but right now,
> > I am stumped!  I have a hover animation happening with 4 small
> > images.  Think of them as being in a small box with some padding to
> > separate each image.  These images are small and absolutely positioned
> > so i could change the actual size.  Just to make sure you know what I
> > mean, here is the HTML & CSS:
>
> > 
>
> > /* the images are actually much larger, we just want to show a snippet
> > */
> > span.resize{
> >        width:100px;
> >        height:75px;
> >        overflow:hidden;
> >        padding:3px;
> >        }
>
> > span#pic1, span#pic2, span#pic3, span#pic4{
> >        position:absolute;
> >        z-index:-1;
> >        }
>
> > span#pic1{
> >        margin:0;
> >        }
>
> > span#pic2{
> >        margin:0 0 0 110px;
> >        }
>
> > span#pic3{
> >        margin:85px 0 0 0;
> >        }
>
> > span#pic4{
> >        margin:85px 0 0 110px;
> >        }
> > 
> > 
>
> > 
> >         > span>
> >         > span>
> >         >>
> >         > span>
> > 
>
> > When a user hovers over an image, it actually becomes larger and the z-
> > index increases to make sure it displays over the other images (which
> > works fine).  However, upon the hover out state, the z-index seems to
> > jump up in the chain and run before the animation!  So, as the image
> > is going back to it's normal (smaller) state, the other images around
> > it show up in front as if they have a higher z-index than the hovered-
> > out image.  I don't understand why this is and I can't figure out how
> > to fix it for the life of me!  Any help would be much appreciated!
> > Here is the jQuery I have thus far:
>
> >        //original span.resize values that we set in the CSS
> >        var oWidth = $('span.resize').width();
> >        var oHeight = $('span.resize').height();
>
> >        //hover over the span image to start the function
> >        $('span.resize').hover(function(){
> >                        $(this)
> >                                .stop()
> >                                .css('z-index','99')
> >                                .animate({
> >                                        width:$('span.resize img').width(),
> >                                        height:$('span.resize img').height()
> >                                },1000)
> >                },
> >                function(){
> >                        $(this)
> >                                .css('z-index','1')
> >                                .animate({
> >                                        width:oWidth,
> >                                        height:oHeight
> >                                },1000)
> >                });
> > });
>
> > Thanks!


[jQuery] Re: Mootools user needs to learn jQuery quick!

2009-01-11 Thread Mike Alsup

> From what I can see jQuery looks a little bit more straightforward to
> code, although it seems to me that Mootools does more "out of the box"
> - a lot of stuff I can write in Mootools in a few lines of code (using
> the core) seems to require additional classes or plug ins with jQuery
> - is that a fair statement?
>
> There's no doubt jQuery is WAY more widely used and is being more
> actively developed (which counts for a lot, of course), so I'm
> wondering if I should switch permanently.

Continue down your path and use jQuery for a while.  Then you'll be
able to make an informed judgment for yourself.  There are countless
resources available online.  I assumed you've already found then via
Google.


[jQuery] Re: Panorama Viewer

2009-01-11 Thread Mike Alsup

> First made one using canvas, but ExplorerCanvas didn't like the 
> it.https://developer.mozilla.org/en/Canvas_tutorial/Basic_animationshttp://excanvas.sourceforge.net/
>
> Source 
> Imagehttp://commons.wikimedia.org/wiki/File:Capitan_Meadows,_Yosemite_Nati...
>
> So next I did it using jQuery, here is my result. Tested in FF3,
> IE6/7. Would have been easy to do except for the ugly IE css hacks.
>
>  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
> http://www.w3.org/1999/xhtml";>
>
> 
> 
>   
>
>   
>   $(document).ready(function(){
>     var speed = 3;
>     $("#left").click(function () {
>     runA();
>     runB();
>     });
>
>         function runA() {
>         $("#blockA").animate({"left": "-=1024px"}, speed, "linear");
>         $("#blockA").animate({"left": "+=2044px"}, 1, "linear");
>         $("#blockA").animate({"left": "-=1024px"}, speed, "linear",runA);
>         }
>
>         function runB() {
>         $("#blockB").animate({"left": "-=1024px"}, speed, "linear");
>         $("#blockB").animate({"left": "-=1024px"}, speed, "linear");
>         $("#blockB").animate({"left": "+=2044px"}, 1, "linear",runB);
>         }
>
>   });
>   
>   
>   img {
>     padding: 0;
>         margin: 0;
>         }
>   div#t {
>         overflow:hidden;
>         width:800px;
>         height:198px;
>         word-wrap: break-word;
>   }
>
>   #blockA, #blockB {
>   position:absolute;
>   }
>    #blockB {
>   left:1023px;
>   }
>     #wrapper {
> height: 100%;
> width: 800px;
> overflow: hidden;
> border: 3px solid; /* this is just for debugging, to see if the
> browser actually does something sane */
> position: relative;}
>
>   
> 
>
> 
>   «
>
> 
> 
> 
> 
> 
> 
>
> 
> 
> 
>
> 
> 


Can you post a live link to this?  How are we supposed to see it?


Re: Fw: [jQuery] Re: IMAP PHP is possible or not !!!!

2009-01-11 Thread bharani kumar
So , need to increase the speed, i thing my english is very poor,
On Sun, Jan 11, 2009 at 7:30 PM, bharani kumar <
bharanikumariyer...@gmail.com> wrote:

> retrieves mail list, it will
> take around 40 sec for retrieve mail list, so need to increase the
>
>>
>>
>> - Forwarded Message 
>> *From:* jQuery Lover 
>> *To:* jquery-en@googlegroups.com
>> *Sent:* Sunday, 11 January, 2009 3:35:57 PM
>> *Subject:* [jQuery] Re: IMAP PHP is possible or not 
>>
>>
>> The main question is: What is taking up the time? Is it php script
>> that connects through imap and retrieves mail list or is it the
>> mail list download time?
>>
>> Read jQuery HowTo Resource  -  http://jquery-howto.blogspot.com
>>
>>
>>
>> On Sun, Jan 11, 2009 at 10:46 AM, bharani kumar
>>  wrote:
>> > Yes, Ok,
>> >
>> > Here another question , this is new question,
>> >
>> > am working in imap php,
>> >
>> > it take too much time for load the inbox mail,
>> >
>> > any idea , to increase the speed,
>> >
>> >
>> > On Sun, Jan 11, 2009 at 11:09 AM, jQuery Lover 
>> > wrote:
>> >>
>> >> I don't think so. Because you were parsing your COM elements using php
>> >> before jquery and still parsing them with php. The only performance
>> >> increase you may see is the page load. The page with jquery will load
>> >> first and then jquery will load Com object contents. This will still
>> >> take original 50 secs.
>> >>
>> >> Read jQuery HowTo Resource  -  http://jquery-howto.blogspot.com
>> >>
>> >>
>>
>> --
>> Get perfect Email ID for your Resume. Get before others 
>> grab.
>>
>
>
>
>


-- 
உங்கள் நண்பன்
பரணி  குமார்

Regards
B.S.Bharanikumar

POST YOUR OPINION
http://bharanikumariyer.hyperphp.com/
http://bharanikumariyerphp.site88.net/


[jQuery] Re: Problem with creating dynamic html...

2009-01-11 Thread Mike Alsup

> This is in html (by default)
>
>       
>       
>          
>              
>                Kolicina Naslov
>
>                 
>                     
>                     
>                          name="vrijednosti[][1][kol]" type="text" title="Količina npr. 100ml,
> 10 kom i sl." /> 
>                          name="vrijednosti[][1][naziv]" type="text" title="Primjer: U polje
> količina unesete 10 kom, a u naslov jaja."  />
>                          
>                     
>                 
>
>                         Dodaj sastojak span>
>              
>        
>
>    
>        Nova grupa
>
> When i click on "grupanovi" it creates:
>
> $('#grupanovi').append(' id="grupa'+document.getElementById('brojacgrupa').value+'"
> class="grupa"> class="naslov-pos">Kolicina Naslov span> class="dodani-sastojci"> type="text" title="Količina npr. 100ml, 10 kom i sl." />  class="dodani-sastojci"> type="text" title="Primjer: U polje količina unesete 10 kom, a u
> naslov jaja."  /> div>Dodaj sastojak div>');
>
> But this works only on default:
>
>  $(".novisastojak").click(function(){
>           alert('testiram');
>
>          });
>
> not on dynamical content created.
>
> Help?
>
>           });


Here's two resources you should read:

http://docs.jquery.com/Frequently_Asked_Questions#Why_do_my_events_stop_working_after_an_AJAX_request.3F

http://www.learningjquery.com/2008/03/working-with-events-part-1

Note that with the soon-to-be-released 1.3 version of jQuery this
situation will be much easier to handle.

Mike


[jQuery] Re: Jquery Calling Servlet

2009-01-11 Thread Mike Alsup

> How do i direct my servlet to a new window using JQuery  i am not able
> to understand as i am new to JQuery, can you please suggest me how do i do
> this i tried doing
> window.opener.location.href="
> $.post("../reports/BillIDPropIDExcelExport",{csvstring:
> $("#vname1").val(),count:$("#vname2").val(),propType:$("#vname3").val(),instValue:$("#vname4").val()},function(data){
> alert(data);document.body.style.cursor="default"; });

Don't use an ajax post for this (it won't work).  It looks like you
already have a form for collecting the data so set the form's target
attribute to "_blank" and you'll be all set.

Mike


[jQuery] Re: .load() callback

2009-01-11 Thread Mike Alsup

> This still doesn't work, I've stripped it down to this:
>
> $(document).click(function(e)
>     {
>       var $linkClicked = $(e.target);
>       if( $linkClicked.is("a") )
>       {
>         alert("Hi");
>         return false;
>       }
>     });
>
> but nothing registers, the return false doesn't work and neither is there an
> alert.
>
> Here's the relevant jquery in full:
>
> $(document).ready(function()
>   {
>     // CHECK
> URL
>     var pageHash = window.location.hash.substr(1);
>
>     if( pageHash == "" ) // If empty open HOME
>     {
>       openPage("home");
>     }
>
>     else
>     {
>       openPage(pageHash); // Else open relevant
>     }
>
>     watchLinks(); // Watch the links
>     pictureIt('graphics/bg/ploughedfield.jpg');
>
>   });
>
>   
>    WATCH
> LINKS
>   function watchLinks()
>   {
>     $(document).click(function(e)
>     {
>       var $linkClicked = $(e.target);
>       if( $linkClicked.is("a") )
>       {
>         var youWantToGoTo =
> $linkClicked.attr('href').substr(0,$(this).attr('href').length-4); //
> Determine destination
>         openPage(youWantToGoTo); // Open destination
>         window.location.hash = youWantToGoTo; // Set the url #
>         return false;
>       }
>     });
>   };
>     });
>   };


Are you getting any errors in Firebug?  Have you tried logging the
event target to the Firebug console so you can see what it is?  Can
you post a link that shows this code running?  Can you run a simple
test like this:


$(document).click(function() {
alert('test');
});



[jQuery] Problem with creating dynamic html...

2009-01-11 Thread Nedim

Hello everyone.
I have a problem with jQuery.

This is (by default) in HTML file:

  
  
 
 
   Kolicina Naslov





 

 



Dodaj sastojak
 
   


And when i click on div with id "novagrupa" i do this:

 $("#novagrupa").click(function(){
// Hidden var

 var x = parseInt(document.getElementById('brojacgrupa').value);
x++;
document.getElementById('brojacgrupa').value = x;

// U koji div dodaje
$('#grupanovi').append('Kolicina Naslov Dodaj sastojak');


  });

And it is ok, but when i click on div with class "novisastojak" there
is a problem:

  $(".novisastojak").click(function(){
  alert('testiram');
 });


It works only on first code (created by default) and doesn't work on
others, (created dynamical)


[jQuery] Panorama Viewer

2009-01-11 Thread Mikeytown2

First made one using canvas, but ExplorerCanvas didn't like the it.
https://developer.mozilla.org/en/Canvas_tutorial/Basic_animations
http://excanvas.sourceforge.net/

Source Image
http://commons.wikimedia.org/wiki/File:Capitan_Meadows,_Yosemite_National_Park.jpg

So next I did it using jQuery, here is my result. Tested in FF3,
IE6/7. Would have been easy to do except for the ugly IE css hacks.


http://www.w3.org/1999/xhtml";>



  

  
  $(document).ready(function(){
var speed = 3;
$("#left").click(function () {
runA();
runB();
});

function runA() {
$("#blockA").animate({"left": "-=1024px"}, speed, "linear");
$("#blockA").animate({"left": "+=2044px"}, 1, "linear");
$("#blockA").animate({"left": "-=1024px"}, speed, "linear",runA);
}

function runB() {
$("#blockB").animate({"left": "-=1024px"}, speed, "linear");
$("#blockB").animate({"left": "-=1024px"}, speed, "linear");
$("#blockB").animate({"left": "+=2044px"}, 1, "linear",runB);
}

  });
  
  
  img {
padding: 0;
margin: 0;
}
  div#t {
overflow:hidden;
width:800px;
height:198px;
word-wrap: break-word;
  }

  #blockA, #blockB {
  position:absolute;
  }
   #blockB {
  left:1023px;
  }
#wrapper {
height: 100%;
width: 800px;
overflow: hidden;
border: 3px solid; /* this is just for debugging, to see if the
browser actually does something sane */
position: relative;
}
  



  «

















[jQuery] Mootools user needs to learn jQuery quick!

2009-01-11 Thread gbot

Hi,

I've been a fan of Mootools for quite a while now, but I've got a
project coming up very soon that must be done in jQuery - can anyone
point me to any tutorials or ideally a cheat sheet that can help me
learn the differences between Mootools and jQuery? Any info/tuts/blog
posts on switching from Mootools over to jQuery would be greatly
appreciated - I need to learn it fast!

(of course, I'm going to hammer the jQuery site docs etc and use good
old google, but I just thought someone here might be able to help me
out as I'm in a real hurry!)

Any assistance appreciated.

(I make the following comments without really knowing much about
jQuery, so I apologise if I'm mis-informed - if anyone feels like
putting me straight - then please do so)

I've been using Mootools for quite a while now, and I feel pretty
confident coding with it.

When I initially evaluated the major js frameworks (over a year ago
now) it was a very close call for me between Mootools and jQuery. I
went with Mootools for a number of reasons -- like the modularity of
the core, smaller file size and faster performance for effects --
though I appreciate that things have changed since then and these may
no longer apply.

>From what I can see jQuery looks a little bit more straightforward to
code, although it seems to me that Mootools does more "out of the box"
- a lot of stuff I can write in Mootools in a few lines of code (using
the core) seems to require additional classes or plug ins with jQuery
- is that a fair statement?

There's no doubt jQuery is WAY more widely used and is being more
actively developed (which counts for a lot, of course), so I'm
wondering if I should switch permanently.

I'm sure this has been debated widely and vigorously, but at the
current time (i.e. current version of jQuery vs Mootools 1.2.1) - what
are the main differences between them? Are there any significant
things that jQuery can't do?

Thanks in advance for any assistance and comment.



[jQuery] Problem with creating dynamic html...

2009-01-11 Thread Nedim

This is in html (by default)

  
  
 
 
   Kolicina Naslov





 

 



Dodaj sastojak
 
   


   
   Nova grupa

When i click on "grupanovi" it creates:

$('#grupanovi').append('Kolicina Naslov Dodaj sastojak');


But this works only on default:

 $(".novisastojak").click(function(){
  alert('testiram');

 });


not on dynamical content created.

Help?

  });


[jQuery] Re: Can I get the contents from respose by ajax

2009-01-11 Thread Balazs Endresz

As jQuery parses this html the output will contain three elements:
title, meta, and the div instead of the single html. So .find() won't
work because it will search in the descendant elements, but filter
will return '#a' because it's an element of the current jQuery object.

$('') doesn't work either, I guess it's not possible to
create an html element so easily.

You can also try setting the dataType option to html (or maybe xml).

On Jan 11, 11:13 am, "David .Wu"  wrote:
> I tried all your suggestion, but got some weired result.
>
> ajax.html
>  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
> http://www.w3.org/1999/xhtml";>
> 
> 
> ajax
> 
> 
>
> 
> 
> 
> 
> 
> 
> 
> 
>
> ajax.php
>  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
> http://www.w3.org/1999/xhtml";>
> 
> 
> ajax
> 
>
> 
> test contents
> 
> 
>
> On 1月10日, 上午2時11分, dropcube  wrote:
>
> > > is there any way to get the value 123 straight from div?
>
> > yes, just apply a jQuery selector to the response content and get
> > whatever you need. In this example:
>
> > $('#a', res).text();
>
> > OR
>
> > $(res).find('#a').text();
>
> > You can also try with $.load that allows you to specify a jQuery
> > selector in the URL.


[jQuery] Re: Jquery Calling Servlet

2009-01-11 Thread RUQUIA TABASSUM
How do i direct my servlet to a new window using JQuery  i am not able
to understand as i am new to JQuery, can you please suggest me how do i do
this i tried doing

window.opener.location.href="
$.post("../reports/BillIDPropIDExcelExport",{csvstring:
$("#vname1").val(),count:$("#vname2").val(),propType:$("#vname3").val(),instValue:$("#vname4").val()},function(data){
alert(data);document.body.style.cursor="default"; });



this gives me errors window.opener.location is null or not an object

Can you please suggest me how do i direct my servlet out put to new window
using AJAX.









On Sat, Jan 10, 2009 at 1:19 PM, jQuery Lover  wrote:

>
> Create a new window and direct it to your servlet url then onload.close();
>
> Read jQuery HowTo Resource  -  http://jquery-howto.blogspot.com
>
>
>
> On Thu, Jan 8, 2009 at 7:08 PM, ruquia  wrote:
> >
> > Hi i am calling a servlet using JQuery and my servlets create an excel
> > file at runtime and provides the option for the user to open save or
> > cancel the file created
> >
> > JQuery code is
> >
> > $.post("../reports/BillIDPropIDExcelExport",{csvstring: $
> > ("#vname1").val(),count:$("#vname2").val(),propType:$("#vname3").val
> > (),instValue:$("#vname4").val()},function(data){
> >alert(data);document.body.style.cursor="default"; });
> >
> >
> >
> > and my servlets that creates the file at runtime is
> >
> >  try
> >{
> >HSSFWorkbook wb  = new HSSFWorkbook();
> >HSSFSheet sheet = wb.createSheet("Customer Details
> Connection
> > Fee");
> >
> > HSSFDataFormat format = wb.createDataFormat();
> > HSSFCellStyle cstyle;
> >
> > cstyle =  wb.createCellStyle();
> >
> cstyle.setDataFormat(format.getFormat("#,###,###.00"));
> >
> >
> >
> >
> >HSSFRow row = sheet.createRow((short)0);
> >HSSFCell c0=row.createCell((short)0);
> >HSSFCell c1=row.createCell((short)1);
> >HSSFCell c2=row.createCell((short)2);
> >
> >
> >
> >
> >
> >c0.setCellValue("CHAR_PREM_ID");
> >c1.setCellValue("SA_TYPE_CD");
> >c2.setCellValue("UOM_CD");
> >
> >
> >
> >  c0.setCellStyle(style);
> >  c1.setCellStyle(style);
> >  c2.setCellStyle(style);
> >
> >
> >
> >
> >String
> acplotnumber="",finalcsvstring="",finalacplotnumber1="";
> >
> >String csvstring=request.getParameter("csvstring");
> >System.out.println(csvstring);
> >String count=request.getParameter("count");
> >System.out.println(count);
> >String instValue1=request.getParameter("instValue");
> >String propType1=request.getParameter("propType");
> >
> >
> >if(propType1.length()==4)
> >propType="'CONBASE','CONGROW'";
> >else
> >propType="'"+propType1+"'";
> >
> >d= new OracleDatabaseConnectionPROD();
> >connection=d.connect();
> >//System.out.println("OracleDatabaseConnectionPROD");
> >
> >
> >
> > stmt = connection.createStatement();
> > connection.setAutoCommit(false);
> >
> >{
> >
> >rs=stmt.executeQuery("SELECT A.CHAR_PREM_ID, SA_TYPE_CD,
> F.UOM_CD,
> > C.BILL_ID, SUM(CALC_AMT) as CALC_AMOUNT from Customers");
> >
> >
> >
> >while(rs.next())
> >{
> >
> >String CHAR_PREM_ID=rs.getString(1);
> >String SA_TYPE_CD=rs.getString(2);
> >String UOM_CD=rs.getString(3);
> >String BILL_ID=rs.getString(4);
> >float CALC_AMOUNT=rs.getFloat(5);
> >
> >
> >
> >HSSFCellStyle style1 = wb.createCellStyle();
> >HSSFFont font1 = wb.createFont();
> >font1.setFontHeightInPoints((short)8);
> >style1.setFont(font1);
> >
> >
> >row = sheet.createRow((short)j);
> >
> >// bold
> >
> >
> >HSSFCell cell0 =row.createCell((short)0);
> >HSSFCell cell1 =row.createCell((short)1);
> >HSSFCell cell2 =row.createCell((short)2);
> >
> >cell0.setCellValue(CHAR_PREM_ID);
> >cell1.setCellValue(SA_TYPE_CD);
> >cell2.setCellValue(UOM_CD);
> >
> >
> >
> >cell0.setCellStyle(style1);
> >cell1.setCellStyle(style1);
> >
> >
> >
> >j++;
> >
> >}
> >  

[jQuery] Re: .load() callback

2009-01-11 Thread BlueStunt


This still doesn't work, I've stripped it down to this:

$(document).click(function(e)
{
  var $linkClicked = $(e.target);
  if( $linkClicked.is("a") )
  {
alert("Hi");
return false;
  }
});


but nothing registers, the return false doesn't work and neither is there an
alert.

Here's the relevant jquery in full:

$(document).ready(function()
  {
// CHECK
URL
var pageHash = window.location.hash.substr(1);

if( pageHash == "" ) // If empty open HOME
{
  openPage("home");
} 
   
else
{
  openPage(pageHash); // Else open relevant
}

watchLinks(); // Watch the links
pictureIt('graphics/bg/ploughedfield.jpg');
  
  });
  
  
   WATCH
LINKS
  function watchLinks()
  {
$(document).click(function(e)
{
  var $linkClicked = $(e.target);
  if( $linkClicked.is("a") )
  {
var youWantToGoTo =
$linkClicked.attr('href').substr(0,$(this).attr('href').length-4); //
Determine destination
openPage(youWantToGoTo); // Open destination
window.location.hash = youWantToGoTo; // Set the url #
return false;
  }
});
  };
});
  };



malsup wrote:
> 
> 
>> I've read through both the link you suggested
>> andhttp://www.tvidesign.co.uk/blog/improve-your-jquery-25-excellent-tips...
>> but I can't understand how I would make event delegation work for me.
>>
>> This is what I attempted:
>>
>> function watchLinks()
>>   {
>>     $("a").click(function(e)
>>     {
>>       var linkClicked = $(e.target);
>>       if( linkClicked.is("a"))
>>       {
>>         var youWantToGoTo =
>> linkClicked.attr('href').substr(0,$(this).attr('href').length-4); //
>> Determine destination
>>         openPage(youWantToGoTo); // Open destination
>>         window.location.hash = youWantToGoTo; // Set the url #
>>         return false;
>>       }
>>     });
>>   };
> 
> 
> Don't bind the anchors, bind the document:
> 
> $(document).click(function(e) {
>   var $el = $(e.target);
>   if ($el.is('a')) {
>   var href = $el.attr('href');
>   var hash = href.substr(0,href.length-4);
>   openPage(hash);
>   window.location.hash = hash;
>   return false;
>   }
> });
> 
> 

-- 
View this message in context: 
http://www.nabble.com/.load%28%29-callback-tp21389522s27240p21398423.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: Can I get the contents from respose by ajax

2009-01-11 Thread David .Wu

I tried all your suggestion, but got some weired result.

ajax.html

http://www.w3.org/1999/xhtml";>


ajax












ajax.php

http://www.w3.org/1999/xhtml";>


ajax



test contents



On 1月10日, 上午2時11分, dropcube  wrote:
> > is there any way to get the value 123 straight from div?
>
> yes, just apply a jQuery selector to the response content and get
> whatever you need. In this example:
>
> $('#a', res).text();
>
> OR
>
> $(res).find('#a').text();
>
> You can also try with $.load that allows you to specify a jQuery
> selector in the URL.


[jQuery] Re: IMAP PHP is possible or not !!!!

2009-01-11 Thread jQuery Lover

The main question is: What is taking up the time? Is it php script
that connects through imap and retrieves mail list or is it the
mail list download time?

Read jQuery HowTo Resource  -  http://jquery-howto.blogspot.com



On Sun, Jan 11, 2009 at 10:46 AM, bharani kumar
 wrote:
> Yes, Ok,
>
> Here another question , this is new question,
>
> am working in imap php,
>
> it take too much time for load the inbox mail,
>
> any idea , to increase the speed,
>
>
> On Sun, Jan 11, 2009 at 11:09 AM, jQuery Lover 
> wrote:
>>
>> I don't think so. Because you were parsing your COM elements using php
>> before jquery and still parsing them with php. The only performance
>> increase you may see is the page load. The page with jquery will load
>> first and then jquery will load Com object contents. This will still
>> take original 50 secs.
>>
>> Read jQuery HowTo Resource  -  http://jquery-howto.blogspot.com
>>
>>


[jQuery] Re: jeditable & autocomplete - time to revisit?

2009-01-11 Thread Mika Tuupola



On Dec 28, 2008, at 3:23 AM, Diogo Merovingio wrote:


I still with problems. When the "onblur" submit the form, the
autocomplete didn't finish yet. The consequence is that when I select
something from autocomplete and press tab the string submitted was
only part of what I wrote (ex.: I write "fran", the autocomplete
suggest "France", if I select or press tab the string posted is
"fran").



Sorry it took a while. Was on vacation.

I guess the problem is using submit onblur. The input most likely  
blurs when you tab. Have you tried using ignore onblur?


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