[jQuery] Re: sent a message, nothing visible

2009-01-08 Thread jQuery Lover
I am not receiving messages. So I am testing if my messages are going out :)


On Thu, Jan 8, 2009 at 3:47 PM, lsblsb  wrote:

>
> just send a message here, but it doesnt appear since 2 hours.
> so this is a test...
>



-- 

jQuery HowTo Resource 


[jQuery] Re: jqGalScroll in Joomla

2009-01-08 Thread jQuery Lover
Set css style for your unordered list items to none;
ul{
  list-style:none;
}


On Thu, Jan 8, 2009 at 8:33 AM, ozz  wrote:

>
> Installed jQuery into Joomla article, portfolio scroll, looks awesome,
> works fine!
> Only one problem, it shows bullets beside each image and pagination...
> It's fine on a regular html page
> Can you guys help??? What should i do?
>



-- 

jQuery HowTo Resource 


[jQuery] Re: Simulate BackSpace key

2009-01-08 Thread jQuery Lover
As far as I can remember trigger function takes only two parameters. The
second parameter should be an array:
$('#editor').trigger("keypress", [null,{which:
8,pageX:e.pageX,pageY:e.pageY}]);



On Thu, Jan 8, 2009 at 3:57 PM, RSol  wrote:

>
> I read that I can simulate keypress with code:
>
> $('#editor').trigger("keypress", [],null,{which:
> 8,pageX:e.pageX,pageY:e.pageY});
>
> This code dont work.
>
> Please help me solve this.
>



-- 

jQuery HowTo Resource 


[jQuery] Re: Joomla and jqGalScroll

2009-01-08 Thread jQuery Lover
Another one:
Set css style for your unordered list items to none;
ul{
  list-style:none;
}



On Thu, Jan 8, 2009 at 8:37 AM, Alex Osipov  wrote:

> Hi there, i am not sure if i am writing to the right place:)Installed
> jquery into the joomla, posted, works great
> Only one thing it's shows the bullets beside every image, and between
> pagination numbers
> It works fine on regular html page...
> Please help??
>
> Best Regards,
> Alex
>
> 778.991.3593
> design: www.acreative.ca
> art: www.ozipov.com
>
>


-- 

jQuery HowTo Resource 


[jQuery] Re: help me in jquery show( speed, [callback] ) effects

2009-01-08 Thread jQuery Lover
You can do this:

$('dd').click(function(){
  // here select and show whatever you want
  $('.somethingToShow').show('slow');
});


On Thu, Jan 8, 2009 at 3:30 PM, nage  wrote:

>
> hi
>
>  I am new to jquery,   i have on form with 3 images,  i want  call
> show( speed, [callback] )
> function  when  clicking particuler  image only
>
> for  example
>
>  
>  
>  
>
>
> i want  call  show( speed, [callback] ) when  clicking welcome.gif
> image  only
>


- - - - -
jQuery HowTo Resource 


[jQuery] Re: [tooltip] catch images before showing them

2009-01-08 Thread jQuery Lover
Preload all images used in tooltip with javascript:
Detailed article:
http://articles.techrepublic.com.com/5100-10878_11-5214317.html

Google:
http://www.google.com/search?rlz=1C1GGLD_enUZ291UZ308&sourceid=chrome&ie=UTF-8&q=javascript+image+preload


On Thu, Jan 8, 2009 at 4:13 PM, kannibal  wrote:

>
> Hi,
>
> Im using jQuery tooltip to show a preview of links using
> http://url2jpg.nu/
> First time it takes a long time, how can i cache all images before
> hovering the link?
>
> Regards Stefan
>


- - - - -
http://jquery-howto.blogspot.com"; title="jQuery HowTo site">jQuery
HowTo Resource


[jQuery] Re: bind the same functionality to load and change event

2009-01-08 Thread jQuery Lover
Move your code to some function and then call it on document ready and
onchange-event:

function myMethod(){
  // my custom js code
}

$(document).ready(function(){
  myMethod();
  $("#properties div select").bind("change",myMethod());
});

-- 
jQuery HowTo Resource 



On Thu, Jan 8, 2009 at 2:19 PM, lsblsb  wrote:

>
> hi there,
>
> i want to execute the same lines of code when the site has finished
> loading AND when an onchange-event is fired.
>
> i tried something like
>
> $("#properties div select").bind("ready change",function(e){
> $("#properties div select").bind("load change",function(e){
>
> but this does not work :/
>
> can you tell me how to do something like that?
>
> thank you!
>


[jQuery] Re: jQuery - Binding to Ajax Event

2009-01-08 Thread jQuery Lover

Why don't you use jQuery's helper function $.getJSON( url, [data], [callback] )

http://docs.jquery.com/Ajax/jQuery.getJSON#urldatacallback


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


On Fri, Jan 9, 2009 at 9:32 AM, goodsanket  wrote:
>
> Hi all
>
> I am developing a portal and i am kind of stuck.
> I am using multiple AJAX calls to get data dynamically from a JSON
> file.
>
> In one page I am making 2 AJAX calls, and I want to call a function on
> call back from AJAX. I found out a way to do it, its something like
> this,
>
>
>   $(window).bind("ajaxComplete", function() {
>   function1();
>   });
>
> Now problem here is, function1 is being called twice, on each AJAX
> callback. Is there any way so that i can call function1 only once.
>
> Thanks


[jQuery] Re: Simulate BackSpace key

2009-01-08 Thread jQuery Lover

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



On Fri, Jan 9, 2009 at 11:03 AM, RSol  wrote:
>
> To replace ':)' to image I see 2 variants:
> When I detect ':)' I:
> 1. Emulate two BackSpace and execCommand('InsertImage',false,img)
> 2. Get all text from '#editor', then String.replace(/:\)/g,img), then
> put that in '#editor', then need moove cursor to the end of '#editor'.
> I dont know how to move cursor to the end of editor.
>
> I select 1st variant, and try emulate BackSpace key. Using $
> ('#editor').trigger("keypress", ) I cant do this - I dont ckow
> how!
> I find:
>
> var evt = document.createEvent("KeyEvents");
> evt.initKeyEvent(
>  "keypress",//  in DOMString typeArg,
>  true, //  in boolean canBubbleArg,
>  true, //  in boolean cancelableArg,
>  null, //  in nsIDOMAbstractView viewArg,  Specifies
> UIEvent.view. This value may be null.
>  false,//  in boolean ctrlKeyArg,
>  false,//  in boolean altKeyArg,
>  false,//  in boolean shiftKeyArg,
>  false,//  in boolean metaKeyArg,
>  8,   //  in unsigned long keyCodeArg,
>  0);  //  in unsigned long charCodeArg);
> $('#editor')[0].dispatchEvent(evt);
>
> it's work in FF, but dont work in IE.
>
>> Ah, I think I see the issue. Am I right in assuming that you don't
>> want to simulate the backspace, but detect it?
>
> I need to simulate the BackSpace
>
>> Also, how are you keeping track of the replacement? It seems to me
>> that you could do yourself a big favor and make what the user enters
>> not what you show the user, so when they delete a smiley, you can just
>> remove the whole thing?


[jQuery] Re: simple problem

2009-01-08 Thread jQuery Lover

You are selecting an image and image has no HTML or any kind of text
content in it!

img element has no html() function.

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



On Thu, Jan 8, 2009 at 8:11 PM, CreativeMind  wrote:
>
> hi all,
> i m unable to find the img and its src attribute...
> when i write
> alert($(myobj[1][$c]).find('li').html());
> i get the output
>  
>
>  alert($(myobj[1][$c]).find('li').find('a').html());
> 
>
> but when i try
>  alert($(myobj[1][$c]).find('li').find('a').find('img').html());
>
> i get no value or empty value .. can u plz correct it..
> thx
>


[jQuery] Re: how to select all first td's inside all in a table

2009-01-08 Thread jQuery Lover

Once more solution:

 $("tr td:nth-child(1)").addClass('date');


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



On Fri, Jan 9, 2009 at 2:58 AM, Tijmen Smit  wrote:
>
> I have a table that contains several , all of them look like
> this.
>
>
>20-04
>459
>559
>659
>439
>519
>599
>424
>489
>554
>
>
>27-04
>506
>606
>706
>486
>566
>646
>471
>536
>601
>
>
>
> One of the things that I would like to do is add the class "date" to
> the first td that exists after a .
>
> I came up with this -> $("#prijslijst-appartement tr td:eq
> (0)").addClass("date"); , but that doesn't really do what I thought It
> would. It only adds the date class to one td, and it ignores all the
> other  in the table. What I was hoping it would do is finding all
> , and then add the date class to the first  in all the  in
> the entire table.
>
> You can see the example here -> http://tijmensmit.com/dev/td/prijslijst.html.
> The one with the date class on it has the pink border around it.
>
> Its not only the first  which I should target, the 3th, 6th and
> 9th  within each  should also be given a different class.
>
> What would be the best way to do this, and to make sure it looks in
> all  in the entire table, and not stops after the first one?
>
> Thanks,
> Tijmen


[jQuery] Re: Simulate BackSpace key

2009-01-09 Thread jQuery Lover
There is a nice article
(http://the-stickman.com/web-development/javascript/finding-selection-cursor-position-in-a-textarea-in-internet-explorer/)

I found comments particularly useful.

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



2009/1/9 RSol :
>
> 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


[jQuery] Re: Attach events to items before $(document).ready

2009-01-09 Thread jQuery Lover

Put your javascript right under the input field.



...


document.myForm.username.focus();


It is not jQuery, but plain javascript. Just in case jquery is not
fully loaded...

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



On Fri, Jan 9, 2009 at 6:25 PM, Gordon  wrote:
>
> I've got a field on a web page that needs some javascript behaviour
> when it gains or loses focus, so I attached the appropriate handlers
> in a $(document).ready to the field.
>
> It all works fine, except if the user focuses the input field before
> the ready event fires.  In this case the behaviour doesn't occur.
>
> The old version used onfocus and onblur attributes in the tag itself,
> which is obviously a very bad way of doing it, but did have the
> advantage that the behaviour would occur as soon as the input field
> became visible.
>
> Is there a friendlier way of attaching behaviour before the ready
> event?


[jQuery] Re: Tutorials or examples of jQuery and ColdFusion?

2009-01-09 Thread jQuery Lover

jquery is client side scripting language and it does not care nor
knows what you are using at the server side as far as you return what
it is expecting (xml, json, html, plain text, etc).

You should probably ask for utility classes. For example a class that
would convert your object or an array to json or something...

That is my opinion...

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



On Thu, Jan 8, 2009 at 10:44 PM, Rick Faircloth
 wrote:
>
> Hi, all...
>
> I think I saw it mentioned that someone had written
> some examples of using jQuery on the front-end and
> ColdFusion on the backend for ajax work.
>
> Most of the stuff I find on the 'Net with jQuery
> and PHP.
>
> Perhaps the examples were written in conjunction
> with a plug-in?
>
> I'd appreciate any clues.
>
> Thanks,
>
> Rick
>
>


[jQuery] Re: Preload images for jQuery Cycle Plugin

2009-01-09 Thread jQuery Lover

Here is something from top of my head:

$(function () {
  var imgs = new Array();
  imgs[0] = 'images1.jpg';
  imgs[2] = 'images2.jpg';
  imgs[3] = 'images3.jpg';
  imgs[4] = 'images4.jpg';
  imgs[5] = 'images5.jpg';

  var $img = new Image();

  for(var i in imgs){
$($img)
  .load(function () {
checkFinal();
  })
  .attr('src', imgs[i]);
}

});

var loaded = 0;
function checkFinal(){
  loaded++;
  if(loaded == 5){
// =
// call image rotator statement here
// =
  }
}

Basically, it loads five images. On each load it checks if it is the
final image and if it is then call the jquery cycle plugin statement

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



On Fri, Jan 9, 2009 at 10:49 AM, code_monkey <3dcreat...@gmail.com> wrote:
>
>
> Hi,
> I'm quit new to jquery and trying to figure out how to preload image for
> jQuery Cycle Plugin.
>
> I have 5+ large size images and I need those to be preloaded before starting
> the slideshow with cycle plugin. I also I need to display a loading gif wile
> it preloads the images.
>
> I have tried to implement the technique here
> http://jqueryfordesigners.com/image-loading/
>
> but still couldn't figure out how to make it working with the cycle plugin.
>
> Can anyone please help me with this?
>
> Thanks
>
> --
> View this message in context: 
> http://www.nabble.com/Preload-images-for-jQuery-Cycle-Plugin-tp21366628s27240p21366628.html
> Sent from the jQuery General Discussion mailing list archive at Nabble.com.
>
>


[jQuery] Re: jquery abstraction/widget for fixed panel at bottom page

2009-01-09 Thread jQuery Lover

Here is exactly what you need :)
http://www.ben-griffiths.com/project/jquery-position-footer/

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



On Fri, Jan 9, 2009 at 7:07 PM, aldana  wrote:
>
>
> hi,
>
> i read that you can use following for a html-snippet which should be fixed
> at bottom page:
> style="position: fixed; bottom: 0px;"
>
> but it does not seem to work with all browsers (e.g. IE6). does jquery
> provide an abstraction for fixed-style box at the bottom of the page?
>
> thanks.
>
> -
> manuel aldana
> aldana((at))gmx.de
> software-engineering blog: http://www.aldana-online.de
> --
> View this message in context: 
> http://www.nabble.com/jquery-abstraction-widget-for-fixed-panel-at-bottom-page-tp21372949s27240p21372949.html
> Sent from the jQuery General Discussion mailing list archive at Nabble.com.
>
>


[jQuery] Re: Need help with a Jquery toggle bug in my menu's

2009-01-09 Thread jQuery Lover

Introduce some variable that tracks the current menu state.

$(document).ready(function(){
  var menuOn = false;
  $("li.main-nav").children('div').hide();
  $("li.main-nav").bind("mouseenter mouseleave", function(){
...
  });
});

And then, in your bound function check with "if" statement if the menu
is on. If it's off then change to on, plus change the menuOn value to
true. Similar with the "off" case.

I hope I was clear enough.

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



On Fri, Jan 9, 2009 at 7:14 PM, Ted  wrote:
>
> I've got a full width drop down menu setup, using jquery's toggle to
> show/hide the hidden divs when the user clicks on the one of the 
> elements or any of it's children.
>
> The problem I'm having (and it's kind of hard to reproduce), is that
> if the user has their mouse over one of the  items while the page
> is loading, the toggle becomes confused, and believes that on is off
> and off is on. Basically giving you a flickering menu.
>
> Here's my Jquery code:
>
>$(document).ready(function(){
>$("li.main-nav").bind("mouseenter mouseleave", function
> (){
>$(this).children('div').toggle();
>$(this).toggleClass('menu-on');
>return false;
>});
>});
>
> And the URL of the test case:
>
> http://dl.getdropbox.com/u/21984/menu_test/menu_test.html
>
> I had figured if I told Jquery to hide all of the divs before I
> introduce the toggle function that would solve the problem, and tried
> using a piece of code that looks like this:
>
> $(document).ready(function(){
>$("li.main-nav").children('div').hide();
>});
>
> ...but that didn't help.
>
> Does anyone have any ideas on how I could fix this?


[jQuery] Re: Attach events to items before $(document).ready

2009-01-09 Thread jQuery Lover

I agree with Rob here. Inline javascript is not the worst that may
happen to your page. It's just the hype around unobtrusive javascript
coding that we have lately that makes some people to think that it is
the worst thing ever.

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



On Fri, Jan 9, 2009 at 6:59 PM, RobG  wrote:
>
>
>
> On Jan 9, 11:25 pm, Gordon  wrote:
>> I've got a field on a web page that needs some javascript behaviour
>> when it gains or loses focus, so I attached the appropriate handlers
>> in a $(document).ready to the field.
>>
>> It all works fine, except if the user focuses the input field before
>> the ready event fires.  In this case the behaviour doesn't occur.
>
> That is a major issue with dynamically attached listeners.  The longer
> the page takes to load, the more likely it is that it will occur.
>
>>
>> The old version used onfocus and onblur attributes in the tag itself,
>> which is obviously a very bad way of doing it,
>
> Obviously?  There is nothing wrong with inline listeners.  Ultimately,
> you are trying to create a document with appropriate elements and
> functionality - how you go about that should be determined by your
> functional requirements.
>
> If you have a requirement for elements to have listeners from the
> instant they appear, and there is a good chance that dynamic listeners
> wont be attached quickly enough, put them inline.
>
>
>> but did have the
>> advantage that the behaviour would occur as soon as the input field
>> became visible.
>
> Which seems to be what you want, so why is it so bad?
>
>>
>> Is there a friendlier way of attaching behaviour before the ready
>> event?
>
> An alternative is to use a script element immediately after the
> element you want the listener attached to, but I'll guess that you
> like that approach even less.
>
>
> --
> Rob


[jQuery] Re: How best to create Google Calendar functionality in Jquery?

2009-01-09 Thread jQuery Lover

jQuery UI already has what you need.

First use a container div with bg image of time. Then create a
dragable and resizable div that can only be dragged/resized
horizontally. Then use jquery.offset() to get where the div's left and
right sides are and easily calculate start and end dates. Similar with
the vertical time spanning case.

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



On Fri, Jan 9, 2009 at 12:02 PM, Val  wrote:
>
> Hi,
>
> I'm rather new to Jquery and hope someone can point me in the right
> direction here.
>
> In my current project I need to implement some calendar event
> functionality (similar to Google Calendar or Mobile Me calendar).  In
> a nutshell, I need to be able to:
> - Create new div with click and drag
> - Resize div by clicking on handles (while updating start and end
> times)
> - Drag divs to reposition on day grid (while updating new start and
> end times)
>
> I know that JQuery UI offers some basic dragging and resizing, but
> I've been looking all over for a plug-in or other project that would
> provide the more advanced "calendar" functionality of tracking start
> and end times as a div is moved or resized.
>
> I haven't been able to find any such project in Google, however.   Can
> anyone point me in the direction on where to start for this type of
> thing?
>
> Thanks for your help,
> Val
>


[jQuery] Re: Superfish Righthand Side of Window Folding

2009-01-09 Thread jQuery Lover

There seems to be no option so you will have to change the code.

You will have to check if the menu will overflow the window and
proceed accordingly.

So check the value of (current menu right side + popup menu width) is
bigger than window width. If it is position popup menu to the left
side of the current menu.

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



On Fri, Jan 9, 2009 at 3:51 PM, DIA  wrote:
>
> Hi there,
>
> Is there a way to get the Superfish menu to fold back if child items
> are too close to the righthand edge of the window, rather than go off
> screen?
>
> An example of a menu which does this is:
> http://www.dynamicdrive.com/style/csslibrary/item/jquery_multi_level_css_menu_2
>
> Thanks!
>


[jQuery] Re: teaching jquery instead of javascript ?

2009-01-09 Thread jQuery Lover

I agree with that :)

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



On Fri, Jan 9, 2009 at 7:47 PM, Ricardo Tomasi  wrote:
>
> I'm sure most will agree that 240 hours is more than reasonable time
> to learn the basics of Javascript, and then jQuery and a third library
> of your choice. You can learn the workings of the jQuery API in a few
> hours if you're good at JS. I haven't counted but I probably don't
> have more than 240 hours of practice with jQuery.
>
> - ricardo
>
> On Jan 9, 5:36 am, "Alexandre Plennevaux" 
> wrote:
>> hi Ricardo,  it's actually 120 hours per year, and it's the last two
>> years. so 240 hours.
>>
>> On Fri, Jan 9, 2009 at 4:44 AM, Ricardo Tomasi  wrote:
>>
>> > Yes but what happens when you find an error in your script? It might
>> > be a very basic mistake but you won't have a clue if you don't know
>> > javascript itself. What happens 5 years from know if a totally
>> > different library, with different syntax, takes over?
>>
>> > I agree with Peter Higgins, it's much more useful to teach the basics
>> > first, then introduce jQuery, if they got the very basics then they
>> > can learn the rest on their own. It's like teaching someone to use the
>> > Blueprint CSS framework and not explaining what classes really are.
>> > They`ll find themselves lost at the first adversity.
>>
>> > - ricardo
>>
>> > Do you mean 2 hours a week for 3 years? That's enough to learn well 5
>> > different languages :D
>>
>> > On Jan 8, 8:30 pm, Kean  wrote:
>> >> Your audience are designers, they will pick up jQuery faster because
>> >> they think in CSS.
>>
>> >> At what point do you teach them javascript?
>> >> When you teach them how to create plugins for jQuery.
>>
>> >> I hope this helps.
>>
>> >> On Jan 8, 2:13 pm, Nikola  wrote:
>>
>> >> > Why not integrate the basic "JavaScript Fundamentals" in each jQuery
>> >> > lesson.  You could show some general examples and explain the
>> >> > rudimentary JavaScript principal (I'm thinking a 15 minute
>> >> > introduction...) then teach the jQuery and demonstrate how and why
>> >> > jQuery is the "write less, do more" JavaScript library..  This way,
>> >> > students get the gist of the JavaScript while learning jQuery. This
>> >> > may not be as desirable as learning jQuery on top of a strong
>> >> > JavaScript foundation but it can certainly help them to become
>> >> > stronger jQuery developers while giving them an introductory
>> >> > foundation in JavaScript principals.


[jQuery] Re: Simulate BackSpace key

2009-01-09 Thread jQuery Lover

You can't trigger but can achieve the same effect :)

An you will definitely deal with Ranges to make your code cross browser :)

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



On Fri, Jan 9, 2009 at 7:43 PM, Ricardo Tomasi  wrote:
>
> You can't actually trigger a keypress, only it's event listeners. I
> think you'll have to deal with "ranges": 
> https://developer.mozilla.org/En/DOM/Range
>
> On Jan 9, 4:03 am, RSol  wrote:
>> To replace ':)' to image I see 2 variants:
>> When I detect ':)' I:
>> 1. Emulate two BackSpace and execCommand('InsertImage',false,img)
>> 2. Get all text from '#editor', then String.replace(/:\)/g,img), then
>> put that in '#editor', then need moove cursor to the end of '#editor'.
>> I dont know how to move cursor to the end of editor.
>>
>> I select 1st variant, and try emulate BackSpace key. Using $
>> ('#editor').trigger("keypress", ) I cant do this - I dont ckow
>> how!
>> I find:
>>
>> var evt = document.createEvent("KeyEvents");
>> evt.initKeyEvent(
>>   "keypress",//  in DOMString typeArg,
>>   true, //  in boolean canBubbleArg,
>>   true, //  in boolean cancelableArg,
>>   null, //  in nsIDOMAbstractView viewArg,  Specifies
>> UIEvent.view. This value may be null.
>>   false,//  in boolean ctrlKeyArg,
>>   false,//  in boolean altKeyArg,
>>   false,//  in boolean shiftKeyArg,
>>   false,//  in boolean metaKeyArg,
>>   8,   //  in unsigned long keyCodeArg,
>>   0);  //  in unsigned long charCodeArg);
>> $('#editor')[0].dispatchEvent(evt);
>>
>> it's work in FF, but dont work in IE.
>>
>> > Ah, I think I see the issue. Am I right in assuming that you don't
>> > want to simulate the backspace, but detect it?
>>
>> I need to simulate the BackSpace
>>
>> > Also, how are you keeping track of the replacement? It seems to me
>> > that you could do yourself a big favor and make what the user enters
>> > not what you show the user, so when they delete a smiley, you can just
>> > remove the whole thing?


[jQuery] Re: if statement testing for null value

2009-01-09 Thread jQuery Lover

Where are you putting this code? Running it on page load will not do much.

Put it into a function and then bind it to all five fields.

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



On Fri, Jan 9, 2009 at 7:50 PM, Chuk  wrote:
>
> Thanks for your suggestions, guys.  I tried replacing != with !==, and
> nothing changed.
> Mike, concerning your suggestions, I'm really not sure what's going
> on.  Is the first one testing to see if each of the fields contains a
> value...and then enabling the submit button?  When I try that approach
> and insert breakpoints using firebug, I see that the script never gets
> executed...even when I fill each field with a value.  When I try the
> second approach, the same thing happens.  I insert the code, insert
> the breakpoint, fill the fields with values, and the script is not
> executed.  Should I put one of those approaches within a .change()
> event for each of the fields?


[jQuery] Re: Does anyonw know a jQuery plug-in like Magic Zoom

2009-01-09 Thread jQuery Lover
Here you go. Exactly the same (SUSPICIOUSLY SIMILAR) jquery plugin:

http://www.mind-projects.it/projects/jqzoom/

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



2009/1/9 Nguyễn Quốc Vinh :
> This tool is so cool! But it is not free!
> http://www.magictoolbox.com/magiczoom/
> Does anyone know a jQuery plug-in like that?
> Or other javascript code which has same features?
>
> --
> /
> * Người ta thưởng chỉ chú ý đến những kẻ lên như diều gặp gió! Nhưng hỡi ôi,
> chỉ có cát, bụi và lông hồng mới là những thứ lên nhanh nhất
> */
>


[jQuery] Re: Is there a way to create Javascript virtual or logical path mappings?

2009-01-09 Thread jQuery Lover

Why don't you add "/" to your path and it will always work, wherever
you are, on the same lever, below or upper ...

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



On Sat, Jan 10, 2009 at 8:04 AM, Rick Faircloth
 wrote:
>
> I've got login templates that use jQuery and the
> path required depends on the ColdFusion template
> including the jQuery in the page.
>
> For example:
>
> tb_show("Login", "login/login_form.cfm?height=320&width=290&modal=true", 
> false);
>
> This code's path, "login/login_form.cfm", works when included
> from a directory above the "login" directory.
>
> But when it's included in a template that's in a directory
> that's on the same level as the login directory, that path
> won't work.
>
> In ColdFusion, as of version 8, we can create per-application
> logical mappings, such as the example below that works anywhere:
>
> (this.mappings, "/app_login", "e:\inetpub\webroot\fortstewart-sm\login")
>
> And I could just use td_show("Login", "/app_login/login_form.cfm etc...)
> and it would work when included in a template in any location in the tree.
>
> I was wondering if the same thing can be done with jQuery/Javascript
> or if there's another solution so I don't have to do this:
>
> 
>
>
> 
>
>
> 
>
> Rick
>
>


[jQuery] Re: non standard characters in class names, not working in funtion

2009-01-09 Thread jQuery Lover

I don't think there are other solutions but escape special characters
in your jquery selector names...

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


>
> if any one can point me to other solutions ...


[jQuery] Re: jQuery code not being run

2009-01-09 Thread jQuery Lover

Yeap, the "not defined" errors mean jQuery is not loaded. So you
should load your jQuery first and then other js code that uses it.

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



On Sat, Jan 10, 2009 at 6:30 AM, donb  wrote:
>
> Move the jquery.js link ahead of all the others (because 'jQuery' is
> NOT loaded when they call it) and fix the path on dropdown.js - it is
> not loaded at all
>
> On Jan 9, 8:06 pm, "oliver.pra...@googlemail.com"
>  wrote:
>> Hi,
>>
>> Since there's been no answers I'm just checking in again.
>>
>> I opened the page with Firebug and luckly recieved so error messages:
>>
>> jQuery is not defined
>> hoverIntent.js()()hoverIntent.js (Linie 84)
>> [Break on this error] })(jQuery);
>> hoverIntent.js (Linie 84)
>> jQuery is not defined
>> superfish.js()()superfish.js (Linie 121)
>> [Break on this error] })(jQuery);
>> superfish.js (Linie 121)
>>
>> If anyone knows what they mean dont wait and reply, I'll also research
>> forther with my bind approach...
>> since this is the first js I'm ever doing on a webpage
>>
>> Oliver
>>
>> On Jan 3, 9:07 pm, "oliver.pra...@googlemail.com"
>>
>>  wrote:
>> > Hi,
>>
>> > I'm working on a site with somebody, and we got most of it finished,
>> > but it needs a little self made jQuery coding ...
>>
>> > The problem is that this isn't running at all!
>>
>> > The code is in personalized.js and is being loaded (firebug)
>>
>> > Code in bin:http://code-bin.homedns.org/205
>>
>> > We already tested around a bit but couldn't find anything that will
>> > make it work, I think we also got a version using the var $j =
>> > jQuery.noConflict(); but that might have been done wrong, theres a hide
>> > () on mainContent just for testing but this isn't getting done
>> > either...
>>
>> > The hole site is till now just for Firefox 3+ tested (and will break
>> > in ie as far as i know)
>>
>> > The website:http://www.vonderdecken.net/
>>
>> > hope you can help since I'm totally new to javascript and jQuery. This
>> > means I sadly also means I have not a clue at all how to debug it...
>>
>> > Oliver


[jQuery] Re: double $().read()

2009-01-09 Thread jQuery Lover

Yes, you can as many $(document).ready() functions...

Because you are not declaring but binding event to document object
with $().ready().

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



On Sat, Jan 10, 2009 at 5:31 AM, saiful.ha...@gmail.com
 wrote:
>
> hi all,
>
> can we put double $().read() declare? cos i am using tab-ui not in all
> page, just in one page only?
> is has trick's for this happen
>
> ~ saiful haqqi ~
>
>


[jQuery] Re: Thickbox and Yahoo Stores

2009-01-09 Thread jQuery Lover

Do you have a link or could you copy&paste html code snippet of your
image with the links...

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



On Sat, Jan 10, 2009 at 2:16 AM, MikeFCraft  wrote:
>
> I'm helping someone set up thickbox to work on their yahoo store. It
> seems like Yahoo has a built-in click tracking system that is messing
> up the thickbox though.
>
> For example clicking on a thickbox link that points to "theFile.htm"
> first makes a request to yahoo for something like:
>
> http://a.analytics.yahoo.com/p.pl?a=...
>
> with a ton of analytical data appended to the URL. It returns a
> tracking gif, and the real content of theFile.htm never loads. (you
> just stare at thickbox's loadingAnimation.gif forever)
>
> Has anyone ever seen this before and come up with a workaround?
>


[jQuery] Re: Simplemodal causes validators to fire on webform

2009-01-09 Thread jQuery Lover

You probably binding your validators to ALL input[type=submit] or to
some class (Ex: .submit)

If so give your selector a scope $('.submit-button',
document.forms[0]).bind()...

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



On Thu, Jan 8, 2009 at 9:31 PM, tawright915  wrote:
>
> When I click the close button on my modal message box it causes the
> required field validators to fire on my form.  Is there a way to stop
> this from happening?
>
> Tom


[jQuery] Re: Thickbox and Yahoo Stores

2009-01-09 Thread jQuery Lover

Didn't we already have this message ???

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



On Sat, Jan 10, 2009 at 2:10 AM, Mike521  wrote:
>
> I'm helping someone set up thickbox to work on their yahoo store. It
> seems like Yahoo has a built-in click tracking system that is messing
> up the thickbox though.
>
> For example clicking on a thickbox link that points to "theFile.htm"
> first makes a request to yahoo for something like:
>
> http://a.analytics.yahoo.com/p.pl?a=...
>
> with a ton of analytical data appended to the URL. It returns a
> tracking gif, and the real content of theFile.htm never loads. (you
> just stare at thickbox's loadingAnimation.gif forever)
>
> Has anyone ever seen this before and come up with a workaround?


[jQuery] Re: Anyone using jQuery with Tapestry 5?

2009-01-09 Thread jQuery Lover

Hello there,

There are no special means or specific incorporations of jQuery to
some framework nor to a programming languages. Tapestry is not an
exception. Use jQuery to do your front end work, use Tapestry to
generate html you need.

All you need is a java utility classes to convert your java objects to
json format. You can download and find out more about json java
classes here: http://www.json.org/java/

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



On Sat, Jan 10, 2009 at 1:06 AM, rolfsf  wrote:
>
> I've recently started doing some front end design for a team who are
> working in Tapestry 5 - would love to know if there is anyone on the
> list who has experience incorporating jQuery into Tapestry, and if
> there are any known issues
>
> thanks!


[jQuery] Re: Best way to preload an image to obtain dimensions

2009-01-09 Thread jQuery Lover

Eric gives you the jQuery way, basically the jQuery syntax.

I can't agree with Brian's idea. Loading original images in your
gallery is not the best thing, unless you know your target audience
has high speed internet or they are all in your local area network.

Although, Eric's code is jQuery way of doing things, I find your code
more readable.

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



On Fri, Jan 9, 2009 at 4:06 AM, nabrown78  wrote:
>
> Hi All,
> I am building a simple little gallery where you click on a thumbnail,
> and a larger image displays on the same page. I was trying to adjust
> the padding around the large image using the new image's dimensions. I
> pieced together this image preloading code (see below), but I don't
> fully understand it (is it just loading the new image into the DOM to
> be able to access its dimensions?) and I don't know if it's the best
> way to go about it.
>
> Many thanks for any advice,
> Nora Brown
>
> $(document).ready(function(){
>
>$(".thumbs a").click(function(){
>
>var largePath = $(this).attr("href");
>var largeAlt = $(this).attr("title");
>
>// Image preload process
>var imagePreloader = new Image();
>imagePreloader.src = largePath;
>imagePreloader.onload = function() {
>alert(imagePreloader.height);
>};
>
>$("#largeImg img").attr({ src: largePath, alt: largeAlt });
>return false;
>})
>
> });
>


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

2009-01-09 Thread jQuery Lover

I would also suggest to use $load() function in this case. Since it
would make your code much readable.

$('aa.php #a', {a:123}, function(res){
  // res is a responce content
});

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



On Fri, Jan 9, 2009 at 11:11 PM, dropcube  wrote:
>
> You can also try with $.load that allows you to specify a jQuery
> selector in the URL.


[jQuery] Re: How it should be done?

2009-01-09 Thread jQuery Lover

Or if you have just one ul on your page, simply:

$('ul li').hover(
 function () {
   $(this).addClass("columnSelected");
 },
 function () {
   $(this).removeClass("columnSelected");
 }
);

You may find "jQuery HowTo" useful  -  http://jquery-howto.blogspot.com



On Fri, Jan 9, 2009 at 10:47 PM, Paul Mills  wrote:
>
> Hi,
>
> I assume the  elements are wrapped in a . So first give the
>  a unique ID so it's easy to identify. So code looks a bit like
> this:
> 
>  column 1
>  column 2
>  column 3
> 
>
> Now you can code the one jQuery command to operate on all s within
> the :
> $('#columns li').hover(
>  function () {
>$(this).addClass("columnSelected");
>  },
>  function () {
>$(this).removeClass("columnSelected");
>  }
> );
>
> Paul
>
> On Jan 8, 2:53 pm, zibi  wrote:
>> I have something like this:
>>
>> $("li.column1").hover(
>> function () {
>> $("li.column1").addClass("columnSelected");
>>   },
>>   function () {
>> $("li.column1").removeClass("columnSelected");
>>   }
>> );
>>
>> $("li.column2").hover(
>> function () {
>> $("li.column2").addClass("columnSelected");
>>   },
>>   function () {
>> $("li.column2").removeClass("columnSelected");
>>   }
>> );
>>
>> $("li.column3").hover(
>> function () {
>> $("li.column3").addClass("columnSelected");
>>   },
>>   function () {
>> $("li.column3").removeClass("columnSelected");
>>   }
>> );
>>
>>  and so on ...
>>
>> $("li.column31").hover(
>> function () {
>> $("li.column31").addClass("columnSelected");
>>   },
>>   function () {
>> $("li.column31).removeClass("columnSelected");
>>   }
>> );
>>
>> So I have 31 times the same thing only class number is changing. How
>> can I do this i simpler way?
>>
>> Thanks


[jQuery] Re: Need help with a Jquery toggle bug in my menu's

2009-01-09 Thread jQuery Lover

@serpicolugnut: read my previous post!!!

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



On Fri, Jan 9, 2009 at 7:06 PM, serpicolugnut  wrote:
>
>
> I've got a full width drop down menu setup, using jquery's toggle to
> show/hide the hidden divs when the user clicks on the one of the 
> elements or any of it's children.
>
> The problem I'm having (and it's kind of hard to reproduce), is that if the
> user has their mouse over one of the  items while the page is loading,
> the toggle becomes confused, and believes that on is off and off is on.
> Basically giving you a flickering menu.
>
> Here's my Jquery code:
>
>$(document).ready(function(){
>$("li.main-nav").bind("mouseenter mouseleave", function(){
>$(this).children('div').toggle();
>$(this).toggleClass('menu-on');
>return false;
>});
>});
>
> And the URL of the test case:
>
> http://dl.getdropbox.com/u/21984/menu_test/menu_test.html
>
> I had figured if I told Jquery to hide all of the divs before I introduce
> the toggle function that would solve the problem, and tried using a piece of
> code that looks like this:
>
> $(document).ready(function(){
>$("li.main-nav").children('div').hide();
>});
>
> ...but that didn't help.
>
> Does anyone have any ideas on how I could fix this?
> --
> View this message in context: 
> http://www.nabble.com/Need-help-with-a-Jquery-toggle-bug-in-my-menu%27s-tp21372944s27240p21372944.html
> Sent from the jQuery General Discussion mailing list archive at Nabble.com.
>
>


[jQuery] Re: jQuery Storage?

2009-01-10 Thread jQuery Lover

Have you tried http://plugins.jquery.com

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



On Fri, Jan 9, 2009 at 9:27 PM, aldana  wrote:
>
>
> Hi,
>
> am looking for the same. Is there any update (since the first post on March
> '08) on this? Really want to avoid inclusion of different library-products.
>
> thnx.
>
>
> timothy...@gmail.com wrote:
>>
>>
>> Is there an equivalent jQuery plugin?
>>
>> http://ajaxian.com/archives/dojo-storage-updated-for-10
>>
>>
>
>
> -
> manuel aldana
> aldana((at))gmx.de
> software-engineering blog: http://www.aldana-online.de
> --
> View this message in context: 
> http://www.nabble.com/jQuery-Storage--tp16097220s27240p21375496.html
> Sent from the jQuery General Discussion mailing list archive at Nabble.com.
>
>


[jQuery] Re: jquery abstraction/widget for fixed panel at bottom page

2009-01-10 Thread jQuery Lover

My bad, the plugin is a little crappy :(

Forget the javascript use CSS!!!

Here is to get you started: http://www.google.com/search?q=bottom+footer+css

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



On Fri, Jan 9, 2009 at 9:25 PM, aldana  wrote:
>
>
> i guess i will do the CSS way (without JS involved). Found a good resource
> (which so far worked on all browsers I tested so far).
>
> http://tagsoup.com/cookbook/css/fixed/#gtev5
>
>
> aldana wrote:
>>
>> hi,
>>
>> i read that you can use following for a html-snippet which should be fixed
>> at bottom page:
>> style="position: fixed; bottom: 0px;"
>>
>> but it does not seem to work with all browsers (e.g. IE6). does jquery
>> provide an abstraction for fixed-style box at the bottom of the page?
>>
>> thanks.
>>
>
>
> -
> manuel aldana
> aldana((at))gmx.de
> software-engineering blog: http://www.aldana-online.de
> --
> View this message in context: 
> http://www.nabble.com/jquery-abstraction-widget-for-fixed-panel-at-bottom-page-tp21372949s27240p21375491.html
> Sent from the jQuery General Discussion mailing list archive at Nabble.com.
>
>


[jQuery] Re: Preload images for jQuery Cycle Plugin

2009-01-10 Thread jQuery Lover

Totally and whole heartedly agree :)

It was late and I was kinda only seeing new Image() method.

My bad..

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



On Fri, Jan 9, 2009 at 9:23 PM, Karl Swedberg  wrote:
> On Jan 9, 2009, at 9:11 AM, jQuery Lover wrote:
>
> Here is something from top of my head:
>
> $(function () {
>  var imgs = new Array();
>  imgs[0] = 'images1.jpg';
>  imgs[2] = 'images2.jpg';
>  imgs[3] = 'images3.jpg';
>  imgs[4] = 'images4.jpg';
>  imgs[5] = 'images5.jpg';
>
>  var $img = new Image();
>
>  for(var i in imgs){
>$($img)
>  .load(function () {
>checkFinal();
>  })
>  .attr('src', imgs[i]);
>}
>
> });
>
>
> The above seems a little overkill to me. I'm not sure why, for example, you
> need to declare var imgs = new Array() and why you skip imgs[1]. Also, I
> think it makes more sense to use a plain for loop rather than a for-in loop
> when iterating through an array. I might be missing something, but couldn't
> it be done more simply like this? ...
> for (var i=1; i <= 5; i++) {
>   $('')
> .attr('src', 'images'+i+'.jpg')
> .load(function () {
>checkFinal();
> });
> }
>
> --Karl


[jQuery] Re: if statement testing for null value

2009-01-10 Thread jQuery Lover

This code is just beautiful :)

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



On Fri, Jan 9, 2009 at 8:38 PM, MorningZ  wrote:
>
> $('#equipmentNumber, #description').keyup(checkSubmit);
> $('#type, #department, #location').change(checkSubmit);
>
> function checkSubmit() {
>   $('#submit').attr('disabled', !($('#equipmentNumber').val() &&
>$('#description').val()  && $('#type').val()  &&
>$('#department')  &&
>$('#location').val() ));
> }
>


[jQuery] Re: Does anyonw know a jQuery plug-in like Magic Zoom

2009-01-10 Thread jQuery Lover
Not at all. There are some alternatives.

A little different approach to zooming: http://valid.tjp.hu/tjpzoom/

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



2009/1/9 Nguyễn Quốc Vinh :
> Wow! Fantastic! Thanks so much!
> This is really useful to me! Thanks again!
>


[jQuery] Re: [validate] message containers and valid XHTML markup?

2009-01-10 Thread jQuery Lover

Martin probably just concerned about the characters in classname ({:,}).

Well they are valid in class names in XHTML 1.0 strict. So no wories :)

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



On Fri, Jan 9, 2009 at 2:19 PM, Jörn Zaefferer
 wrote:
> I don't see how that isn't valid XHTML. Apart from that, could you clarify
> "error containers"? What do you mean?
>
> Jörn
>
> On Fri, Jan 9, 2009 at 12:40 AM, martin  wrote:
>>
>> From what I can make of the documentation, the only way to use
>> validation containers is to put something like...
>>
>> class="{required:true,minlength:3}"
>>
>> into your HTML form elements. Now this works just fine for me,
>> however, its not valid XHTML.
>>
>> Is there any way to have valid XHTML and use error containers?
>
>


[jQuery] Re: Sorting a list of objects ( not in table)

2009-01-10 Thread jQuery Lover

This is easy. All you have to do is select your list items then get
them as an array and then user javascript array's native sort method
like this:

var rows = $('ul#searchResults li').get();
rows.sort(function(a, b) {
  if (a.CustomProperty < b.CustomProperty) return -1;
  if (a.CustomProperty > b.CustomProperty) return 1;
  return 0;
});

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



On Fri, Jan 9, 2009 at 12:46 PM, Ajay  wrote:
>
> Hi all,
>
> I have a list of objects that I represent in a search result and I
> need following features.. on the search ressult page
>
> pagination.. filtering and sorting on basis of some parameters..
> e.g.
> http://tinyurl.com/7uldsd
>
> I found lot of plugins for doing all this in tables and representing
> sortable values in columns.. but I don't want to do that and want to
> represent the results in the list form as in the example URL
> Can any one point to some plugin or code using which I can do
> this.. ?? Any advice or pointers on how to go about doing this is also
> most welcome
>
>
> Thanks!


[jQuery] Re: attr('type') gives me checkbox instead of radio

2009-01-10 Thread jQuery Lover

I just checked. I am getting "radio"!

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



On Fri, Jan 9, 2009 at 7:47 AM, bob  wrote:
>
> Female
> Male
>
> var type = #('inp...@name=gender]').attr('type');
>
> alert(type);
>
> Why do I get checkbox instead of radio?


[jQuery] Re: Swap Image when click

2009-01-10 Thread jQuery Lover

$('#placeWithYourImages a').click(function(){
  var href = $(this).attr('href');
  $('img', this).attr('src', href);
  return false;
});

This code changes only once and it is very primitive. You may wanna
add an if statement to check if the href is equal to src, etc. Or add
some extra code to make it toggle on each image click.

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



On Fri, Jan 9, 2009 at 7:00 AM, jeffreych...@gmail.com
 wrote:
>
> Hi devs,
>
> I kinda new with jquery and would like to ask, has anyone tried to use
> jquery to swap images when click. Its a linked image. SO when you
> click the image it would swap into another one.
>
> Thanks.
>


[jQuery] Re: Getting an array via $.post

2009-01-10 Thread jQuery Lover

You need to echo your array in php in json format. To do this you need
a json class in your php code.

Here is to get you started: http://www.google.com/search?q=json+php+class

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



On Fri, Jan 9, 2009 at 1:58 AM, emmj...@gmail.com  wrote:
>
> How would I go about getting an array from a php script. As I
> understand it the data returned to $.post is only things that are
> echoed in the php file. I've tried using return $array; in php but it
> doesn't work.
>
> Any help would be greatly appreciated.
>


[jQuery] Re: jQuery-dependent TouchGraph Visualization (experiment)

2009-01-10 Thread jQuery Lover

Nice work. I should take some time and look through your code. Great job.

Here are some performance test (caching in jquery)
http://jquery-howto.blogspot.com/2008/12/caching-in-jquery.html

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



On Thu, Jan 8, 2009 at 11:36 PM, David Decraene
 wrote:
>
> Well, suprisingly there was an issue with drawing.
> The script made an overzealous use of the jquery function
> $element.offset();
> Storing the position as variable instead of accessing it by offset()
> led to a very notable increase in performance.
>
> See demo at http://jowl.ontologyonline.org/TouchGraph.html
>
>
>
> On 8 jan, 08:37, David Decraene  wrote:
>> The great thing of html of course is that you can use css, means you
>> can style it easily (demo has very basic styling, some rounded corners
>> in firefox).
>> Not sure how flexible styling in raphael is, I'm not familiar enough
>> with it.
>> Also don't think canvas or svg will be any faster, because the issue
>> is not with drawing the changes, but with calculating the position of
>> each node (=Javascript Math).
>>
>> On Jan 8, 2:27 am, Ricardo Tomasi  wrote:
>>
>> > using "NO" Canvas or SVG is not that great a feature is it? :)
>>
>> > Make that use raphael.js and it's all set!
>>
>> > On Jan 7, 5:13 pm, David Decraene  wrote:
>>
>> > > Thanks!
>>
>> > > It does need some computations that scale exponentially with the
>> > > amount of nodes shown...
>> > > but I think it seems to perform ok with a not too high amount of
>> > > nodes, for an implementation that only uses html elements. Who nows,
>> > > with future browsers (or a better algorithm :)) things might scale
>> > > better...
>>
>> > > Greetings
>> > > David
>>
>> > > On 7 jan, 19:00, Joe  wrote:
>>
>> > > > Very impressive!  Seems a bit sluggish at times in FF 3.0.5, but nice
>> > > > work!
>>
>> > > > Joe
>>
>> > > > On Jan 7, 5:12 am, David Decraene  wrote:
>>
>> > > > > I had some fun creating a pure HTML-DOM based Force-directed graph
>> > > > > layout, similar to a touchgraph (http://www.touchgraph.com/) view.
>>
>> > > > > Built with the help of jQuery (hereby again: wonderful library), no
>> > > > > canvas or SVG used (only DOM manipulations).
>>
>> > > > > You can see an experimental demo 
>> > > > > at:http://jowl.ontologyonline.org/TouchGraph.html.
>> > > > > and the blog 
>> > > > > post:http://ontologyonline.blogspot.com/2009/01/experimental-touchgraph-vi
>>
>> > > > > Room for lot's of improvement, but nevertheless quite happy with the
>> > > > > result already.
>>
>> > > > > David Decraenehttp://ontologyonline.org


[jQuery] Re: How to access a jQuery object instance?

2009-01-10 Thread jQuery Lover

You mean jquery properties or some element that you selected using jquery?

Just in case:
  $('.inputfield').val();
  $('a').href();

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



On Thu, Jan 8, 2009 at 9:06 PM, WoutervD  wrote:
>
> Hello there,
>
> I would like to know how i can access properties of a jQuery object
> instance.
> I have the following javascript: 
> http://paste.pocoo.org/show/U9Gsy68MKP9LvvAvqGI6/
>
> I would like to access the instance from my HTML file and pass value's
>
> 
>jObject.sValue = "a value :)";
> 
>
> How can I do this?
>
> The way jQuery is written confuses me a little (just started using it)
>


[jQuery] Re: How to access a jQuery object instance?

2009-01-10 Thread jQuery Lover

See:
http://docs.jquery.com/Attributes
http://docs.jquery.com/Manipulation


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



On Thu, Jan 8, 2009 at 9:06 PM, WoutervD  wrote:
>
> Hello there,
>
> I would like to know how i can access properties of a jQuery object
> instance.
> I have the following javascript: 
> http://paste.pocoo.org/show/U9Gsy68MKP9LvvAvqGI6/
>
> I would like to access the instance from my HTML file and pass value's
>
> 
>jObject.sValue = "a value :)";
> 
>
> How can I do this?
>
> The way jQuery is written confuses me a little (just started using it)
>


[jQuery] Re: create an array from file contents

2009-01-10 Thread jQuery Lover

Pass contents of your file as comma seperated values and then
expload(',') to an array.

Or parse serverside and return as a json.

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



On Thu, Jan 8, 2009 at 10:11 PM, Eyveneena  wrote:
>
> is there a way to create an array with a maximum number of entries
> automatically based on file contents with jQuery?
>


[jQuery] Re: Jquery Calling Servlet

2009-01-10 Thread jQuery Lover

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++;
>
>}
>//FileOutputStream fileOut = new FileOutputStream(fname
> +"ExtractBillID"+dateFormat+".xls");
>//wb.write(fileOut);
>//fileOut.close();
>String filename="ExtractBillID"+dateFormat+".xls";
>
> String contentType = 
> getServletContext().getMimeType(filename);
> System.out.println(contentType);
> BufferedInputStream in = null;
>try
>{
>
>  //in = new BufferedInputStream(getServletContext
> ().getResourceAsStream(fname+filename));
>response.setContentType(contentType);
>response.setHeader("Content-Disposition"," inline;
> filename=" + filename);
>
>ServletOutput

[jQuery] Re: jQuery - Binding to Ajax Event

2009-01-10 Thread jQuery Lover

var canI = true;
$(window).bind("ajaxComplete", function() {
  function1();
});
function function1(){
  if(canI){
// your function1() code here
  }
};

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



On Thu, Jan 8, 2009 at 5:02 PM, goodsanket  wrote:
>
> Hi all
>
> I am developing a portal and i am kind of stuck.
> I am using multiple AJAX calls to get data dynamically from a JSON
> file.
>
> In one page I am making 2 AJAX calls, and I want to call a function on
> call back from AJAX. I found out a way to do it, its something like
> this,
>
>
>$(window).bind("ajaxComplete", function() {
>function1();
>});
>
> Now problem here is, function1 is being called twice, on each AJAX
> callback. Is there any way so that i can call function1 only once.
>
> Thanks
>
>


[jQuery] Re: Does anyonw know a jQuery plug-in like Magic Zoom

2009-01-10 Thread jQuery Lover
I have a twitter account but I don't use it much (http://twitter.com/uzbekjon).

You might find my delicious bookmarks useful:
General web development: http://delicious.com/uzbekjon
jQuery related only: http://delicious.com/uzbekjon/jquery

Or of course my jquery tips and tricks blog: http://jquery-howto.blogspot.com



2009/1/10 Nguyễn Quốc Vinh :
> Wow! What a wonderful!
> Do you have twitter? I want to follow you!
> Or Yahoo ID or something like that?
>
>
> 2009/1/10 jQuery Lover 
>>
>> Not at all. There are some alternatives.
>>
>> A little different approach to zooming: http://valid.tjp.hu/tjpzoom/
>>
>> Read jQuery HowTo Resource  -  http://jquery-howto.blogspot.com
>>
>>
>>
>> 2009/1/9 Nguyễn Quốc Vinh :
>> > Wow! Fantastic! Thanks so much!
>> > This is really useful to me! Thanks again!
>> >
>
>
>
> --
> /
> * Người ta thưởng chỉ chú ý đến những kẻ lên như diều gặp gió! Nhưng hỡi ôi,
> chỉ có cát, bụi và lông hồng mới là những thứ lên nhanh nhất
> */
>


[jQuery] Re: jQuery Storage?

2009-01-10 Thread jQuery Lover

No, it's just the first place to look at :)

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



On Sat, Jan 10, 2009 at 3:13 PM, aldana  wrote:
>
>
> yes, I had a look. But couldn't find anything. Did I overlook something?
>


[jQuery] Re: Is there any plugin or script for making a tree view multi-select

2009-01-10 Thread jQuery Lover

You can bind your own click event to list items of tree-view and keep
track of selected items.

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



On Thu, Jan 8, 2009 at 6:52 PM, Pradeep Garikipati
 wrote:
> Hi Friends,
>
> I am using jQuery tree-view plugin for generating a tree from a list. It
> worked with-out problems, but now I have a requirement where I have to
> provide multi-select option in that tree.
>
> I researched for quite some time to figure out a way to include multi-select
> functionality in the tree, but failed to get one. But I am getting a feeling
> that there should be a solution for this and so I am here.
>
> Hope some-one will suggest me a way to get this functionality working.
>
> Thanks.
>
> Regards,
> -Pradeep
> www.intelligrape.com
>


[jQuery] Re: Need help with a Jquery toggle bug in my menu's

2009-01-10 Thread jQuery Lover

I suggest you take the other way. We shall not forget about beloved
CSS :) Try this:

$(document).ready(function(){
  $('#nav li')
.bind('mouseenter mouseleave', function(){
  $(this).toggleClass('menu-on');
});
});


In your CSS file add:
#nav div{
  display:none;
}
#nav .menu-on div{
  display:block;
}

Drawback is if the user is on  while page is being he will not see
the div at first. He will need to move his mouse out and then in. To
workaround this problem we can add an extra .hover() event listener to
li's ...

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



On Sat, Jan 10, 2009 at 9:12 PM, Ted  wrote:
>
> Sorry, very new to Jquery (and not that skilled at js to begin with).
>
> I think I follow what you are saying, but not having a good grasp of
> the jquery syntax, I'm not sure exactly how to properly execute.
> Here's what I came up with, but it's not working, so I know there's a
> problem somewhere, but am unable to fix:
>


[jQuery] Re: J QUERY - COM Objectscombination is possible or not !!!!

2009-01-10 Thread jQuery Lover
You can not call your com objects in jQuery. All you can do is request
them (it will not parse it in any way).

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



On Sun, Jan 11, 2009 at 9:58 AM, bharani kumar
 wrote:
>
> Hi every one,
>
>
> Am working on the PHP  COM Objects ,
>
> When i run the com object, it take around 50 sec for loading, so for get the
> better performance we have to go to jquery,
>
>
> But i dont know how to call the com objects file php,
>
> But i know if we want to call the php file we have to call like this
>
> $('#divid').load('example.php')
>
> Can any tell below is my COM OBJECT IN PHP CODE,
>
> Can you tell now , how can i use the jquery for the below snippet,
>
> Thanks
>
>  $word = new COM("word.application") or die ("Could not initialise MS Word
> object.");
> $word->Documents->Open(realpath("sample.doc"));
>
> // Extract content.
> $content = (string) $word->ActiveDocument->Content;
>
> echo $content;
>
> $word->ActiveDocument->Close(false);
>
> $word->Quit();
> $word = null;
> unset($word);
> ?>
>
>
>
> How to call the com Object in JQUERY ,
>
>
>
>
> --
> உங்கள் நண்பன்
> பரணி  குமார்
>
> Regards
> B.S.Bharanikumar
>
> POST YOUR OPINION
> http://bharanikumariyer.hyperphp.com/
> http://bharanikumariyerphp.site88.net/
>


[jQuery] Re: COM Objectscombination is possible or not !!!!

2009-01-10 Thread jQuery Lover
If you do $.load('yourfile.php') you will get the contents of your
word document to jquery.

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



On Sun, Jan 11, 2009 at 10:16 AM, bharani kumar
 wrote:
>
> But am using the php combination know , so it is not possible to call like
>
> load('phpfile name '); ?
>
>
> Sorry , i dont jquery,
>
>
>
> On Sun, Jan 11, 2009 at 10:38 AM, jQuery Lover 
> wrote:
>>
>> You can not call your com objects in jQuery. All you can do is request
>> them (it will not parse it in any way).
>>
>> Read jQuery HowTo Resource  -  http://jquery-howto.blogspot.com
>>
>>
>>
>> On Sun, Jan 11, 2009 at 9:58 AM, bharani kumar
>>  wrote:
>> >
>> > Hi every one,
>> >
>> >
>> > Am working on the PHP  COM Objects ,
>> >
>> > When i run the com object, it take around 50 sec for loading, so for get
>> > the
>> > better performance we have to go to jquery,
>> >
>> >
>> > But i dont know how to call the com objects file php,
>> >
>> > But i know if we want to call the php file we have to call like this
>> >
>> > $('#divid').load('example.php')
>> >
>> > Can any tell below is my COM OBJECT IN PHP CODE,
>> >
>> > Can you tell now , how can i use the jquery for the below snippet,
>> >
>> > Thanks
>> >
>> > > > $word = new COM("word.application") or die ("Could not initialise MS
>> > Word
>> > object.");
>> > $word->Documents->Open(realpath("sample.doc"));
>> >
>> > // Extract content.
>> > $content = (string) $word->ActiveDocument->Content;
>> >
>> > echo $content;
>> >
>> > $word->ActiveDocument->Close(false);
>> >
>> > $word->Quit();
>> > $word = null;
>> > unset($word);
>> > ?>
>> >
>> >
>> >
>> > How to call the com Object in JQUERY ,
>> >
>> >
>> >
>> >
>> > --
>> > உங்கள் நண்பன்
>> > பரணி  குமார்
>> >
>> > Regards
>> > B.S.Bharanikumar
>> >
>> > POST YOUR OPINION
>> > http://bharanikumariyer.hyperphp.com/
>> > http://bharanikumariyerphp.site88.net/
>> >
>
>
>
> --
> உங்கள் நண்பன்
> பரணி  குமார்
>
> Regards
> B.S.Bharanikumar
>
> POST YOUR OPINION
> http://bharanikumariyer.hyperphp.com/
> http://bharanikumariyerphp.site88.net/
>


[jQuery] Re: Best way to preload an image to obtain dimensions

2009-01-10 Thread jQuery Lover

It is creating a DOM element () and then binding a load event
listener to it.

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



On Sat, Jan 10, 2009 at 11:37 PM, nabrown78  wrote:
>
> More specifically, I don't understand these couple of lines:
>
> img = $('').load(function(){
>   var pld = $(this), imgHeight = pld.height();
>
> On Jan 9, 12:43 pm, Eric Garside  wrote:
>> Try this function out:
>>
>> $(function(){
>>var largeimg = $('#largeImg img');
>>$('.thumbs a').each(function(){
>>   var jQ = $(this),
>> path = jQ.attr('href'),
>> alt = jQ.attr('title') || '',
>> img = $('').load(function(){
>>var pld = $(this), imgHeight = pld.height();
>>jQ.click(function(){
>>   largeimg
>>  .css({
>> height: /* Do whatever you need to do here to
>> fix your padding. Image height stored in local variable "imgHeight" */
>>  })
>>  .attr({src: path, title: alt});
>> });
>> });
>>  img.attr('src', path);
>>});
>>
>> });
>>
>> It *should* preload your images, and set up the correct onclick events
>> to set the #largeImg img.src to the proper path
>>
>> - Hide quoted text -
>>
>> On Jan 8, 6:06 pm, nabrown78  wrote:
>>
>> > Hi All,
>> > I am building a simple little gallery where you click on a thumbnail,
>> > and a larger image displays on the same page. I was trying to adjust
>> > the padding around the large image using the new image's dimensions. I
>> > pieced together this image preloading code (see below), but I don't
>> > fully understand it (is it just loading the new image into the DOM to
>> > be able to access its dimensions?) and I don't know if it's the best
>> > way to go about it.
>>
>> > Many thanks for any advice,
>> > Nora Brown
>>
>> > $(document).ready(function(){
>>
>> > $(".thumbs a").click(function(){
>>
>> > var largePath = $(this).attr("href");
>> > var largeAlt = $(this).attr("title");
>>
>> > // Image preload process
>> > var imagePreloader = new Image();
>> > imagePreloader.src = largePath;
>> > imagePreloader.onload = function() {
>> > alert(imagePreloader.height);
>> > };
>>
>> > $("#largeImg img").attr({ src: largePath, alt: largeAlt });
>> > return false;
>> > })
>>
>> > });


[jQuery] Re: COM Objectscombination is possible or not !!!!

2009-01-10 Thread jQuery Lover
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



On Sun, Jan 11, 2009 at 10:35 AM, bharani kumar
 wrote:
> Refer few no of link
>
> PHP-JQUERY COMBINATION PLZ
>
> On Sun, Jan 11, 2009 at 11:01 AM, bharani kumar
>  wrote:
>>
>> So , it is not possible to increase the com object performance using
>> jquery, Am correct sir ?
>>
>>
>>
>> On Sun, Jan 11, 2009 at 10:51 AM, jQuery Lover 
>> wrote:
>>>
>>> If you do $.load('yourfile.php') you will get the contents of your
>>> word document to jquery.
>>>
>>> Read jQuery HowTo Resource  -  http://jquery-howto.blogspot.com
>>>
>>>
>>>
>>> On Sun, Jan 11, 2009 at 10:16 AM, bharani kumar
>>>  wrote:
>>> >
>>> > But am using the php combination know , so it is not possible to call
>>> > like
>>> >
>>> > load('phpfile name '); ?
>>> >
>>> >
>>> > Sorry , i dont jquery,
>>> >
>>> >
>>> >
>>> > On Sun, Jan 11, 2009 at 10:38 AM, jQuery Lover 
>>> > wrote:
>>> >>
>>> >> You can not call your com objects in jQuery. All you can do is request
>>> >> them (it will not parse it in any way).
>>> >>
>>> >> Read jQuery HowTo Resource  -  http://jquery-howto.blogspot.com
>>> >>
>>> >>
>>> >>
>>> >> On Sun, Jan 11, 2009 at 9:58 AM, bharani kumar
>>> >>  wrote:
>>> >> >
>>> >> > Hi every one,
>>> >> >
>>> >> >
>>> >> > Am working on the PHP  COM Objects ,
>>> >> >
>>> >> > When i run the com object, it take around 50 sec for loading, so for
>>> >> > get
>>> >> > the
>>> >> > better performance we have to go to jquery,
>>> >> >
>>> >> >
>>> >> > But i dont know how to call the com objects file php,
>>> >> >
>>> >> > But i know if we want to call the php file we have to call like this
>>> >> >
>>> >> > $('#divid').load('example.php')
>>> >> >
>>> >> > Can any tell below is my COM OBJECT IN PHP CODE,
>>> >> >
>>> >> > Can you tell now , how can i use the jquery for the below snippet,
>>> >> >
>>> >> > Thanks
>>> >> >
>>> >> > >> >> > $word = new COM("word.application") or die ("Could not initialise MS
>>> >> > Word
>>> >> > object.");
>>> >> > $word->Documents->Open(realpath("sample.doc"));
>>> >> >
>>> >> > // Extract content.
>>> >> > $content = (string) $word->ActiveDocument->Content;
>>> >> >
>>> >> > echo $content;
>>> >> >
>>> >> > $word->ActiveDocument->Close(false);
>>> >> >
>>> >> > $word->Quit();
>>> >> > $word = null;
>>> >> > unset($word);
>>> >> > ?>
>>> >> >
>>> >> >
>>> >> >
>>> >> > How to call the com Object in JQUERY ,
>>> >> >
>>> >> >
>>> >> >
>>> >> >
>>> >> > --
>>> >> > உங்கள் நண்பன்
>>> >> > பரணி  குமார்
>>> >> >
>>> >> > Regards
>>> >> > B.S.Bharanikumar
>>> >> >
>>> >> > POST YOUR OPINION
>>> >> > http://bharanikumariyer.hyperphp.com/
>>> >> > http://bharanikumariyerphp.site88.net/
>>> >> >
>>> >
>>> >
>>> >
>>> > --
>>> > உங்கள் நண்பன்
>>> > பரணி  குமார்
>>> >
>>> > Regards
>>> > B.S.Bharanikumar
>>> >
>>> > POST YOUR OPINION
>>> > http://bharanikumariyer.hyperphp.com/
>>> > http://bharanikumariyerphp.site88.net/
>>> >
>>
>>
>>
>> --
>> உங்கள் நண்பன்
>> பரணி  குமார்
>>
>> Regards
>> B.S.Bharanikumar
>>
>> POST YOUR OPINION
>> http://bharanikumariyer.hyperphp.com/
>> http://bharanikumariyerphp.site88.net/
>
>
>
> --
> உங்கள் நண்பன்
> பரணி  குமார்
>
> Regards
> B.S.Bharanikumar
>
> POST YOUR OPINION
> http://bharanikumariyer.hyperphp.com/
> http://bharanikumariyerphp.site88.net/
>


[jQuery] Re: [validate] Doesnt work with Struts2 generated forms

2009-01-10 Thread jQuery Lover

There is another way too. You can simply quote your class names like this:

"department.code":{required:true}

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



On Sat, Jan 10, 2009 at 7:10 PM, Jörn Zaefferer
 wrote:
> Absolutely! Documented here:
> http://docs.jquery.com/Plugins/Validation/Reference#Fields_with_complex_names_.28brackets.2C_dots.29
>
> Jörn
>
> On Sat, Jan 10, 2009 at 8:33 AM, Kashif  wrote:
>>
>> This is a very useful plugin that I use for all my projects.
>> Unfortunately, I cannot use it with any of my Java Struts2 projects
>> because I need to assign the name attributes of my input fields with
>> periods in them.
>> for example
>> 
>>
>> Validate rules for this dont work, underneath is an example.
>>
>>$("#setup-department-save")
>>.validate(
>>{
>>rules:
>>{
>>department.code:{required:true}
>>}
>>}
>>);
>>
>>
>> Is there some way I can still use this plugin?
>> Thanks
>>
>


[jQuery] Re: z-index issue

2009-01-10 Thread jQuery Lover

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: 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
>>
>>


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

2009-01-12 Thread jQuery Lover

Sorry, what do you mean?

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



On Sun, Jan 11, 2009 at 7:01 PM, bharani kumar
 wrote:
>
> So , need to increase the speed, i thing my english is very poor,
> On Sun, Jan 11, 2009 at 7:30 PM, bharani kumar
>  wrote:
>>
>> retrieves mail list, it will take around 40 sec for retrieve mail list, so
>> need to increase the
>>>


[jQuery] Re: How to grab the filename (src attribute) of an image?

2009-01-12 Thread jQuery Lover

I believe he/she is binding an event with javascript not jquery's event binding.

Webmaster you can refer to an element which was clicked with "this"
keyword. So to get your image source just use "this.src" property.

Example:



The same when applying with event listeners...

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



On Mon, Jan 12, 2009 at 6:05 PM, Mauricio (Maujor) Samy Silva
 wrote:
>
> $('img').click(function() {
> var fileName = $(this).attr('src');
> alert(fileName);
> });
>
> Maurício
>
> -Mensagem Original- De: 
> Para: "jQuery (English)" 
> Enviada em: segunda-feira, 12 de janeiro de 2009 10:59
> Assunto: [jQuery] How to grab the filename (src attribute) of an image?
>
>
>>
>> Hi all,
>> how do i grab the filename of an image?
>>
>> Situation now:
>> i use "normal" javascript when clicking on an image and just inserted
>> some jquery to post gamedata to update a gamepage with the help of the
>> taconite plugin (returns xml-data), so far so good.
>>
>> I just miss one item => i need the filename (src attribute of the
>> image) of the image on which was clicked, ut just can't figure out how
>> to grab it.
>>
>> Thanks in advance for your help.
>>
>>
>
>


[jQuery] Re: Correct me!

2009-01-12 Thread jQuery Lover

User this sintax:

(function ($) {
  // code goes here
  // Here "$" is a jQuery reference

})(jQuery)

More detailed description is here:
http://jquery-howto.blogspot.com/2008/12/what-heck-is-function-jquery.html

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



On Mon, Jan 12, 2009 at 12:51 PM, Bluesapphire  wrote:
>
> Hi!
> I have used following things in separate JS file so no conflict
> will be there between JQUERY and other JS frameworks.
>
> a-
> var dom = {};
> dom.query = jQuery.noConflict(true);
>
> b-
> var jQ = jQuery.noConflict();
>
> c-
> jQuery.noConflict();
>
>
> But when I used jQ or others, FireBug gives error.
>
> But  in usage of  $ , there is no problem and all works fine.
>
>
> Can someone solve my problem.
>
> Thanks in advance
>


[jQuery] Re: [treeview] Expand the trees on the image and no link

2009-01-12 Thread jQuery Lover

Did I understand you correctly. Your html code is like this:

 link

And you want to show tree content if user clicks on an image, but
follows the link on anchor click?

If so you should give you img's an "id" (or class, but id's are
faster) and do this:

$(document).ready(function(){
  // Assume you wrapped your code to some 
  $('#myTree img').click(function(){
// code to display your content
  });
});

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



On Mon, Jan 12, 2009 at 4:58 PM, cv  wrote:
>
> Hello,
>
> I would like to know how to:
>
> - Permetre the conduct of a tree by clicking on the image (or file
> folder with a +) but when and clicking on the hyperlink ( href="index.php"> blabla  ) the tree does not take place.
>
> Thank you for your help.
>


[jQuery] Re: Form validation, not typical name of input.

2009-01-12 Thread jQuery Lover

You might find this useful (just as a note for the future)
http://docs.jquery.com/Frequently_Asked_Questions#How_do_I_select_an_element_that_has_weird_characters_in_its_ID.3F

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



On Mon, Jan 12, 2009 at 6:40 PM, grassoalvaro  wrote:
>
> Nevermind, it's working, problem was in other place.
>
> On 12 Sty, 14:19, grassoalvaro  wrote:
>> Hi,
>>
>> i have problem with validation for my form. For example:
>>
>> 
>> 
>> 
>>
>> $('#valid').validation({
>> rules: {
>> 'data[Order][login]': 'required',
>>
>> }
>> });
>>
>> The validation method above dosn't work. Where is the problem? With
>> not typical name of input?


[jQuery] Re: Posting Repeating Ajax Requests

2009-01-12 Thread jQuery Lover

There is no option in jquery for auto requests in a set period of time.

The javascript native setInterval() is a better option don't you think ?!

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



On Mon, Jan 12, 2009 at 4:50 PM, Adeel Shahid  wrote:
>
> Is there some like quering for repeating Ajax requests.
>
> like i want to query a url via ajax every 2 seconds is there an option
> natively in jquery for that
>
> currently I am using setInterval('func()', 2000)
>
> i just wanted to know if there is anything natively available.
>


[jQuery] Re: function text() in jquery

2009-01-12 Thread jQuery Lover

This is quite tricky. I could not figure out how to get the text
(probably I should go home:) ).

If there is no other solution here is a dirty trick:

var tmp = $('#testText select');
//remove the select box
$('#testText select').remove();
// get the text within the div
var txt = $('#testText').text();
// put back the selectbox
$('#testText').append(tmp);


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



On Mon, Jan 12, 2009 at 7:01 PM, kazuar  wrote:
>
>
> anyone?
>
>
> kazuar wrote:
>>
>> hello, Im kinda new in jquery so maybe its a begginer question.
>> I have a page with a div containing some text and a combobox.
>> something like that
>>
>> 
>>  hello this is text and this is combobox
>>  12> value='3'>3
>>
>> I wrote a function which return the text from the div.
>>
>> alert($('#testText').text());
>>
>> My problem is  that the function also return the text inside the combobox.
>> is there a way to filter out the combobox text?
>>
>> the only workaround I can think of is to wrap my text in another div and
>> call its text.
>> This workaround will be a bit complicated for me because the text on my
>> page is dynamic and it can come after the input field or before the input
>> field so I just want to get the text inside the div without the input
>> fields text... (This only happens with combobox).
>>
>> tnx,
>> Kazuar
>>
>>
>
> --
> View this message in context: 
> http://www.nabble.com/function-text%28%29-in-jquery-tp21410667s27240p21414973.html
> Sent from the jQuery General Discussion mailing list archive at Nabble.com.
>
>


[jQuery] Re: load script regarding to value of textfield

2009-01-12 Thread jQuery Lover

Try this:

$('#searchButton').click(function(){
  var url = 'http://gdata.youtube.com/feeds/api/videos?q=' +
$('#searchText').val() +
'&alt=json-in-script&callback=showMyVideos&max-results=7&format=5">';

  // ajax functions to call $.ajax, $.load, $.get, $.post
});

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



On Mon, Jan 12, 2009 at 1:49 PM, dirk w  wrote:
>
> hello community,
> i have some kind of a beginner question and i really would appreciate
> if you could help me with that.
>
> when someone types a value into the textfield and clicks on "search"
> or enter than the javascript line should be called regarding to the
> entered value. this should happen without reloading the complete page.
>
> # FORM
>
> value="" size="30" maxlength="30"/>
> class="button buttonText" value="Search" />
>
>
> # Script to call
> http://gdata.youtube.com/feeds/api/
> videos?q=' + searchTerm + '&alt=json-in-
> script&callback=showMyVideos&max-results=7&format=5">
>
> see the "SearchTerm" in the js line, it should be replaced with the
> value of the textfield.
>
> thank you very much in advance!
> dirk
>


[jQuery] Re: Dialog - Can't Copy or Select Text

2009-01-12 Thread jQuery Lover

You can set resizable option to true/false (read docs
http://docs.jquery.com/UI/Dialog/dialog#options)

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



On Mon, Jan 12, 2009 at 1:41 PM, sirmoreno  wrote:
>
> Hi,
> I Set up a JQuery Dialog in my site.
> But in FF the user can't select or copy text from the Dialog.
> And in IE Ctrl + C doesn't work after selecting a text.
> Another Question: how to disable the resizing of the Dialog.
> Thanks
> Rafael.
>


[jQuery] Re: select() not working

2009-01-14 Thread jQuery Lover

*type: $jQ("#country_id").val(my_value);

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



On Wed, Jan 14, 2009 at 4:24 PM, Beres Botond  wrote:
>
>
> It seems you don't know what .select() should be used for. It has
> absolutely nothing to do with selecting and option of a select box.
> Read the docs carefully.
> http://docs.jquery.com/Events/select
>
> Try this instead (assuming that #country_id is a select box):
>
> $jQ("#country_id]").value(my_value)
>
>
> ocptime wrote:
>> Hello There,
>>
>> I want to dynamically add a select option to an existing select
>> dropdown when a new country is added. This i was able to do using:
>>
>>   $jQ("#country_id option[value='new']").before(""+ name + "");
>>
>> After that i want to get selected the just now appended country option
>> and must change from the "--New Country--" . For that i used the select
>> () as below:
>>
>> $jQ("#country_id option[value='" + value + "']").select();
>>
>> This seems to be not working.
>>
>> Even if i put a static value this is not changing:
>>
>>  $jQ("#country_id option[value='144']").select();
>>
>> Any pointers ?
>>
>> Thanks in Advance,
>>
>> Regards
>> ocptime


[jQuery] Re: syntax selector problem

2009-01-14 Thread jQuery Lover

Alternatively

$("div").click(function(){
  // all child p's
  $("p", this).show();

  // first child p
  $("p:first", this).show();

  // another way to select first child p
  $("p:eq(0)", this).show();

 // etc. Other ways to select first child... :)
});

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



On Wed, Jan 14, 2009 at 4:40 PM, naden  wrote:
>
> If there is only one  do $(this).children('p').show();
> if you just want to show the rirst do  $(this).children
> ('p:first').show();
>
> On 14 Jan., 02:10, Matt caron  wrote:
>> If I have:
>>
>> $("div").click(function(){
>>
>>  //How do I do the following
>>  $(this + " > p").show();
>>
>> });
>>
>> I want to select the child p of the div I clicked, and I know there's
>> proper syntax to it, but I am completely brainfarting on it.
>>
>> Thanks!
>> Matt


[jQuery] Re: select() not working

2009-01-14 Thread jQuery Lover

OFFTOP:

Ups, I meant *typo not *type (made a typo myself :) )

Sorry.

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



On Wed, Jan 14, 2009 at 4:44 PM, Beres Botond  wrote:
>
> Ah yeah, sorry I didn't pay enough attention there :p


[jQuery] Re: jQuery selector question - Having ":" in attribute name

2009-01-14 Thread jQuery Lover

You can not have special character in attribute names. (it's not valid markup)

Documentation is saying that your should escape VALUE bit if it
contains special characters.

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



On Wed, Jan 14, 2009 at 2:11 PM, naden  wrote:
>
> I'm using jQuery 1.2.6 and having an  element with the attribute
> ajax:id="46"
>
> Test Link
>
> According to http://docs.jquery.com/Selectors/attributeEquals#attributevalue
> you have to escape ":" with double backslash like I did.
>
> alert( $( "a[ajax\\:id='46']" ).attr( 'href' ) );
>
> I tried a lot, but it's not working?
>
> Any hint would be appreciated!
>
> thanks
>


[jQuery] Re: Wiki Error trying to access Tabs, Datepicker on docs.jquery.com

2009-01-14 Thread jQuery Lover

I'm not getting this error. I remember a post that says that the doc's
are hosted on different servers. So I guess I'm getting mine from not
crushed server.

I was quite interested of getting offline/downloadable version of jquery docs.

Michael, maybe you find jquery cheatsheets useful:
http://www.google.com/search?q=jquery+cheatsheet

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



On Wed, Jan 14, 2009 at 2:50 PM, michael.hasenst...@googlemail.com
 wrote:
>
> Subject says it. When I try to access the online docs all I get is the
> message below. Is there an alternative location, especially something
> downloadable? I'd be grateful for such a link.
>
> Michael
>
>
> MediaWiki internal error.
>
> Original exception: exception 'DBQueryError' with message 'A database
> error has occurred
> Query: BEGIN
> Function: Database::begin
> Error: 2006 MySQL server has gone away (localhost)
> ' in /home/jquery/en/docs/includes/Database.php:694
>


[jQuery] Re: Cluetip ajax call returns gibberish (utf-8, greek)

2009-01-14 Thread jQuery Lover

Did you change anything, because it works and shows nicely on my browser.

PS. I would suggest not printing all products on the same page (you've
got at lease 100 items there).

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



On Wed, Jan 14, 2009 at 1:31 PM, ion  wrote:
>
> Hi,
> I'm using cluetip in the following way:
>
> $('#content div.product_photo a.load-local').cluetip({
>  cursor:'pointer',
>  cluetipClass:'rounded',
>  dropShadow:false,
>  width:'260px',
>  hoverIntent: {
>   sensitivity:  1,
>   interval: 100,
>   timeout:  200
>   },
>  fx: {
>  open:   'fadeIn',
>   openSpeed:  ''
> }
> });
>
> I have several links that when are hovered cluetip is activated and
> makes an ajax get call to
> a php file. The call is like: file.php?var1=dfs&var2=sfd&var3=238479
>
> The problem is that the result is gibberish!!
> All files are utf-8 (saved like that and the meta content-type)
> Database is in the utf-general format.
> What is even weirdest is that the result in Safari works fine however
> in firefox & explorer it does not.
>
> Also, if you view the page source the characters look fine but when
> the call is viewed through firebug
> it is full of gibberish.
>
> You can test it here: http://www.deliverde.gr/shop
> Choose a product with greek name and hover over the image. The result
> should be the above.
> Please any help would be appreciated
>
> ion
>


[jQuery] Re: jQuery selector question - Having ":" in attribute name

2009-01-14 Thread jQuery Lover

Slightly :)

You can not have special character in your html ATTRIBUTES.

You should rename "ajax:id" to something else. Ex: ajax_id or ajaxId.

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



On Wed, Jan 14, 2009 at 5:16 PM, naden  wrote:
>
> Your right. The docs said:
>
> "Note: if you wish to use any of the meta-characters described above
> as a literal part of a name, you must escape the character with two
> backslashes (\). For example:
>
> #foo\\:bar
> #foo\\[bar\\]
> #foo\\.bar"
>
> and so I did. I used \\: to escape the ":"
>
> or I'm gettin you wrong?


[jQuery] Re: Selector problem with $( "a[ajax\\:id='46']" )

2009-01-14 Thread jQuery Lover

Duplicate.

See: 
http://groups.google.com/group/jquery-en/browse_thread/thread/e47ce13098a16ef/606e652153c624a2#606e652153c624a2

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



On Wed, Jan 14, 2009 at 3:32 PM, naden  wrote:
>
> I'm using jQuery 1.2.6 and having an  element with the attribute
> ajax:id="46"
>
> Test Link
>
> According to http://docs.jquery.com/Selectors/attributeEquals#attributevalue
> you have to escape ":" with double backslash like:
>
> alert( $( "a[ajax\\:id='46']" ).attr( 'href' ) );
>
> I tried a lot, but it's not working?
>
> Any hint would be appreciated!
>
> thanks
>


[jQuery] Re: Superfish - problem with supersubs plugin

2009-01-14 Thread jQuery Lover

I suggest you use Stu's CSS only dropdown menu:
http://www.cssplay.co.uk/menus/final_drop.html

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



On Wed, Jan 14, 2009 at 3:11 PM, simon  wrote:
>
> Hi all,
>
> When I have a lot of nodes in the superfish menu it loads very slow
> (even from the harddrive). Anyone having the same problem? To me it
> seems that it is the first each() loop in the supersubs.js file which
> executes slow.
>
> Any tips on maybe another plugin I can use, since I dont want to lose
> the functionality?
>
> The code I'm using is from the following site:
> http://users.tpg.com.au/j_birch/plugins/superfish/
>
> Thanks,
> Simon
>


[jQuery] Re: createElement, get its value

2009-01-14 Thread jQuery Lover

OFFTTOP:

The live() function will reduce so much questions on this mailing list :)


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



On Wed, Jan 14, 2009 at 6:52 AM, Kean  wrote:
>
> using jQuery 1.3
>
> This will most probably work.
>
> $('#grabMe').live('click', function() {
>alert($(this).html());
> });
>
> On Jan 13, 5:41 pm, Kean  wrote:
>> Hmmm, you must understand event listener(bind) does not work like CSS
>> where DOM nodes added in the future cannot be listened right now.
>> That's where event delegation comes it.
>>
>> http://www.learningjquery.com/2008/03/working-with-events-part-1
>>
>> On Jan 13, 4:58 pm, sam  wrote:
>>
>> > $('#grabMe') will search the document for an element with ID "grabMe"
>>
>> > Have you added grabMe to the document?
>>
>> > On Jan 13, 6:00 pm, CrustyDOD  wrote:
>>
>> > > Hey!
>>
>> > > I've created one div with FlyDOM plugin which uses createElement
>> > > function to add stuff to DOM. Now the problem is that once i add the
>> > > element, i cannot access it in anyway.
>>
>> > > For example with FlyDOM plugin i create:
>> > > It works!
>>
>> > > After the JS for creating element i have this:
>> > > $('#grabMe').click(function() {
>> > > alert($(this).html());
>>
>> > > });
>>
>> > > It doesn't work.
>>
>> > > There are no errors shown in Firebug, the element is in DOM, id is
>> > > set. It's all there.
>>
>> > > Am i missing something here? I'm confused :S
>>
>> > > Using jquery 1.2.6


[jQuery] Re: Input Element Focus Dancing

2009-01-14 Thread jQuery Lover

You missed the [0]. The focus code must be:

$("input[tabindex=1]")[0].focus();


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



On Wed, Jan 14, 2009 at 1:10 PM, stephen  wrote:
>
> Hi,
>
> I have a text input that when it receives the text "RESET" and a tab,
> the form should reset and the focus should go to the first text input
> element. But something weird happens, instead the focus goes to the
> first element (I have seen this by placing an alert in the right
> place) and then ends up on the second text input. I have no idea why,
> as the last 'command' is to focus on the first input element. Any
> ideas. A bit of code:
>
> $("input#serial_number").focus(function () {
>  var serial_number = "";
>
>  // Captures the tab event
>  $("input#serial_number").keypress(function(event){
>
>  // Captures the tab event and so counts as a save
>  if(event.which == 0){
>  // Get the current value
>  serial_number = $("input#serial_number").val();
>
>  // Check to see if the user wants to reset the form
>  if(serial_number == "RESET"){
>// Reset the form.
>$("form#" + form_id)[0].reset();
>
>$("input[tabindex=1]").focus();
>  }
>  } // end if
>  });
> });
>
> I have also tried doing this using the blur event, but that did not
> work either. Also, a reset button is not desirable.
>
> Thanks
> Stephen


[jQuery] Re: Display Loading Image While Ajax Content Loads

2009-01-14 Thread jQuery Lover

Unfortunately it will not. jQuery will know that it is getting some
data and that is all. It does not know that it's html, xml or plain
text. Image loading is done by browser when you insert the markup into
the DOM. So the workaround would be to load your content then add it
to the DOM, bind count how many images you have and then add a .load()
event to every image that calls some function which checks if it's the
last image that loaded and then only remove the animation and show the
content.

Damn, it was a long sentence :)


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



On Wed, Jan 14, 2009 at 6:40 PM, Beres Botond  wrote:
>
> Maybe you'll have more luck with this.
>
> // display loading animation here
>
> $("#ajax_content").load('/sourcefiles/example.html', {}, function() {
>   // hide loading animation here
>
> });
>
> However I'm still not sure if it will actually wait till images are
> downloaded.
>
> On Jan 14, 7:14 am, jinscoe  wrote:
>> Hello - I'm sorry if this posts twiceits been about 30 minutes or
>> so since I last attempted and I still haven't seen my discussion pop
>> up.
>>
>> I would guess this is a fairly easy task and I'm just missing the
>> boat, because you see loading images everywhere with ajax loading.
>>
>> Here is my situation. I have a webpage that is set up a lot like a
>> basic slide show - forward and back controls at the bottom a header at
>> the top and an ajax loading window in the middle. I am using this
>> function to make the ajax call:
>>
>> $.get('/sourcefiles/example.html', function(innerHtml){
>> $('#ajax_content').html(innerHtml);
>> });
>>
>> So right now I'm just getting the html and popping it into my
>> ajax_content div. I would like to make it so that it waits until the
>> entire content of the html (images and all) loads before displaying
>> anything. Currently it seems to wait for the just the html (text) to
>> load and then continues to load the images on screen.
>>
>> I would like to just make a class called ".loading" or something, put
>> a loading background image on it and strip that off once everything is
>> loaded.
>>
>> Hopefully I have been clear enough. Let me know if anything needs more
>> explaining and thanks in advance for any help!


[jQuery] Re: Cluetip ajax call returns gibberish (utf-8, greek)

2009-01-14 Thread jQuery Lover

You can pack your javascript code:
http://jquery-howto.blogspot.com/2009/01/minimize-and-pack-your-javascript-code.html

You might find this jquery and javascript performance posts useful:
http://jquery-howto.blogspot.com/search/label/performance



On Wed, Jan 14, 2009 at 6:45 PM, ion  wrote:
>
> I have not changed anything but strangely enough sometimes it works on
> firefox and sometimes it does not 
> Could you check on explorer as well.
> About the products being on the same page, that's what the client
> asked for ... it takes a long time
> While on the subject, I'm using qute a few external jquery related
> javascript files, do you know how I
> could optimize loading time ... also I have tried using the $
> (function) of jquery as detailed as possible when
> reffering to an element. For example as you can see the cluetip is not
> called as a.load-local but as '#content div.product_photo a.load-
> local. I read somewhere that this increases performace as jquery has
> to search less.
> Are there any other tips concerning performance.
> Thanks a million:)
>
> On Jan 14, 2:43 pm, "jQuery Lover"  wrote:
>> Did you change anything, because it works and shows nicely on my browser.
>>
>> PS. I would suggest not printing all products on the same page (you've
>> got at lease 100 items there).
>>
>> -
>> Read jQuery HowTo Resource  -  http://jquery-howto.blogspot.com
>>
>> On Wed, Jan 14, 2009 at 1:31 PM, ion  wrote:
>>
>> > Hi,
>> > I'm using cluetip in the following way:
>>
>> > $('#content div.product_photo a.load-local').cluetip({
>> >  cursor:'pointer',
>> >  cluetipClass:'rounded',
>> >  dropShadow:false,
>> >  width:'260px',
>> >  hoverIntent: {
>> >   sensitivity:  1,
>> >   interval: 100,
>> >   timeout:  200
>> >   },
>> >  fx: {
>> >  open:   'fadeIn',
>> >   openSpeed:  ''
>> > }
>> > });
>>
>> > I have several links that when are hovered cluetip is activated and
>> > makes an ajax get call to
>> > a php file. The call is like: file.php?var1=dfs&var2=sfd&var3=238479
>>
>> > The problem is that the result is gibberish!!
>> > All files are utf-8 (saved like that and the meta content-type)
>> > Database is in the utf-general format.
>> > What is even weirdest is that the result in Safari works fine however
>> > in firefox & explorer it does not.
>>
>> > Also, if you view the page source the characters look fine but when
>> > the call is viewed through firebug
>> > it is full of gibberish.
>>
>> > You can test it here:http://www.deliverde.gr/shop
>> > Choose a product with greek name and hover over the image. The result
>> > should be the above.
>> > Please any help would be appreciated
>>
>> > ion


[jQuery] Re: keep session alive

2009-01-14 Thread jQuery Lover

You could also use jquery ui tabs for your form sections
(http://docs.jquery.com/UI/Tabs).

Just add two buttons "proceed" and "previous" to the bottom of each
tab window and you have nice looking form :)


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



On Wed, Jan 14, 2009 at 7:13 PM, Beres Botond  wrote:
>
> I don't see what this has to do with jQuery or Javascript in general.
> Maybe give us some more details.
>
>
> On Jan 14, 3:33 pm, hjorth  wrote:
>> hi
>>
>> i got a big problem
>>
>> i need to take a session from one page and keep it alive on another
>> page where i have a long form.
>>
>> is this possible?


[jQuery] Re: wildcard match question

2009-01-14 Thread jQuery Lover

Duplicate: 
http://groups.google.com/group/jquery-en/browse_thread/thread/a7eb506135169136/b69c5734587c995e#b69c5734587c995e


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



On Wed, Jan 14, 2009 at 8:30 AM, Davis  wrote:
>
> i want to "grep" a pattern of DIV id with x_div_ wildcard
>
> ev_enquiry = $('d...@id^=x_div_]');
> ev_enquiry.each( function(i) {
> altert(this.i);
>
> how can i pass each of DIV id to alert()? as this.i not work..
>
> thanks/Davis.
>


[jQuery] Re: jQuery 1.3 Released

2009-01-14 Thread jQuery Lover

Super !!!


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



On Wed, Jan 14, 2009 at 7:45 PM, John Resig  wrote:
>
> Hey Everyone -
>
> jQuery 1.3 is out! Full details here:
> http://blog.jquery.com/2009/01/14/jquery-13-and-the-jquery-foundation/
>
> Happy 3rd Birthday, jQuery!
>
> --John
>


[jQuery] Re: IE Problem with (function($)

2009-01-15 Thread jQuery Lover

Well, it says jQuery is undefined. Have you put your jquery.js file
before colorpicker.js ?


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



On Thu, Jan 15, 2009 at 2:27 PM, Sagar Arya  wrote:
> Hello,
>It doesn't seem to work even after adding the braces. It works
> fine in mozzila but the same syntax error in IE. ( IE suck more ! )... I
> have attached the screen shots..
> Cheers !
> Aryan
>
> On Thu, Jan 15, 2009 at 10:44 AM, James Van Dyke  wrote:
>>
>> The initial (function($) { was never closed.
>>
>> Here's how I formatted it so everything lines up:
>>
>> (function($){
>>var EYE = window.EYE = (function() {
>>var _registered = {
>>init: []
>>};
>>return {
>>init: function() {
>>$.each(_registered.init, function(nr, fn) {
>>fn.call();
>>});
>>},
>>extend: function(prop) {
>>for (var i in prop) {
>>if (prop[i] != undefined) {
>>this[i] = prop[i];
>>}
>>}
>>},
>>register: function(fn, type) {
>>if (!_registered[type]) {
>>_registered[type] = [];
>>}
>>_registered[type].push(fn);
>>}
>>};
>>})();
>>
>>$(EYE.init);
>> })(jQuery);
>>
>>
>> I think that's about the most obfuscated thing I've seen this week.  I
>> hope you're doing something cool.
>>
>> Let us know if that helps.
>>
>>
>>
>> On Jan 14, 11:57 pm, "Sagar Arya"  wrote:
>> > Hello,  I tried changing the braces.. It seems they were
>> > proper...
>> > Here i am attaching all the files... Can anyone help me out pls... its
>> > perfectly running in mozilla, chrome.. but not in IE.. :(
>> >
>> > Cheers !
>> > Sagar
>> >
>> > On Wed, Jan 14, 2009 at 12:08 PM, Sagar Arya 
>> > wrote:
>> > > hey thanks so much.. :-)
>> >
>> > > Cheers !
>> > > Aryan
>> >
>> > > On Wed, Jan 14, 2009 at 10:26 AM, Karl Swedberg
>> > > wrote:
>> >
>> > >> good eye, Ricardo! thanks for the back up. :-)
>> >
>> > >> --Karl
>> >
>> > >> 
>> > >> Karl Swedberg
>> > >>www.englishrules.com
>> > >>www.learningjquery.com
>> >
>> > >>   On Jan 13, 2009, at 5:54 PM, Ricardo Tomasi wrote:
>> >
>> > >> You're missing a parenthesis when closing the anonymous function:
>> >
>> > >> }(); should be })();
>> >
>> > >> And I'm guessing '$' is there for jQuery, so that should actually be
>> >
>> > >> })(jQuery);
>> >
>> > >> - ricardo
>> >
>> > >> On Jan 13, 3:56 pm, "Sagar Arya"  wrote:
>> >
>> > >> may be i should check with the other files and let you know... thanks
>> > >> for
>> >
>> > >> the information..
>> >
>> > >> Cheers !
>> >
>> > >> Aryan
>> >
>> > >> On Tue, Jan 13, 2009 at 7:06 PM, Karl Swedberg > > >> >wrote:
>> >
>> > >>  I'm not seeing anything obvious. Taking a stab in the dark here ...
>> > >> I've
>> >
>> > >>  received a similar error in the past when a reference to one of my
>> >
>> > >>  JavaScript files was resulting in a 404. The browser would try to
>> > >> parse
>> > >> the
>> >
>> > >>  file as JavaScript, but of course it would be met with a syntax
>> > >> error on
>> >
>> > >>  line 1.  Is it possible that the problem is not with this file, but
>> > >> with
>> >
>> > >>  another one that you're trying to include? Just a guess.
>> >
>> > >>  --Karl
>> >
>> > >>  
>> >
>> > >>  Karl Swedberg
>> >
>> > >>  www.englishrules.com
>> >
>> > >>  www.learningjquery.com
>> >
>> > >>  On Jan 13, 2009, at 5:35 AM, Aryan wrote:
>> >
>> > >>  I have a problem with Internet Explorer ( all versions ) . The
>> >
>> > >>  following is my JQuery Code , which executes perfectly in mozilla
>> > >> and
>> >
>> > >>  chrome.. But it doesn't work in Internet Explorer.
>> >
>> > >>  It says : Syntax error ( line 1 )... Can anyone help me out here..
>> >
>> > >>  Thanks for your time in reading this.
>> >
>> > >>  (function($){
>> >
>> > >>  var EYE = window.EYE = function() {
>> >
>> > >>   var _registered = {
>> >
>> > >>   init: []
>> >
>> > >>   };
>> >
>> > >>   return {
>> >
>> > >>   init: function() {
>> >
>> > >>$.each(_registered.init, function(nr, fn){
>> >
>> > >>fn.call();
>> >
>> > >>});
>> >
>> > >>   },
>> >
>> > >>   extend: function(prop) {
>> >
>> > >>for (var i in prop) {
>> >
>> > >>if (prop[i] != undefined) {
>> >
>> > >> this[i] = prop[i];
>> >
>> > >>}
>> >
>> > >>}
>> >
>> > >>   },
>> >
>> > >>   register: function(fn, type) {
>> >
>> > >>if (!_registered[type]) {
>> >
>> > >>_r

[jQuery] Re: $("area") not working in IE (sorry if this is a repost)

2009-01-15 Thread jQuery Lover

Did you solve the problem?

My FF and IE show the same border and act the same way (except FF has
fade in/out effect).

I'm using IE7.


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



On Thu, Jan 15, 2009 at 10:44 AM, Chrisw  wrote:
>
> Let me try to clear this up in FF when you hover over a state (an
> "area" element) one (or more) of the images below should get a border
> around them, however, in IE nothing happens.. and I put an alert box
> in to see if anything was going on when you hover a state but  in IE
> the alert box never showed, and in FF the alert did show up.
>
> -c
>
> On Jan 14, 9:36 pm, Chrisw  wrote:
>> Sorry about all the alert boxes they should be gone now, also thank
>> you for the shorter code I was going to make the code shorter once I
>> got this error worked out and you just saved me sometime ;) ... but I
>> still have the same issue I cannot get $("area").hover(or mouseover)
>> to work in IE.
>>
>> On Jan 14, 9:00 pm, James Van Dyke  wrote:
>>
>> > Ok... that's a hard page to get away from with all those alert boxes.
>> > I know... no Firebug in IE.  Poo.
>>
>> > I believe that "class" is not what IE calls that attribute.  For
>> > instance, element.class will return nothing.  element.className is the
>> > correct property.  Try that.
>>
>> > Plus, you could shorten your code and make it a bit more readable:
>>
>> > $("area").mouseover( function(){
>> > $("#" . $(this).attr("class")).addClass('selected');}.mouseout( 
>> > function() {
>>
>> > $("#" . $(this).attr("class")).removeClass('selected');
>>
>> > };
>>
>> > Let me know how that works out.
>>
>> > On Jan 14, 6:30 pm, Chrisw  wrote:
>>
>> > > sorry if this is a repost but I didn't see it in the group and I
>> > > didn't get a copy in my email. I am working with an image map and i am
>> > > using the maphilight plugin and I want to add a border to an image
>> > > below the image map  when a user hovers over an area (based on the
>> > > iamges ID and the area's class)(see code below) I got it to work in FF
>> > > but I cannot get it to work in IE. Any help?
>>
>> > > URL:http://oregonstate.edu/admissions/firstyear/recruitmap/map/
>>
>> > > Code:
>> > > $("area").hover(function(){
>> > > var stateClass;
>> > > stateClass = $(this).attr("class");
>> > > var stateClassQuery;
>> > > stateClassQuery = "#"+stateClass;
>> > > alert(stateClassQuery);//for testing
>> > > $(stateClassQuery).addClass('selected');
>> > > //mouse out
>> > > },
>> > > function(){
>> > > var stateClass;
>> > > stateClass = $(this).attr("class");
>> > > var stateClassQuery;
>> > > stateClassQuery = "#"+stateClass;
>> > > 
>> > > $(stateClassQuery).removeClass('selected');
>> > > }


[jQuery] Re: getJSON - how to retrieve plain text?

2009-01-15 Thread jQuery Lover

Documentation quote:

> As of jQuery 1.2, you can load JSON data located on another domain
> if you specify a JSONP callback, which can be done like so: 
> "myurl?callback=?".
>jQuery automatically replaces the ? with the correct method name to call, 
>calling your specified callback.

About JSONP: http://bob.pythonmac.org/archives/2005/12/05/remote-json-jsonp/


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



On Thu, Jan 15, 2009 at 10:30 AM, James Van Dyke  wrote:
>
> It's almost certainly giving you an error about cross-domain XHR
> requests.  Simply, you can't call URL's that start with "http://"; or
> else it will throw an error.
>
> Someone else may know how to get around that, but if you're referring
> to your own host, just use a relative path.
>
> To debug the issue, you may just want to wrap the getJSON() call
> inside a try block and catch any errors.  Then, you can just use an
> alert box to read the message.  If the message is too long, use jQuery
> to insert it inside an existing visible element.
>
> Good luck.
>
>
> On Jan 14, 7:08 pm, MorningZ  wrote:
>> "So i want to see what the plaintext is that's returned in the success
>> callback"
>>
>> Use Fiddler (http://www.fiddlertool.com) and it will show you exactly
>> what IE is seeing when it makes the AJAX request and gets a result
>> back
>>
>> On Jan 14, 6:51 pm, Rene Veerman  wrote:
>>
>> > I have a getJSON call that works fine in FF, but bugs in IE.
>>
>> > I get no data. :(
>>
>> > So i want to see what the plaintext is that's returned in the success
>> > callback..
>>
>> > Using the new 1.3 jQuery, btw..
>>
>> > code:
>>
>> > var rc = $('select#regions_countries')[0];
>> > var rr = $('select#regions_regions')[0];
>> > var url =
>> > 'http://www.myhost.com/members/ajax_fetch_regions_for_countries.php';
>>
>> > var countries = [];
>> > for (var i=0; i> > if (rc.options[i].selected) {
>> > countries[countries.length] = rc.options[i].text;
>> > }
>> > };
>>
>> > $.getJSON (url, {countries:countries.join('|-|')}, function (data, ts) 
>> > {
>> > var regions = data.regions.split('|-|').sort();
>>
>> > var html = '';
>> > for (var i=0; i> > html+='> > value="'+regions[i].replace(/\s\(.*\)/,'')+'">'+regions[i]+'';
>> > }
>> > rr.innerHTML = html;
>>
>> > });
>>
>>


[jQuery] Re: IE Problem with (function($)

2009-01-15 Thread jQuery Lover

Is it possible to have your page published somewhere?


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



On Thu, Jan 15, 2009 at 2:44 PM, Sagar Arya  wrote:
> Hello,
>  Yes I included the jQuery file before the colorpicker.js file. And
> it works fine in Mozilla and chrome.. but it doesn't turn up in IE.
> Cheers !
> Sagar
>
> On Thu, Jan 15, 2009 at 3:03 PM, jQuery Lover  wrote:
>>
>> Well, it says jQuery is undefined. Have you put your jquery.js file
>> before colorpicker.js ?
>>
>> 
>> Read jQuery HowTo Resource  -  http://jquery-howto.blogspot.com
>>
>>
>>
>> On Thu, Jan 15, 2009 at 2:27 PM, Sagar Arya 
>> wrote:
>> > Hello,
>> >It doesn't seem to work even after adding the braces. It
>> > works
>> > fine in mozzila but the same syntax error in IE. ( IE suck more ! )... I
>> > have attached the screen shots..
>> > Cheers !
>> > Aryan
>> >
>> > On Thu, Jan 15, 2009 at 10:44 AM, James Van Dyke 
>> > wrote:
>> >>
>> >> The initial (function($) { was never closed.
>> >>
>> >> Here's how I formatted it so everything lines up:
>> >>
>> >> (function($){
>> >>var EYE = window.EYE = (function() {
>> >>var _registered = {
>> >>init: []
>> >>};
>> >>return {
>> >>init: function() {
>> >>$.each(_registered.init, function(nr,
>> >> fn) {
>> >>fn.call();
>> >>});
>> >>},
>> >>extend: function(prop) {
>> >>for (var i in prop) {
>> >>if (prop[i] != undefined) {
>> >>this[i] = prop[i];
>> >>}
>> >>}
>> >>},
>> >>register: function(fn, type) {
>> >>if (!_registered[type]) {
>> >>_registered[type] = [];
>> >>}
>> >>_registered[type].push(fn);
>> >>}
>> >>};
>> >>})();
>> >>
>> >>$(EYE.init);
>> >> })(jQuery);
>> >>
>> >>
>> >> I think that's about the most obfuscated thing I've seen this week.  I
>> >> hope you're doing something cool.
>> >>
>> >> Let us know if that helps.
>> >>
>> >>
>> >>
>> >> On Jan 14, 11:57 pm, "Sagar Arya"  wrote:
>> >> > Hello,  I tried changing the braces.. It seems they were
>> >> > proper...
>> >> > Here i am attaching all the files... Can anyone help me out pls...
>> >> > its
>> >> > perfectly running in mozilla, chrome.. but not in IE.. :(
>> >> >
>> >> > Cheers !
>> >> > Sagar
>> >> >
>> >> > On Wed, Jan 14, 2009 at 12:08 PM, Sagar Arya 
>> >> > wrote:
>> >> > > hey thanks so much.. :-)
>> >> >
>> >> > > Cheers !
>> >> > > Aryan
>> >> >
>> >> > > On Wed, Jan 14, 2009 at 10:26 AM, Karl Swedberg
>> >> > > wrote:
>> >> >
>> >> > >> good eye, Ricardo! thanks for the back up. :-)
>> >> >
>> >> > >> --Karl
>> >> >
>> >> > >> 
>> >> > >> Karl Swedberg
>> >> > >>www.englishrules.com
>> >> > >>www.learningjquery.com
>> >> >
>> >> > >>   On Jan 13, 2009, at 5:54 PM, Ricardo Tomasi wrote:
>> >> >
>> >> > >> You're missing a parenthesis when closing the anonymous function:
>> >> >
>> >> > >> }(); should be })();
>> >> >
>> >> > >> And I'm guessing '$' is there for jQuery, so that should actually
>&g

[jQuery] Re: Images resize problem with Aajx

2009-01-17 Thread jQuery Lover

If the image is not loaded by the time you call .height() function it
returns 0. Since your code is run right after the ajax request is
completed browser has no idea what is the size of that images.

Tip: You could bind a .load() event to your images and change the size
of that particular image on its load.


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



On Sat, Jan 17, 2009 at 5:34 PM, David .Wu  wrote:
>
> My process is
> 1. load images from other php file
> 2. put the response thing into a div
> 3. check all image sizes
> 4. resize image if the size over the restriction
>
> the problem is sometimes images resize failed, how to make sure the
> resize process work.
>
> html code
>  www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> http://www.w3.org/1999/xhtml";>
> 
> 
> demo
> 
> 
> 
> 
> 
>
> 
> 
> 
> 
> 
> 
> 


[jQuery] Re: jQuery 1.3 selector :first; :first-child

2009-01-17 Thread jQuery Lover

Just checked. Works just fine.

Maybe something wrong in your html? Could you paste it here?


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



On Sat, Jan 17, 2009 at 6:26 PM, Charlie22  wrote:
>
> Hi all,
> I have trouble in jQuery 1.3 with :first; :first-child selector.
> Always it selects all "a". In version 1.2.6 it worked by suspense.
> What is new or wrong?? Thx for help.
>
> $(function(){
>$('#menu li a:first-child').remove();
> });
>


[jQuery] Re: [jquery]Need help in Simple Jquery Function I develop for tabs

2009-01-17 Thread jQuery Lover

I have just created html with your content and js. It works just fine.
ALL tabs work fine...


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



On Sat, Jan 17, 2009 at 3:30 PM, Yuvraj Mathur  wrote:
>
> Hi,
> I am stuck up with this function to make simple Tabs. It works absolutely 
> fine only with the first two tabs. Can someone please observe the code and 
> reply the problem.
>
> Below "d" stands for the header(div) in which the links are, "e" for the 
> targeted content(div), and "f" for the sequence number.
>
> 
> function TabTasTic(d,e,f){
> $('#'+ d +' a').css({background: '#ff'});
> $('#'+ e +' div').hide();
> $('#'+ e +' div').eq(f).show();
> $('#'+ d +' a').eq(f).css({background: '#00'});
> }
> 
> 
> Tab1
> Tab2
> Tab3
> Tab2
> 
> 
> T1
> T2
> T3
> T4
> 
>
>


[jQuery] Re: Hide content until loaded

2009-01-17 Thread jQuery Lover

// fired right away
$('tn-hide').css('display', 'none').addClass('tn-loading');

$(document).ready(function() {
   // fired on DOM ready
});


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



On Sat, Jan 17, 2009 at 9:53 AM, Christine Masters
 wrote:
>
> Hi everyone!
>
> I'm a jQuery newbie, so I apologize if this is an easy question!
>
> I'm building a template for newspaper sites, and by nature of having many
> ads and modules and so forth, the content loads before the jQuery that
> styles it, leading to a flash of unstyled content.
>
> So, on several of my modules that use a lot of jQuery, I'd like to hide them
> until they are loaded.
>
> Right now, I'm trying to do this:
>
> $('tn-hide').css('display', 'none').addClass('tn-loading');
>
> $(document).ready(function() {
>$('tn-hide').css('display', 'block').removeClass('tn-loading);
> });
>
> I'd like to be able to simply apply the 'tn-hide' class to any module I'd
> like to hide until loaded on the page.
>
> It is my (limited) understanding that the first line will go into effect
> when the DOM is ready and the second when the document is ready.
>
> Anyway, right now it isn't working. I'd appreciate it if you could give me
> any insight on this or let me know if I'm heading in the right direction.
>
> If it helps, here is my page: http://blueprints.townnews-cms.com/
>
> 
> Christine Masters, Product Manager, TownNews.com
> cmast...@townnews.com | 1-800-293-9576 x1022
> Twitter: c_masters
> 
>
>
>
>


[jQuery] Re: jQuery 1.3 - am I missing something or is this a bug?

2009-01-17 Thread jQuery Lover

I have just spent about 5 minutes trying to select elements without
"." and also tried to select classes with different capitalization.

None could be selected... Works just fine, as it should be!!! I am
getting my jquery from:
http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js


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



On Sat, Jan 17, 2009 at 8:25 AM, B J Pohl  wrote:
>
> Upgraded to 1.3 on my site today and found that previously working
> code is broken.  The issue is that I was using a selector of $
> ('.aComment') to get, not surprisingly, elements with a class of
> 'aComment' .  This worked great with 1.2.6.  However, with some
> tinkering, I have found that I can user $('acomment') to select these
> nodes with 1.3 .
>
> Question is, is the expected behavior or a bug?  I'm pretty new to a
> lot of this stuff so I acknowledge my ignorance in advance.  However,
> I thought it a weird change in behavior.
>
> Can someone give me some feedback?  If this is a bug, I'll do my best
> to submit it (and maybe even try a fix).  If it isn't, can someone
> explain to me why the different behavior between 1.2.6 and 1.3?
>
> Thanks!
>
> B.J.
>


[jQuery] Re: jQuery 1.3 - am I missing something or is this a bug?

2009-01-17 Thread jQuery Lover

Wow, thanks for the link and clearing out. That's something new I
learned today :)

Thanks again.


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



On Sat, Jan 17, 2009 at 9:34 PM, B J Pohl  wrote:
>
> Thanks for looking into this!  First off, I have complicated my
> question by not being careful with my reporting:  The selector that
> *did* work in fact used a '.' (I missed it above... i.e. $('acomment')
> should be $('.acomment'))  Sorry about that.
>
> Further experimenting shows that this behavior is browser specific.  I
> see the described behavior in Chrome, but not in IE7.  (In fact, I've
> had to revert to 1.2.6 because the behavior is inconsistent between
> browsers).  I believe it is related to a bug that has been reported
> concerning capitals  in class names with  Safari(i.e. WebKit):
>
> http://dev.jquery.com/ticket/3840
>
> Anyway, thanks for the feedback!
>
> On Jan 17, 8:02 am, jQuery Lover  wrote:
>> I have just spent about 5 minutes trying to select elements without
>> "." and also tried to select classes with different capitalization.
>>
>> None could be selected... Works just fine, as it should be!!! I am
>> getting my jquery 
>> from:http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js
>>
>> 
>> Read jQuery HowTo Resource  -  http://jquery-howto.blogspot.com
>>
>> On Sat, Jan 17, 2009 at 8:25 AM, B J Pohl  wrote:
>>
>>
>>
>> > Upgraded to 1.3 on my site today and found that previously working
>> > code is broken.  The issue is that I was using a selector of $
>> > ('.aComment') to get, not surprisingly, elements with a class of
>> > 'aComment' .  This worked great with 1.2.6.  However, with some
>> > tinkering, I have found that I can user $('acomment') to select these
>> > nodes with 1.3 .
>>
>> > Question is, is the expected behavior or a bug?  I'm pretty new to a
>> > lot of this stuff so I acknowledge my ignorance in advance.  However,
>> > I thought it a weird change in behavior.
>>
>> > Can someone give me some feedback?  If this is a bug, I'll do my best
>> > to submit it (and maybe even try a fix).  If it isn't, can someone
>> > explain to me why the different behavior between 1.2.6 and 1.3?
>>
>> > Thanks!
>>
>> > B.J.


[jQuery] Re: Hide content until loaded

2009-01-17 Thread jQuery Lover

Saif, do you have a point or is this spam?

MorningZ, I am sure you did not have time to go into much details just
like me with my first post :)

Christine, MorningZ suggested (IMO) the best way to do it. Just keep
in mind those users that do not have js enabled. Add some id or class
to your  tag USING JAVASCRIPT. For example a "js" id and in your
CSS add rules that make your blocks display none.

#js .tn-hide{
 display:none;
}

This will make sure those users with js disabled will ALSO see your
hidden blocks.

PS. It's surprising how many company system administrators disable js
in browser for security sake.


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



On Sat, Jan 17, 2009 at 8:16 PM, Saif ullah  wrote:
> http://tinyurl.com/8rwmkr
>
> On Sat, Jan 17, 2009 at 8:13 PM, MorningZ  wrote:
>>
>> Why not do it with CSS?  where css class "tn-loading" has "display:
>> none" declared
>>
>> 
>>Content you are hiding until document "ready"
>> 
>>
>> then
>>
>> $(document).ready(function() {
>>//Do some stuff here
>>
>>//Done doing stuff, show the content
>>$('tn-hide').removeClass('tn-loading);
>> });
>>
>>
>> On Jan 16, 11:53 pm, "Christine Masters" 
>> wrote:
>> > Hi everyone!
>> >
>> > I'm a jQuery newbie, so I apologize if this is an easy question!
>> >
>> > I'm building a template for newspaper sites, and by nature of having
>> > many
>> > ads and modules and so forth, the content loads before the jQuery that
>> > styles it, leading to a flash of unstyled content.
>> >
>> > So, on several of my modules that use a lot of jQuery, I'd like to hide
>> > them
>> > until they are loaded.
>> >
>> > Right now, I'm trying to do this:
>> >
>> > $('tn-hide').css('display', 'none').addClass('tn-loading');
>> >
>> > $(document).ready(function() {
>> > $('tn-hide').css('display', 'block').removeClass('tn-loading);
>> >
>> > });
>> >
>> > I'd like to be able to simply apply the 'tn-hide' class to any module
>> > I'd
>> > like to hide until loaded on the page.
>> >
>> > It is my (limited) understanding that the first line will go into effect
>> > when the DOM is ready and the second when the document is ready.
>> >
>> > Anyway, right now it isn't working. I'd appreciate it if you could give
>> > me
>> > any insight on this or let me know if I'm heading in the right
>> > direction.
>> >
>> > If it helps, here is my page:http://blueprints.townnews-cms.com/
>> >
>> >
>> > 
>> > Christine Masters, Product Manager, TownNews.com
>> > cmast...@townnews.com | 1-800-293-9576 x1022
>> > Twitter: c_masters
>> >
>> > 
>


[jQuery] Re: Images resize problem with Aajx

2009-01-17 Thread jQuery Lover

Didn't get exactly what you meant, but if you want to do something
when loading has finished then put it into the load() function.

.load(function(){
// your code
});


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



On Sat, Jan 17, 2009 at 9:53 PM, David .Wu  wrote:
>
> I got one more question, actually I need to clone the result of $td1
> into another $td2, how to do it after the load function "finish".
>
>$img1.load(function()
>{
>$(this).each(function()
>{
>if($(this).height() > $h) $(this).height($h);
>});
>});
>
>$tbl1.clone().prependTo($td2);
>
>
>
> On 1月18日, 上午12時43分, "David .Wu"  wrote:
>> aha, I understand, it's work, thanks :)
>>
>> $img1.load(function()
>> {
>> $(this).each(function()
>>     {
>> if($(this).height() > $h) $(this).height($h);
>> });
>>
>> });
>>
>> On 1月17日, 下午9時21分, jQuery Lover  wrote:
>>
>> > If the image is not loaded by the time you call .height() function it
>> > returns 0. Since your code is run right after the ajax request is
>> > completed browser has no idea what is the size of that images.
>>
>> > Tip: You could bind a .load() event to your images and change the size
>> > of that particular image on its load.
>>
>> > 
>> > Read jQuery HowTo Resource  -  http://jquery-howto.blogspot.com
>>
>> > On Sat, Jan 17, 2009 at 5:34 PM, David .Wu  wrote:
>>
>> > > My process is
>> > > 1. load images from other php file
>> > > 2. put the response thing into a div
>> > > 3. check all image sizes
>> > > 4. resize image if the size over the restriction
>>
>> > > the problem is sometimes images resize failed, how to make sure the
>> > > resize process work.
>>
>> > > html code
>> > > > > >www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
>> > > http://www.w3.org/1999/xhtml";>
>> > > 
>> > > 
>> > > demo
>> > > 
>> > > <!--
>> > >div#slide
>> > >{
>> > >width:100px;
>> > >height:50px;
>> > >overflow:hidden;
>> > >}
>> > >div#slide ul
>> > >{
>> > >margin:0px;
>> > >padding:0px;
>> > >list-style:none;
>> > >}
>> > >div#slide li
>> > >{
>> > >float:left;
>> > >}
>> > > -->
>> > > 
>> > > 
>> > > 
>>
>> > > 
>> > > 
>> > > 
>> > > <!--
>> > >$(document).ready(function()
>> > >{
>> > >$.ajax(
>> > >{
>> > >url:'ajax.php',
>> > >type:'get',
>> > >cache:false,
>> > >success:function(data)
>> > >{
>> > >/*
>> > >data will response html
>> > ><ul>
>> > ><li><img src="1.jpg"></li>
>> > ><li><img src="2.jpg"></li>
>> > ><li><img src="3.jpg"></li>
>> > ></ul>
>> > >*/
>> > >$('div#slide').html(data);
>> > >},
>> > >complete:function()
>> > >{
>> > >$h = 40; /* images hight restriction */
>> > >/* resize the image */
>> > >$('div#slide img').each(function()
>> > >{
>> > >if($(this).height() > $h) 
>> > > $(this).height($h);
>> > >});
>> > >}
>> > >});
>> > >});
>> > > //-->
>> > > 
>> > > 
>> > > 


  1   2   3   >