[jQuery] Re: Need help making a menu appear next to the users image....

2008-09-05 Thread Jack Killpatrick


I think this (below) will work (I tested it locally). The trick is using 
setTimeout to allow some time for the mouse to move between the image 
and the menu, before deciding to hide the menu. This example will make 
the menu appear when you hover over the image, stay visible if you move 
your mouse from the image to the menu, and disappear if you move the 
mouse off of the menu to anywhere other than back to the image, or if 
you move the mouse from the image to something other than the menu.


   style type=text/css
   #imgDiv { float:left }
   #menu { float:left; display:none; width:150px; height:150px; 
border:1px solid silver; padding:10px; }

   /style
  
   script type=text/javascript src=jquery-1.2.6.js/script

   script type=text/javascript
   var onMenu = false;
   var onImg = false;
   $(function() {
   $('#img').hover(
   function(){
   onImg = true;
   $('#menu').fadeIn('fast');
   },
   function(){
   onImg = false;
   setTimeout(function(){
   if (!onMenu) $('#menu').fadeOut('fast');
   },50);
   }
   );

   $('#menu').hover(
   function(){
   onMenu = true;
   },
   function(){
   onMenu = false;
   setTimeout(function(){
   if (!onImg) $('#menu').fadeOut('fast');
   },50);
   }
   );
   });
   /script

div id=imgDivimg id=img 
src=http://www.pups4sale.com.au/maltese_puppy_04.jpg; width=287 
height=356 //div

div id=menu
   a href=#Nice Puppy/abr/
   a href=#Bad Puppy/a
/div
div style=clear:both/div

- Jack

Aaron wrote:

Hi I  have a website that I am currently working on. I have user's to
upload images and select which image is default.

I want to make the user able to when they have the mouse over the
image to have a menu next to the image fade in.

Now the problem. I tried with hover and then tried using mouseover
functions.

The problem is when the user puts his mouse over his image it would
fade in a menu but when you move your mouse to put it on the menu it
fades out.

I don't know what to do.  I notice since I made the javascript to fade
in when mouse is on user image and when it's off user image it is then
faded out this is a problem since the menu if off the users image.

I been playing around with this. I  have the menu hidden first and
then faded in and out.

I want to have the user to be able to put the mouse on the user image
and move it off the image onto the menu and be able to click buttons
on it and if the mouse is off the users image and not on the menu then
the menu would fade out.

any Ideas???

  





[jQuery] Re: jeditable questions

2008-09-05 Thread Mika Tuupola



On Sep 5, 2008, at 1:45 AM, kadm wrote:


- I can't style the form element at all, I mean when you click the
editable text and it is transformed into a textfield/textarea, it has
a plain style, I'm unable to customize it neither using {cssclass :
someclass} nor with {style : property: atribute}. Are those
options available and functioning OK? Why can it be failing?


Lets say you have something like this:

  $(.editable).editable(http://www.example.com/save.php;, {
  type   : 'textarea',
  submit : 'OK',
  cancel : 'cancel',
  cssclass : editable
  });

Generated HTML would be like this:

form class=editable
  textarea name=value /textarea
  button type=submitOK/button
  button type=cancelcancel/button
/form

You should then be able to style textarea with something like:

form.editable  textarea {
  color : #F00
}


- When I click an editable text, and then hit Enter or Esc or click
outside the textfield, the textfield goes back to text, as expected.
But when I have multiple editable texts in the same page (same
cssclass, obviously different IDs) and click/make editable one of
them, then click on another, the previous one doesn't reset its
editable state back to text, but the editable textfield persists.



If you have

$(.editable).editable(http://www.example.com/save.php;, {
onblur : 'cancel'
});

which is the default, Jeditable should work as you expect. See this  
demo page. Does it work as expected for you?


http://www.appelsiini.net/projects/jeditable/default.html

Are you sure you do not have onblur : 'ignore'?

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



[jQuery] Re: Validation addmethod input1input2

2008-09-05 Thread tlob

morning jQueryians

anyone have an idea?

thx
tlz

On Sep 4, 6:08 pm, tlob [EMAIL PROTECTED] wrote:
 Hello I am fairly new to jQuery and JS, so be nice to me ;-)
 I added the validation Plug into my form.

 I have 5*2 Input fields in form of the UI/datepicker. Every pair can
 be blank or both have to be filled out. Pretty simple... not for me.

 I cant get my head around it. I try to do it the propper way with the
 addMethod (http://docs.jquery.com/Plugins/Validation/Validator/
 addMethod). Seems the propper way to me.

 showDate1
 TicketsforDate1

 showDate2
 TicketsforDate2

 showDate3
 TicketsforDate3

 showDate4
 TicketsforDate4

 showDate5
 TicketsforDate5

 do you guys have a simple clean solution for this? Thanks in advance!


[jQuery] Re: form plugin and a progress bar

2008-09-05 Thread Giovanni Battista Lenoci


andrea varnier ha scritto:

thank you, the post is really good, but the server here is running PHP
5.1 :(
  

Without apc extension you can't do it in php/javascript.

As mentioned from Mike Alsup the are a different solutions in flash.
I've never used jqUploader, but I've used SwfUpload, and with the right 
configuration you can upload very large files :-)





--
gianiaz.net - web solutions
p.le bertacchi 66, 23100 sondrio (so) - italy
+39 347 7196482 



[jQuery] Re: Submit a Form (Search Results)

2008-09-05 Thread Giovanni Battista Lenoci


LJohnny ha scritto:

What I want to do is have a text field and a search button and then
get the results in a pop-up window just like the ones at
http://malsup.com/jquery/block/#demos


Like, users type in their query and then push submit, then the sub-
window opens and results are shown there.


I'm not sure if this has been done before or not, but I've been told
jQuery is capable of handling this.
Thanks very much in advance.

  

The blockui plugin generates from a div.

If you want to show the results in a modal window the first thing you 
have to do is to submit the form via ajax.
You can do this with the great form plugin from Mike Alsup 
(http://malsup.com/jquery/form/) then in the success function you have 
to populate an hidden div with the results, and after populating you can 
launch the blockui function on the div.


Hope this helps :-)

bye

--
gianiaz.net - web solutions
p.le bertacchi 66, 23100 sondrio (so) - italy
+39 347 7196482 



[jQuery] porn here

2008-09-05 Thread tlob

in the comment section:
http://jquery.com/blog/2007/02/17/the-jquery-irc-channel/


[jQuery] Re: selectors

2008-09-05 Thread Michael Geary

 if I need the Dom node and jQuery object on the same function 
 should I give each different variables or is there a workaround ?

Given a jQuery object, you can always get directly to its DOM node(s) with
[0], [1], etc. So you don't *need* another variable, but you can always use
one if you want.

I do this quite often, when I'm using a jQuery selector that I know will
return only a single DOM node, e.g. an ID selector like this:

var $foo = $('#foo'), foo = $foo[0];
// $foo is a jQuery object, foo is the matching DOM node.
// These should alert the same value:
alert( $foo.html() );
alert( foo.innerHTML );

I also do this the other way around when I have a DOM node to start with.
Suppose I have a function that takes a DOM node as an argument:

function test( element ) {
var $element = $(element);
// $element is the jQuery object
// element is the DOM node
}

In both cases I use the convention of $xyz for the jQuery object and just
plain xyz for the corresponding DOM object. This lets me see when reading
the code that they are closely tied together, while still making it easy to
tell them apart.

-Mike



[jQuery] Porn on jQuery blog

2008-09-05 Thread Gordon

You might want to pick better subject lines when reporting such stuff
in future, at first glance I thought you were just a spammer.

On Sep 5, 8:25 am, tlob [EMAIL PROTECTED] wrote:
 in the comment 
 section:http://jquery.com/blog/2007/02/17/the-jquery-irc-channel/


[jQuery] Re: shadowbox resize iframe after content loads

2008-09-05 Thread Gordon

Can nobody help out with this?

On Sep 3, 12:06 pm, Gordon [EMAIL PROTECTED] wrote:
 On our website I am using a shadowbox to view videos hosted on another
 site in the product page window.  The problem is that recently the
 company hosting the videos have started providing several different
 size of videos.

 All the different video pages, however, have an element with an ID of
 container as the only child of the body element (in 2 cases it's a
 table, in a third a div, but all have an id of container).  I found
 that if I can manually resize the shadowbox by getting the clientwidth
 and clientheight of the #container element and setting the width and
 height of the shadowbox to these values I can get the shadowbox to
 perfectly contain the video without excess space.

 The problem is that I can't find a way of grabbign the width and
 height from within a script and applying the new size.  I tried typing
 $('#shadowbox_content').content().find ('#container') into the firebug
 console and got a permission denied error.

 Additionally, the iFrame doesn't exist until the shadowbox opens, so I
 need to find a way to get the iframt content when the iframe loads but
 to do it wit han iframe that doesn't exist until the containing
 shadowbox opens.

 Can anyone help?

 The only other solution I have it to just make the shadowbox big
 enough to hold any video size, but then there's a lot of white space
 in the shadowbox when the video is smaller than this.  Here are a few
 pages that use the shadowbox that show the problem:

 http://www.pcwb.com/catalogue/item/A0234261- Biggest 
 sizehttp://www.pcwb.com/catalogue/item/3DCONX01- Most 3D Connexion
 videoshttp://www.pcwb.com/catalogue/item/WAC123- Most videos on the site
 are this size


[jQuery] Re: form plugin and a progress bar

2008-09-05 Thread andrea varnier

On 5 Set, 01:24, Mike Alsup [EMAIL PROTECTED] wrote:
 Unfortunately there is no way to know the progress of the upload with
 just HTML/JavaScript.  But you can do this with Flash.  Here's an
 example:

 http://www.pixeline.be/experiments/jqUploader/

 Mike

thanks mike :)


[jQuery] Re: [Validation plugin] Checkbox array problem

2008-09-05 Thread Jörn Zaefferer
See 
http://docs.jquery.com/Plugins/Validation/Reference#Fields_with_complex_names_.28brackets.2C_dots.29

Jörn

On Fri, Sep 5, 2008 at 12:56 AM, nonsense [EMAIL PROTECTED] wrote:

 Hi,

 I'm using Validation plugin (http://docs.jquery.com/Plugins/
 Validation) and I want to use it to check whether at least one
 checkbox is checked. Validating for one checkbox is working fine, but
 not for group.

 HTML code:
 input type=checkbox name=category[]
 input type=checkbox name=category[]
 input type=checkbox name=category[]

 I tried to add category[]: required to rules but no success.

 Could somebody show me a working example?

 Thanks in advance,
 nonsense



[jQuery] click() and dblclick(), sitting in a tree

2008-09-05 Thread René

I'd like to bind both events to a div, such that:

When the div is clicked, Event A fires.
When the div is double-clicked, event B fires. But not event A.

The single-click event works fine. And the double-click works too,
except both events fire on double-click. That is, immediately after
the first click (of two), Event A fires  Then on the second click
of the double-click, event B fires...

Is there a way I can separate the two events?

...Rene


[jQuery] Re: shadowbox resize iframe after content loads

2008-09-05 Thread [EMAIL PROTECTED]

Maybe you can use the onFinish callback:
http://mjijackson.com/shadowbox/doc/api.html

$(window).load(function(){

var options = {
onFinish:function() {
 // do what you want here
// resize the shadowbox etc...
   }
};

Shadowbox.init(options);

});


On 5 Sep., 10:15, Gordon [EMAIL PROTECTED] wrote:
 Can nobody help out with this?

 On Sep 3, 12:06 pm, Gordon [EMAIL PROTECTED] wrote:

  On our website I am using a shadowbox to view videos hosted on another
  site in the product page window.  The problem is that recently the
  company hosting the videos have started providing several different
  size of videos.

  All the different video pages, however, have an element with an ID of
  container as the only child of the body element (in 2 cases it's a
  table, in a third a div, but all have an id of container).  I found
  that if I can manually resize the shadowbox by getting the clientwidth
  and clientheight of the #container element and setting the width and
  height of the shadowbox to these values I can get the shadowbox to
  perfectly contain the video without excess space.

  The problem is that I can't find a way of grabbign the width and
  height from within a script and applying the new size.  I tried typing
  $('#shadowbox_content').content().find ('#container') into the firebug
  console and got a permission denied error.

  Additionally, the iFrame doesn't exist until the shadowbox opens, so I
  need to find a way to get the iframt content when the iframe loads but
  to do it wit han iframe that doesn't exist until the containing
  shadowbox opens.

  Can anyone help?

  The only other solution I have it to just make the shadowbox big
  enough to hold any video size, but then there's a lot of white space
  in the shadowbox when the video is smaller than this.  Here are a few
  pages that use the shadowbox that show the problem:

 http://www.pcwb.com/catalogue/item/A0234261- Biggest 
 sizehttp://www.pcwb.com/catalogue/item/3DCONX01- Most 3D Connexion
  videoshttp://www.pcwb.com/catalogue/item/WAC123- Most videos on the site
  are this size


[jQuery] Re: Tablesorter 2.0.3 - Sorting af column of checkboxes (resorting)

2008-09-05 Thread hammerskov



MorningZ wrote:
 
 look into the code of the tablesorter.js code, it's storing the values/
 text of the td's value right there in the client on the wiring up of
 the plugin, and it doesn't handle changing of the values/text
 
 you'll have to come up with some other solution, or dig real deep into
 the code and make changes to fit your need
 

I was under the impression that calling 

$(#myTable)).trigger(update); 

would cause the plugin to recreate the cache, and thus detect the changes in
the checkbox column. 
-- 
View this message in context: 
http://www.nabble.com/Tablesorter-2.0.3---Sorting-af-column-of-checkboxes-%28resorting%29-tp19308787s27240p19326860.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] jeditable lazy load?

2008-09-05 Thread [EMAIL PROTECTED]

Hello,

Is it possible to lazy load jeditable on an element?

I have a grid which uses several edit in place fields.  The load time
on this is very high and I'm desperately trying to reduce it.

Is there a way that the edit in place is not set untill the field is
clicked for the first time?


[jQuery] Ajax and array

2008-09-05 Thread lionel28


Hello, I am posting successfully an array, but for some reason, the first
element of the array is always missing.

in the text box I get:
topic[]=2topic[]=1topic[]=3topic[]=4topic[]=5topic[]=6topic[]=7
the response box displays
1,3,4,5,6,7 (missing '2'). If I change the order, then the new one in first
position will not post!

but the response code shows

function register(){
$.ajax({
type: POST,
url: post.php,
data:data= + 
document.getElementById(topicarray).value,
success: function(html){
$(#myresponse).html(html);
exit;
}

and the php

if($_POST['topic'])
{

$data = implode(',',$_POST['topic'] );

echo $data;
   exit;
} 

Please someone help?
-- 
View this message in context: 
http://www.nabble.com/Ajax-and-array-tp19325836s27240p19325836.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Plugins fighting one another?

2008-09-05 Thread hazy

I'm learning this technology so apologies if this is trivial! And
apologies for the large code snippet that follows.

My page, typical of most, has a navigation in div list items
determine what is shown in the main div alongside it. Content is
filled each time by a ajax call to provide either a SQL query result
set or plain text from a file.

I use the *excellent* livequery plugin to control the click event on
the list items and I am trying to use the flexigrid plugin (whih I
think will be excellent) to show my query results. I think these
plugins might be fighting in one another. When using a simple table as
a response to my ajax call my main content area is emptied and the
table shown, similarly when plain text is sent back. This works
repeatedly but :{ my flexigrid (json) response works only once and
then only if it is the first ajax call made.

I'd be grateful for any thoughts as to how I might go about debugging
this problem. (I suspect I'm getting the jquery stuff in the success
call back horribly wrong!)

TIA
John

!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN http://
www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd
html xmlns=http://www.w3.org/1999/xhtml;
head
meta http-equiv=Content-Type content=text/html;
charset=iso-8859-1 /
titleHuber/title

!-- include jquery libraries --
script type=text/javascript src=system/assets/jquery/
jquery-1.2.6.js/script
script type=text/javascript src=system/assets/jquery/
jquery.livequery.pack.js/script
script type=text/javascript src=system/assets/jquery/
jquery.dimensions.pack.js/script
script type=text/javascript src=system/assets/jquery/
jquery.flexigrid.pack.js/script

!-- include stylesheets --
link rel=stylesheet type=text/css href=system/assets/css/
general.css /
link rel=stylesheet type=text/css href=system/assets/css/
style.css /
link rel=stylesheet type=text/css href=system/assets/css/
flexigrid.css /

script

doAction = function(thisId) {
 var thisAction = new Object;
 thisAction.id = thisId;

 if (thisAction.id.substring(0, 5) == 'PAGE_') {
 thisAction.offset = thisAction.id.substring(5);
 thisAction.id = 'PAGE';
 }


 switch(thisAction.id)
 {
 case 'Manufacturers':
 thisAction.type = 'data';
 thisAction.url = 'index.php/manufacturer/listRows/';
 thisAction.data = 'start=0';
 break;

 case 'Users':
 thisAction.type = 'json';
 thisAction.url = 'index.php/user/listRows/';
 thisAction.data = 'start=0';
 break;

 case 'Configuration':
 thisAction.type = 'text';
 thisAction.url = 'configuration.txt';
 break;

 case 'PAGE':
 thisAction.type = 'data';
 thisAction.url = 'index.php/manufacturer/listRows/';
 thisAction.data = 'start=' + thisAction.offset;
 break;
 };

 $.ajax({ url: thisAction.url,
 data: thisAction.data,
 type: 'POST',
 timeout: 1000,
 error: function(){
$('#main_content').empty().html('Error loading page 
data');
 },
 success: function(post_response){
 if (thisAction.type == 'data') {

$(post_response).appendTo($('#main_content').empty());
 } else if (thisAction.type == 'json') {

$(post_response).appendTo($('#flex1').empty());
 } else if (thisAction.type == 'text') {

$('#main_content').empty().html(post_response);
 }
 }
 });
 return false;
};


$(function() {
 $('a')
 .livequery('click', function(event) {
 doAction(this.id);
 })
});


/script

/head
body
  div id=main_holder
div id=mainbody
  div id=top_contentFront Desk/div
  div id=left_content
div id=navigation class=navigator_menu
  ul id=actions
lia id=ManufacturersManufacturers/a/li
lia id=UsersUsers/a/li
lia id=ConfigurationConfiguration/a/li
  /ul
/div
  /div
  div id=main_contentLoading ...div id=flex1/
  /div
/div
  /div
  div id=footer/
/body
/html




[jQuery] Re: Plugin developement

2008-09-05 Thread mwk

Another solution i found on a Blog.
Instead of adding a function to the Plugin, create a seperate object
within the scope of the plugin.

;(function($)
{
$.fn.pluginname = function(options)
{
// private method
function _doSomethingPrivate()
{

}

// public method
$.fn.pluginname_doSomethingPublic = function()
{
_doSomethingPrivate();
return this;
}

};

Like that you still could write something like

$
('#example').pluginname().pluginname_doSomethingPublic().otherJquery();

Of course there are still some limits to it. ie not declared before $
().pluginname().
So from this point of view the way jmap is handling it is indeed
somehow better.
Its just, i like the way of having seperate methods instead of having
one multipurpose method.
But i guess i will go the way jmap does it, i still can seperate the
comands into private methods.
Its just u can't realy seperate anymore into private or plubic
methods.



On 3 Sep., 16:30, Balazs Endresz [EMAIL PROTECTED] wrote:
 It depends on what the public method returns. If it returns the jQuery
 object (the 'this' inside the plugin) then you have to call $
 ('#example').pluginname.doSomethingPublic().pluginname.doSomethingElse().

 If you want to chain your methods directly you have to return 'this'
 inside your public methods, which refers to $.fn.pluginname (not to
 the jquery object!).
 But doing this will prevent you from chaining jquery methods (most of
 the plugins are chainable). If you don't like this and would like to
 get the jquery object back, you can do that with another public
 method:
 $.fn.pluginname.returnJQuery = function(){  return _jquery;  }
 where _jquery is defined where your _options object: var _jquery=this;
 so $().pluginname.doSomethingPublic().doSomethingElse().returnJQuery()
 will return the original jQuery object.

 The only problem(?) with both is that it's a bit different from how
 jQuery is generally used. That's why, I think, the jMaps approach is
 somewhat better.



[jQuery] How do I access the function handlers of an event.

2008-09-05 Thread Drew LeSueur

$('#myid').click()  will trigger the click event;

and

$('myid').click(function(){alert('clicked');});  will bind that
function to the click event

but how do I return the function that would be called when $('#myid')
is clicked? (note: return, not call)

Thank you,



[jQuery] Re: .ajax POST question, script stops.

2008-09-05 Thread Ca-Phun Ung

Hi,

[EMAIL PROTECTED] wrote:
 How can I get jQuery to use the new divs that are populated as a
 result of an .ajax request.
   
What you want is the Ajax load method, see 
http://docs.jquery.com/Ajax/load#urldatacallback

   \$.ajax({
   type: POST,
   url: /creator.pl?colorselect= + color + idselect= + 
 id_select +
 ,
   success: function(){ 
 \$(#result).load(/creator.pl?colorselect=
 + color + id_select= + id_select + ) }
   });
   });

   
You're nearly there. But wrapping Ajax load with $.ajax is not 
necessary. Try replacing the above code this:

$(#result).load('/creator.pl', {colorselect: color, id_select: 
id_select});

Ajax load will inject the results into the #results div.

Note: I'm giving you the benefit of the doubt regarding that backslash 
you have before each $ sign ;)

-- Ca-Phun Ung
+ http://yelotofu.com




[jQuery] Re: Need help making a menu appear next to the users image....

2008-09-05 Thread Ca-Phun Ung

Aaron wrote:
 I already  Tried many ways... even hover events and mouse over events
 been playing around with them and was not able to make them to
 function as I want them too.

 I want the user to put the mouse over their image to get a menu  to
 fade in and when the mouse is off the users image I want the menu to
 fade out only if the mouse is not over the menu.

 I can't get it to work.
   
Do you have a demo online? Would make it easier to help you if you could 
show us some code.

-- Ca-Phun Ung
+ http://yelotofu.com




[jQuery] Re: jQuery test suite on new Google Chrome browser

2008-09-05 Thread Mike Alsup

 Yes, but every other implementation does that, so a lot of code
 implicitly relies on this. You don't really expect programmers to read
 language specs, do you?

But this gets to the very heart of the language - the Object .  And an
ECMAScript object is an unordered collection of properties.


[jQuery] Re: jeditable lazy load?

2008-09-05 Thread Andras Kende

Hello,

I had a table with hundreds of edit in place, jeditable was very slow..
used this and its loads very quick:
http://www.davehauenstein.com/code/jquery-edit-in-place/example/

Andras Kende
http://www.kende.com/

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of [EMAIL PROTECTED]
Sent: Friday, September 05, 2008 3:07 AM
To: jQuery (English)
Subject: [jQuery] jeditable lazy load?


Hello,

Is it possible to lazy load jeditable on an element?

I have a grid which uses several edit in place fields.  The load time
on this is very high and I'm desperately trying to reduce it.

Is there a way that the edit in place is not set untill the field is
clicked for the first time?



[jQuery] Re: Tablesorter 2.0.3 - Sorting af column of checkboxes (resorting)

2008-09-05 Thread MorningZ

yeah, that method *seems* like it would work

i added in the main js this alert

// apply easy methods that trigger binded events
$this.bind(update, function() {
alert(Update Called);
// rebuild parsers.
this.config.parsers = buildParserCache(this,
$headers);

// rebuild the cache map
cache = buildCache(this);


and wired checkboxes on a sortable table like so

$(:checkbox).click(function() {
$(#myTable).trigger(update);
});

and that alert did indeed fire... but no change in cache...

ah well, i tried...  good luck with this


[jQuery] Re: shadowbox resize iframe after content loads

2008-09-05 Thread Gordon

Thanks for the help, this is a good start as it lets me hook into
shadowbox load, but I'm still stuck with the other side of the
problem.  What I need to do is grab the width and height of an element
contained within the iFrame and resize the elements that contain the
iFrame based on those sizes.  As the iFrame is displaying content from
off-site it's causing a permission denied error (or at least I think
that's what's causing it).

On Sep 5, 9:52 am, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
 Maybe you can use the onFinish 
 callback:http://mjijackson.com/shadowbox/doc/api.html

 $(window).load(function(){

 var options = {
 onFinish:function() {
  // do what you want here
 // resize the shadowbox etc...
}
 };

 Shadowbox.init(options);

 });

 On 5 Sep., 10:15, Gordon [EMAIL PROTECTED] wrote:

  Can nobody help out with this?

  On Sep 3, 12:06 pm, Gordon [EMAIL PROTECTED] wrote:

   On our website I am using a shadowbox to view videos hosted on another
   site in the product page window.  The problem is that recently the
   company hosting the videos have started providing several different
   size of videos.

   All the different video pages, however, have an element with an ID of
   container as the only child of the body element (in 2 cases it's a
   table, in a third a div, but all have an id of container).  I found
   that if I can manually resize the shadowbox by getting the clientwidth
   and clientheight of the #container element and setting the width and
   height of the shadowbox to these values I can get the shadowbox to
   perfectly contain the video without excess space.

   The problem is that I can't find a way of grabbign the width and
   height from within a script and applying the new size.  I tried typing
   $('#shadowbox_content').content().find ('#container') into the firebug
   console and got a permission denied error.

   Additionally, the iFrame doesn't exist until the shadowbox opens, so I
   need to find a way to get the iframt content when the iframe loads but
   to do it wit han iframe that doesn't exist until the containing
   shadowbox opens.

   Can anyone help?

   The only other solution I have it to just make the shadowbox big
   enough to hold any video size, but then there's a lot of white space
   in the shadowbox when the video is smaller than this.  Here are a few
   pages that use the shadowbox that show the problem:

  http://www.pcwb.com/catalogue/item/A0234261- Biggest 
  sizehttp://www.pcwb.com/catalogue/item/3DCONX01- Most 3D Connexion
   videoshttp://www.pcwb.com/catalogue/item/WAC123- Most videos on the site
   are this size


[jQuery] Re: jQuery test suite on new Google Chrome browser

2008-09-05 Thread RobG



On Sep 5, 6:32 am, Jörn Zaefferer [EMAIL PROTECTED]
wrote:
 Yes, but every other implementation does that,

No, they don't.  In Firerfox 2 and 3 (and perhaps in earlier versions)
properties added to the window object are returned in reverse
order[1], in Opera 7 properties added to native objects were returned
in alphabetical order.

 so a lot of code
 implicitly relies on this.

Then it is bad code.

 You don't really expect programmers to read
 language specs, do you?

Yes, though simply reading it cover-to-cover is pointless.  They
should at least know enough about it to be able to find, read and
understand relevant sections where required.

How programmers learn a language is up to them, but they should at
least be aware of such fundamental principles.


1. Some play code, try it in Firefox and some other browser:

div id=xx/div
script type=text/javascript
  function foo(obj) {
var props = {alpha:'alpha', gamma:'gamma',
 delta:'delta', beta:'beta'};
for (var p in props) {
  obj[p] = props[p];
}
var x = [];
for (p in obj){
  if (p in props){
x.push(p);
  }
}
return x;
  }
  window.onload = function(){
document.getElementById('xx').innerHTML = foo(this).join('br');
  }
/script


--
Rob


[jQuery] Re: shadowbox resize iframe after content loads

2008-09-05 Thread [EMAIL PROTECTED]

Hi,
I have just googled around for some time and found this in the jquery
docs:
http://docs.jquery.com/Traversing/contents - click example
so
var w = $
(#shadowbox_content).contents().find(#getsizefromthis).width()
var h = $
(#shadowbox_content).contents().find(#getsizefromthis).height()
// do something else with them

I tested this in firebug and it thrown an error that read the
information of this element...
Just try it yourself maybe it works!


On 5 Sep., 13:48, Gordon [EMAIL PROTECTED] wrote:
 Thanks for the help, this is a good start as it lets me hook into
 shadowbox load, but I'm still stuck with the other side of the
 problem.  What I need to do is grab the width and height of an element
 contained within the iFrame and resize the elements that contain the
 iFrame based on those sizes.  As the iFrame is displaying content from
 off-site it's causing a permission denied error (or at least I think
 that's what's causing it).

 On Sep 5, 9:52 am, [EMAIL PROTECTED]

 [EMAIL PROTECTED] wrote:
  Maybe you can use the onFinish 
  callback:http://mjijackson.com/shadowbox/doc/api.html

  $(window).load(function(){

      var options = {
              onFinish:function() {
   // do what you want here
              // resize the shadowbox etc...
         }
      };

      Shadowbox.init(options);

  });

  On 5 Sep., 10:15, Gordon [EMAIL PROTECTED] wrote:

   Can nobody help out with this?

   On Sep 3, 12:06 pm, Gordon [EMAIL PROTECTED] wrote:

On our website I am using a shadowbox to view videos hosted on another
site in the product page window.  The problem is that recently the
company hosting the videos have started providing several different
size of videos.

All the different video pages, however, have an element with an ID of
container as the only child of the body element (in 2 cases it's a
table, in a third a div, but all have an id of container).  I found
that if I can manually resize the shadowbox by getting the clientwidth
and clientheight of the #container element and setting the width and
height of the shadowbox to these values I can get the shadowbox to
perfectly contain the video without excess space.

The problem is that I can't find a way of grabbign the width and
height from within a script and applying the new size.  I tried typing
$('#shadowbox_content').content().find ('#container') into the firebug
console and got a permission denied error.

Additionally, the iFrame doesn't exist until the shadowbox opens, so I
need to find a way to get the iframt content when the iframe loads but
to do it wit han iframe that doesn't exist until the containing
shadowbox opens.

Can anyone help?

The only other solution I have it to just make the shadowbox big
enough to hold any video size, but then there's a lot of white space
in the shadowbox when the video is smaller than this.  Here are a few
pages that use the shadowbox that show the problem:

   http://www.pcwb.com/catalogue/item/A0234261- Biggest 
   sizehttp://www.pcwb.com/catalogue/item/3DCONX01- Most 3D Connexion
videoshttp://www.pcwb.com/catalogue/item/WAC123- Most videos on the 
site
are this size


[jQuery] Calculating the size of a string to make it fit into the whole window

2008-09-05 Thread marcus

Hi,
I have a div into which I want to load a string. The div has height
and width 100% - the whole window - and I want the string to fill the
whole div/window. (And when the window size changes the string's size
changes, too.)

Can someone tell me if jQuery can help me here to calculate the height
of the string in pixel and how?


[jQuery] Re: .ajax POST question, script stops.

2008-09-05 Thread [EMAIL PROTECTED]

Thank you for showing me the correct way to do that?

My next question really is, why after the user clicks on my div, does
the content reload from creator.pl does jQuery stop watching the
pixels inside #results. It doesnt do my hover effect and you cannot
click on any of the divs to re-send creator.

On Sep 5, 12:54 am, Ca-Phun Ung [EMAIL PROTECTED] wrote:
 Hi,

 [EMAIL PROTECTED] wrote:
  How can I get jQuery to use the new divs that are populated as a
  result of an .ajax request.

 What you want is the Ajax load method, 
 seehttp://docs.jquery.com/Ajax/load#urldatacallback

             \$.ajax({
                     type: POST,
                     url: /creator.pl?colorselect= + color + idselect= + 
  id_select +
  ,
                     success: function(){ 
  \$(#result).load(/creator.pl?colorselect=
  + color + id_select= + id_select + ) }
             });
     });

 You're nearly there. But wrapping Ajax load with $.ajax is not
 necessary. Try replacing the above code this:

 $(#result).load('/creator.pl', {colorselect: color, id_select:
 id_select});

 Ajax load will inject the results into the #results div.

 Note: I'm giving you the benefit of the doubt regarding that backslash
 you have before each $ sign ;)

 -- Ca-Phun Ung
 +http://yelotofu.com


[jQuery] return on error - how to handle an error when an address is not returned in jmaps

2008-09-05 Thread pedalpete

I've been using the jmaps plugin for a bit, and I added a bit of code
to it so that when an address is not found, it writes a message to the
user.

I now have a situation where there are two different locations on the
page where the message might be written to, depending on what the user
has done (did they select an address? or did they search for an
address?).

I've been trying to launch a function from the plugin, but I keep
getting 'function not found errors', and I've tried returning a null
value, or testing for a null value, but that hasn't worked either.

Any ideas on this would be appreciated.

The change I've made to the plugin is simply
[code]
if(!F){
$('.searchHolder').html('span class=holdError/spancenterThe
address could not be found. Enter a new address to search/center/
span');
return;
}
[/code]

where F is I guess the response from google, but then the jmaps plugin
does a bunch of stuff with the response.

but now I want to do something like
if search then write to searchHolder
if clicked address, write to address item

I hope there is a simple way to do this,

Pete


[jQuery] Re: Tablesorter 2.0.3 - Sorting af column of checkboxes (resorting)

2008-09-05 Thread tlphipps

You'll need to write a custom parser for your data set to accomplish
this.  As MorningZ alluded to earlier, the tablesorter is looking for
text by default in between the td/td tags.  What it's finding in
your case is simply an input type=checkbox.  It doesn't parse that
entity to find the 'selected' attribute for sorting purposes.  So
you'll need to write a custom parser that will present the 'selected'
attribute to the tablesorter for sorting purposes.
See this page in the tablesorter docs for more info:
http://tablesorter.com/docs/example-parsers.html

On Sep 5, 6:43 am, hammerskov [EMAIL PROTECTED] wrote:
 MorningZ wrote:

  ah well, i tried...  good luck with this

 Thank you very much for trying. Gues i'll be using a bit more time on this
 than I first anticipated :-)
 --
 View this message in 
 context:http://www.nabble.com/Tablesorter-2.0.3---Sorting-af-column-of-checkb...
 Sent from the jQuery General Discussion mailing list archive at Nabble.com.


[jQuery] Re: IE6 click event known bug?

2008-09-05 Thread Adrian-Bogdan Andreias
Found the bug. It's not related to click it's related to selectors and
applies to IE6 and IE7:

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

I hope it'll be fixed soon :)


On Fri, Sep 5, 2008 at 3:34 PM, Adrian-Bogdan Andreias 
[EMAIL PROTECTED] wrote:

 Is there a known bug in IE6 about binding click event to elements that were
 added dynamically to HTML?

 I can't get this working, though it's working in IE7, FF3, Opera and
 Safari.

 Thanks

 --
 http://jquerybox.com - jQuery forum




-- 
http://jquerybox.com - jQuery forum


[jQuery] IE6 click event known bug?

2008-09-05 Thread Adrian-Bogdan Andreias
Is there a known bug in IE6 about binding click event to elements that were
added dynamically to HTML?

I can't get this working, though it's working in IE7, FF3, Opera and Safari.

Thanks

-- 
http://jquerybox.com - jQuery forum


[jQuery] Re: .ajax POST question, script stops.

2008-09-05 Thread [EMAIL PROTECTED]

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

On 5 Sep., 13:40, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
 Thank you for showing me the correct way to do that?

 My next question really is, why after the user clicks on my div, does
 the content reload from creator.pl does jQuery stop watching the
 pixels inside #results. It doesnt do my hover effect and you cannot
 click on any of the divs to re-send creator.

 On Sep 5, 12:54 am, Ca-Phun Ung [EMAIL PROTECTED] wrote:

  Hi,

  [EMAIL PROTECTED] wrote:
   How can I get jQuery to use the new divs that are populated as a
   result of an .ajax request.

  What you want is the Ajax load method, 
  seehttp://docs.jquery.com/Ajax/load#urldatacallback

              \$.ajax({
                      type: POST,
                      url: /creator.pl?colorselect= + color + idselect= 
   + id_select +
   ,
                      success: function(){ 
   \$(#result).load(/creator.pl?colorselect=
   + color + id_select= + id_select + ) }
              });
      });

  You're nearly there. But wrapping Ajax load with $.ajax is not
  necessary. Try replacing the above code this:

  $(#result).load('/creator.pl', {colorselect: color, id_select:
  id_select});

  Ajax load will inject the results into the #results div.

  Note: I'm giving you the benefit of the doubt regarding that backslash
  you have before each $ sign ;)

  -- Ca-Phun Ung
  +http://yelotofu.com


[jQuery] Re: Tootip on multiple elements with same id

2008-09-05 Thread Michael Smith

Hi there,

You ought to be able to apply a class to each row, and then jquery can
operate on this instead of on the individual ids.  You'd have
something like

$('.tooltip')

instead of #tooltip

Hope this helps

On Fri, Sep 5, 2008 at 1:06 PM, LM [EMAIL PROTECTED] wrote:

 I have a php page where retrieve rows from a table.
 Eeach displayed row shall have a tooltip with some info about that
 content.
 I use http://bassistance.de/jquery-plugins/jquery-plugin-tooltip/
 There can be many rows on the page and everyone will have a span with
 id=tooltip.
 I initialize tooltip with the following statement:
 $(#tooltip).tooltip({
track: false,
delay: 0,
showURL: false,
fixPNG: true,
extraClass: pretty,
top: -15,
left: 5
});

 unfortunatley, tooltip works only on first row and the other will just
 appeart the title and not the tooltip.
 I know I can call the tooltip function by telling wich IDs the tooltip
 shall be applied, but as I can have 40/50 rows per page, I dont't
 wanna spam my code with such a ugly code:
 $
 (#tooltip1,#tooltip2,#tooltip3,#tooltip4,#tooltip5,#tooltip6,#tooltip7).tooltip

 Any help or idea?



[jQuery] Re: Calling/forcing hover()

2008-09-05 Thread Cerebral

It worked with the mouseenter syntax. Thank you!

Example:
body
div id=myIDHover/div
/body

$('div').hover(
function () {
alert($(this).attr('id'));
},
function () {}
);
$('div').trigger('mouseenter');


On Sep 5, 4:42 am, Nathan Hammond [EMAIL PROTECTED] wrote:
 Try $(elem).trigger('hover'); or $(elem).trigger('mouseenter'); and
 see if that works out for you.
 Nathan Hammond

 On Sep 4, 7:50 pm, Cerebral [EMAIL PROTECTED] wrote:

  Hi,
  is there a way to directly call the hover() or mouseover event ?
  I know I could use a separate function as the parameter but what I
  need is to trigger the hover event on my selected element, much like I
  can force the click event by writing something like $(elm).click(); in
  that case the click applies without user interaction.


[jQuery] Re: blockUI styling question

2008-09-05 Thread tlphipps

Brad,

I personally like the approach of doing all the CSS stuff via a true
stylesheet.  That's a personal preference, but I think it makes more
sense to most developers who might be new to the code.  They can
easily see how to style/change the CSS for the message if it's in a
CSS file rather than coded in javascript somewhere.

On Sep 4, 4:02 pm, MorningZ [EMAIL PROTECTED] wrote:
 i typically use something like

 setTimeout('$(#results_block).unblock(), 1000);

 that way the blocker is at least showing for a second


[jQuery] Re: jQuery under Konqueror

2008-09-05 Thread timothytoe

That linked page does say, jQuery generally works with Konqueror and
Firefox 1.0.x,...

But in my experience, it's always a disaster. Maybe it did mostly work
with an older jQuery. I think it should be changed to say that jQuery
DOES NOT generally work in Konqueror.

On Sep 4, 5:23 am, MorningZ [EMAIL PROTECTED] wrote:
 Konquerer isn't officially supported/compatible

 http://docs.jquery.com/Browser_Compatibility


[jQuery] Re: jQuery test suite on new Google Chrome browser

2008-09-05 Thread timothytoe

Is there really a lot of code that relies on it? If there is, wouldn't
Chrome break on many more pages? I don't recall seeing any code that
assumes an order.

  --tt

On Sep 4, 1:32 pm, Jörn Zaefferer [EMAIL PROTECTED]
wrote:
 Yes, but every other implementation does that, so a lot of code
 implicitly relies on this. You don't really expect programmers to read
 language specs, do you?

 Jörn

 On Thu, Sep 4, 2008 at 9:53 PM, Matt Kruse [EMAIL PROTECTED] wrote:

  On Sep 4, 2:00 pm, Feng [EMAIL PROTECTED] wrote:
  The second one is a bug in V8 (or Chrome). It returns reversed
  enumeration order of keys if the object is a literal.

  This is not a bug in V8. The order of keys is never guaranteed to be
  in the order they are inserted or specified in a literal.

  Matt Kruse


[jQuery] Find / traverse to next node matching a criteria?

2008-09-05 Thread S P Arif Sahari Wibowo

Hi!

Is there any feature in jQuery to find the next node matching a 
criteria, regardless of that next node a sibling or not?

I know there is next(expr) and prev(expr) methods, but 
this only works for sibling. I specifically need to have 
something to look into siblings and non-siblings.

The algorithm will probably look like this:
(a) for each subsequent siblings, check if that sibling match 
the criteria, if not, traverse down to find first tree match the 
criteria,
(b) failing that, go up to parent, then do (a) again,
(c) do that until no parent exist (means not found).

Maybe there is a plugin already doing that?

Thanks!

-- 
  (stephan paul) Arif Sahari Wibowo
_  _  _  _
   /  // // /
  _/ /  // _/  http://www.arifsaha.com/


[jQuery] I must be missing something simple...

2008-09-05 Thread Jim Buzbee

I've got some jQuery code that seems to work fine in Safari and
Firefox both under OSX and Windows. But I've been beating my head
against the wall trying to get the same code running under IE7.  I
must be missing something :-( I'm a novice at javascript and jQuery.
The following is a much abbreviated and simplified version. Under IE,
the alert function in the loop below comes up with Color:  each time
as if the find seems to be returning null. Does anyone have a
suggestion?

The same code can be found online at:

http://batbox.org/bh.html


Thanks,

Jim Buzbee

...

script type=text/javascript src=jquery-1.2.6.min.js/script
script type=text/javascript

jQuery(function()
{
   var xml = jQuery( 'span  itemcolorWhite/color/item' +
' itemcolorBlack/
color/item' +
   '/span'  );

   $(xml).find(item).each(function()
   {
  alert('Color: ' + $(this).find(color).text() );
   });
});

/script

...





[jQuery] Re: .ajax POST question, script stops.

2008-09-05 Thread [EMAIL PROTECTED]

You're right that was super easy!

Now, I have one more problem to solve that I cannot figure out (it's a
cosmetic problem.)

Basically, I want the div to light up with the users select color,
however, if they do not click, change it back to the color it was
before. Here is my code snip-it for that (also posted above). It does
pickup the color the user has selected (from an input box), but if you
scroll across the div the whole background color vanishes. I suspect
because the DIV has a style=background-color:blah is the problem.
The div is automatically populated, so there is no putting it into the
css file. Any suggestions :)?

\$(.button).hover(function () {
var color = \$(input#color_code).val();
var p_color = \$(this).css(background-color);
\$(this).css({ backgroundColor:color });
}, function () {
\$(this).css(background-color) == p_color;
});

--This even will also need to use livequery eventually, but i at least
want to get it working correctly before I push it over.

Thanks EVERYONE for all your assistance, jQuery is a lot of fun!

On Sep 5, 8:01 am, Ca-Phun Ung [EMAIL PROTECTED] wrote:
 [EMAIL PROTECTED] wrote:
  Thank you for showing me the correct way to do that?

  My next question really is, why after the user clicks on my div, does
  the content reload from creator.pl does jQuery stop watching the
  pixels inside #results. It doesnt do my hover effect and you cannot
  click on any of the divs to re-send creator.

 This is a common problem with Ajax loaded content. There are two routes
 you could take; 1) Re-bind the event handlers or 2) Event delegation.

 There is an excellent plugin called livequery [1] which automatically
 does the re-binding for you. I think this will save you some stress :)

 [1]http://brandonaaron.net/docs/livequery/


[jQuery] Re: How to apply jQuery to an item which doesn't exist when the page is loaded.

2008-09-05 Thread Rey Bango


You need to bind an event handler to your button after you've created 
it. I would suggest you look at the click() method in the jQuery docs 
for ideas and examples of how to manage that.


Rey...

lukas wrote:

My PHP code creates a button which doesn't exist when my page is
loaded.  Hence, the according jQuery command doesn't work. How can I
fix this? Thank you!



[jQuery] Re: Tablesorter 2.0.3 - Sorting af column of checkboxes (resorting)

2008-09-05 Thread MorningZ

that doesn't sound right

because anything inside the td/td tag would be treated as text
*unless* the built in parsers couldn't figure out what to do with them
(or a custom parser was defined)

so the columns could be like

tdA/tdtdinput type=checkbox checked=checked //td
tdB/tdtdinput type=checkbox //td
tdC/tdtdinput type=checkbox //td
tdD/tdtdinput type=checkbox checked=checked //td
tdE/tdtdinput type=checkbox checked=checked //td

and it would sort

tdB/tdtdinput type=checkbox //td
tdC/tdtdinput type=checkbox //td
tdA/tdtdinput type=checkbox checked=checked //td
tdD/tdtdinput type=checkbox checked=checked //td
tdE/tdtdinput type=checkbox checked=checked //td

because

input type=checkbox /

comes before

input type=checkbox checked=checked /



[jQuery] Re: How to apply jQuery to an item which doesn't exist when the page is loaded.

2008-09-05 Thread Ryan Zec

If you use the livequery plugin, it will apply trigger events like
click on element that are not available when the dom is first loaded.

On Fri, Sep 5, 2008 at 10:49 AM, lukas [EMAIL PROTECTED] wrote:

 My PHP code creates a button which doesn't exist when my page is
 loaded.  Hence, the according jQuery command doesn't work. How can I
 fix this? Thank you!



[jQuery] Store JSON object in cookie

2008-09-05 Thread Sam Collett

If you try and store and retrieve a JSON object in a cookie using the
cookie plugin (http://plugins.jquery.com/project/cookie), you get an
unexpected result.

For instance, save into cookie:
$.cookie(mydata, {foo:bar,baz:1});

Retrieve value:
var mydata = $.cookie(mydata);

But that returns [object Object]


A json parser (e.g. http://www.json.org/js.html) has to be used.

Using this script, you can 'stringify' the object before storing it:
$.cookie(mydata, JSON.stringify({foo:bar,baz:1}));

Then you retrieve it and use JSON.parse:
var mydata = JSON.parse($.cookie(mydata));


While this is a workaround, perhaps it may be a good idea if the
cookie plugin did this automatically (i.e. convert object to string
and back again)?

Rather than building in JSON parsing, maybe make the json.org parser a
prerequisite?

Then a check is done in the plugin code:

if(typeof JSON != undefined)
{
if(typeof value == object)
value = JSON.stringify(value);
}


[jQuery] Superfish - display2 deep and have mouseover for anything deeper

2008-09-05 Thread Mike Henke

I have the default vertical menu working great but I would like the
first and second deep items to display and anything deeper have the
mouseover slide-down animation.  Any ideas how to accomplish this.  I
am very new to jQuery :-)


Example:
li class=
a href=#a class=sf-with-ulFirst Levelspan class=sf-sub-
indicator »/span/a
ul class=depth1, current style=display: none; visibility:
hidden;
lia href=#a class=sf-with-ulSecond Level/a
li class=current
a href=#ab 
class=sf-with-ulSecond Level 2span class=sf-
sub-indicator »/span/a
ul 
style=display: none; visibility: hidden;
li 
class=currenta href=#Third Level/a/li
lia 
href=#abamenu item/a/li
lia 
href=#abbmenu item/a/li
lia 
href=#abcmenu item/a/li
lia 
href=#abdmenu item/a/li
/ul
/li
/li
lia href=#a class=sf-with-ulWelcome/a/li
/ul
/li


[jQuery] Re: How to apply jQuery to an item which doesn't exist when the page is loaded.

2008-09-05 Thread S P Arif Sahari Wibowo

On Fri, 5 Sep 2008, lukas wrote:
 My PHP code creates a button which doesn't exist when my page 
 is loaded.  Hence, the according jQuery command doesn't work.

Not sure what you meant. For server-side scripting - such as PHP 
- loading a page is the only way for the script to create HTML 
objects - including buttons. So what you said does not make any 
sense. Are you talking about XMLHttpRequest / AJAX request?

Maybe you should point to an example page + source.

-- 
  (stephan paul) Arif Sahari Wibowo
_  _  _  _
   /  // // /
  _/ /  // _/  http://www.arifsaha.com/


[jQuery] Displaying a pdf report

2008-09-05 Thread gummybears

Hi,

In my application I have a input form where the user can set a date
range (years,months,quarters).
The input is sent to the server via a call made with

$('form_id').ajaxSubmit({
dataType: 'script',
beforeSend: function(xhr) {xhr.setRequestHeader(Accept, text/
javascript);}
});

Depending on the input, the server will query the database and when
data is found,
a html table is dynamically displayed containing a link where the user
can download a pdf version
of the data.

When the user clicks on the link another ajax call is made to retrieve
the pdf data. My server
recognizes this request and via a Ruby on Rails call to  send_data
(application/pdf, disposition inline),
the server sends the pdf data to the client.

My problem is that the client does not start the pdf reader ?
Hope someone can help me.

Thanks
WN


[jQuery] Re: .ajax POST question, script stops.

2008-09-05 Thread Ca-Phun Ung

[EMAIL PROTECTED] wrote:
 \$(.button).hover(function () {
 var color = \$(input#color_code).val();
 var p_color = \$(this).css(background-color);
 \$(this).css({ backgroundColor:color });
 }, function () {
 \$(this).css(background-color) == p_color;
 });
   

Not sure if this is the problem (or just a typo in your posting) but you 
have a double equal operator in the second last line. If that doesn't 
correct the problem it'll be great if you could post a demo page online 
so we could better help you. It's always easier to read code than to 
imagine it.


[jQuery] Does anyone know what $('div.myclass img[src$=png]').click(function(){ $(this).parents('div.myclass').hide('slow'); }) does?

2008-09-05 Thread Syn-UX

If you can, then I would shamelessly ask you to go to right way
http://www.synacor.com/jobs and discover the kind of coolness that a
career at our company offers!

We are sorely in need of expert jQuery hackers and are recruiting for
GUI Developer and GUI Engineer positions. Did I mention we have a 25
cent vending machine, movie popcorn maker, a sweet Ms. Vienna espresso
maker with fresh beans delivered daily? Not to mention, an awesome
office location right on the Buffalo, NY waterfront?

Now, you might be saying, Buffalo???!!! Forget it! and you'd be dead
wrong. Buffalo is one of the most fun (and cheapest) cities in the US.
And with a Synacor gig - you're golden here.

So, sorry for the shameless post, but we're looking for the best and
brightest to join our team and do some really cool UI work. Hope to
hear from some of you. Cheers!

Michael Collins
GUI Architect/Manager UX Architecture
Synacor, Inc.
[EMAIL PROTECTED]



[jQuery] fix a few simple things

2008-09-05 Thread [EMAIL PROTECTED]

Hello, I have been playing with jQuery for the last month or so and
was wondering if some one could help me out with a few issues I've
been having...

The test page is
http://www.sjrmc.org/Scripts/jquery.ui-1.6b/demos/functional/Untitled-1.html

The issues is the... if when the page loads and some one closes the
top boxes the boxes below move up... that is a problem when you drag
the bottom one close to the top then close the box the started off
above it.  It last box the was drug to the top now moves up past the
page top making impossible to move it... hope that is clear...

The second issue is for some odd reason I can't get the boxes to
respect the size of the i-frame I put in...

I think that is it although there is one more thing that I know I need
to work on... in the script... start: function() { $(this).css(z-
index, ++globalIndex); }, is repeated many times... but all tries to
it as a global function has failed any help there would be great to...
thank you and have a great day...
jeremyBass



the jQuery test script (the long goal is to make a dynamic version
were the boxes are created on the fly):
script type=text/javascript
$(function(){
var globalIndex  = 1;
$(#simpleDiv).resizable({start: function() { $(this).css(z-index, +
+globalIndex); }, handles: all, autoHide: true, transparent: true,
helper: proxy , ghost: true }).draggable({start: function() { $
(this).css(z-index, ++globalIndex); }, handle:
div }).click(function() { $(this).css(z-index, ++globalIndex); });
$(#simpleDiv2).resizable({start: function() { $(this).css(z-index,
++globalIndex); }, handles: all, autoHide: true, transparent: true,
helper: proxy , ghost: true }).draggable({start: function() { $
(this).css(z-index, ++globalIndex); }, handle:
div }).click(function() { $(this).css(z-index, ++globalIndex); });
$(#simpleDiv3).resizable({start: function() { $(this).css(z-index,
++globalIndex); }, handles: all, autoHide: true, transparent: true,
helper: proxy , ghost: true }).draggable({start: function() { $
(this).css(z-index, ++globalIndex); }, handle:
div }).click(function() { $(this).css(z-index, ++globalIndex); });
$(#doScale).click(function() { $(.scalefx).toggle(scale, {},
200).remove(210); });
$(#doScale2).click(function() { $(.scalefx2).toggle(scale, {},
200).remove(210); });
$(#doScale3).click(function() { $(.scalefx3).toggle(scale, {},
200).remove(210); });
});
$(function() {
var $frame = $('iframe style=width:100%; height:100%;');
$('#replaceME').html( $frame );
setTimeout( function() {
var doc = $frame[0].contentWindow.document;
var $body = $('body',doc);
$body.html('h1Test/h1h1Test/h1h1Test/
h1h1Test/h1h1Test/h1');
}, 1 );
});
/script


[jQuery] firefox2 parsererror in jquery .ajax but not in browser

2008-09-05 Thread AstroIvan

I'm trying to access an xml document via .ajax but it goes to the
error handler... I get no properties in the errorThrown object, and
the only clue I have is textStatus which tells me parsererror
only.

more clues:
- if i directly access the xml document/request firefox can parse it
fine and displays the raw xml
- firebug shows headers and response document
- content type correctly set
- ie7/ff3 works fine

Thanks in advance!



[jQuery] Re: How to apply jQuery to an item which doesn't exist when the page is loaded.

2008-09-05 Thread hazy

Look at the livequery plugin.

On Sep 5, 3:49 pm, lukas [EMAIL PROTECTED] wrote:
 My PHP code creates a button which doesn't exist when my page is
 loaded.  Hence, the according jQuery command doesn't work. How can I
 fix this? Thank you!


[jQuery] Superfish

2008-09-05 Thread ric

hi,

I have a question referring to superfish.

My horizontal dropdown menu looks like.
- red background and white font.
- hover: white background and red font.

Added the Color in the following section:
.sf-menu li:hover, .sf-menu li.sfHover,
.sf-menu a:focus, .sf-menu a:hover, .sf-menu a:active {
background:#FFF;
outline:0;
color:#D1001A;
}

Works fine till now :-)

- if I move over a menu and then move to
  a submenu the submneu changes to white backgr.
  and red font BUT in the first menu the font color
  changes also to white. So the text disappears.

Do you know where I must change the CSS?

And how can I reduce the heigth of the menu?


greetings

Erick

 MY superfish.css #

/*** ESSENTIAL STYLES ***/
.sf-menu, .sf-menu * {
margin:0;
padding:0;
list-style:none;
}
.sf-menu {
line-height:1.0;
}
.sf-menu ul {
position:absolute;
top:-999em;
width:10em; /* left offset of submenus need to match
(see below) */
}


.sf-menu ul li {
width:100%;
font-weight:bold;
}

.sf-menu li:hover {
visibility:inherit; /* fixes IE7 'sticky bug' */
}

.sf-menu li {
float:left;
position:relative;
font-weight:bold;
}
.sf-menu a {
display:block;
position:relative;
}
.sf-menu li:hover ul,
.sf-menu li.sfHover ul {
left:0;
top:2.5em; /* match top ul list item height */
z-index:99;
}
ul.sf-menu li:hover li ul,
ul.sf-menu li.sfHover li ul {
top:-999em;
}
ul.sf-menu li li:hover ul,
ul.sf-menu li li.sfHover ul {
left:10em; /* match ul width */
top:0;
}
ul.sf-menu li li:hover li ul,
ul.sf-menu li li.sfHover li ul {
top:-999em;
}
ul.sf-menu li li li:hover ul,
ul.sf-menu li li li.sfHover ul {
left:10em; /* match ul width */
top:0;
}

/*** DEMO SKIN ***/
.sf-menu {
float:left;
margin-bottom:1em;
}
.sf-menu a {
border-left:0px solid #fff;
border-top:0px solid #FFF;
padding: .75em 1em;
text-decoration:none;
}
.sf-menu a, .sf-menu a:visited  { /* visited pseudo selector so IE6
applies text colour*/
color:#FFF;
}
.sf-menu li {
background:#D1001A;
}
.sf-menu li li {
background:#D1001A;
}
.sf-menu li li li {
background:#9AAEDB;
}
.sf-menu li:hover, .sf-menu li.sfHover,
.sf-menu a:focus, .sf-menu a:hover, .sf-menu a:active {
background:#FFF;
outline:0;
color:#D1001A;
}

/*** arrows **/
.sf-menu a.sf-with-ul {
padding-right: 2.25em;
min-width:1px; /* trigger IE7 hasLayout so spans position
accurately */
}
.sf-sub-indicator {
position:absolute;
display:block;
right:.75em;
top:1.05em; /* IE6 only */
width:10px;
height:10px;
text-indent: -999em;
overflow:hidden;
background:url('../images/arrows-ff.png') no-repeat
-10px -100px; /* 8-bit indexed alpha png. IE6 gets solid image only */
}
a  .sf-sub-indicator {  /* give all except IE6 the correct values */
top:.8em;
background-position: 0 -100px; /* use translucent arrow for modern
browsers*/
}
/* apply hovers to modern browsers */
a:focus  .sf-sub-indicator,
a:hover  .sf-sub-indicator,
a:active  .sf-sub-indicator,
li:hover  a  .sf-sub-indicator,
li.sfHover  a  .sf-sub-indicator {
background-position: -10px -100px; /* arrow hovers for modern
browsers*/
}

/* point right for anchors in subs */
.sf-menu ul .sf-sub-indicator { background-position:  -10px 0; }
.sf-menu ul a  .sf-sub-indicator { background-position:  0 0; }
/* apply hovers to modern browsers */
.sf-menu ul a:focus  .sf-sub-indicator,
.sf-menu ul a:hover  .sf-sub-indicator,
.sf-menu ul a:active  .sf-sub-indicator,
.sf-menu ul li:hover  a  .sf-sub-indicator,
.sf-menu ul li.sfHover  a  .sf-sub-indicator {
background-position: -10px 0; /* arrow hovers for modern
browsers*/
}

/*** shadows for all but IE6 ***/
.sf-shadow ul {
background:url('../images/shadow.png') no-repeat bottom right;
padding: 0 8px 9px 0;
-moz-border-radius-bottomleft: 17px;
-moz-border-radius-topright: 17px;
-webkit-border-top-right-radius: 17px;
-webkit-border-bottom-left-radius: 17px;
}
.sf-shadow ul.sf-shadow-off {
background: transparent;
}

#


[jQuery] Triggering a click

2008-09-05 Thread jerpod

I've got some html that looks like this:

div class=awardheading
  img class=plusminus src=/images/plus.gif Some text here. a
class=nominatelink href=#Make your nomination./a/div

div class=awardnomination
This is award info
/div

A click on the plusminus image shows/hides the awardnomination div.
That's working.  I also want a click on the nominatelink to trigger a
click on the image...since I've already got that working.

I thought something like:

$(this).parent().next('img').trigger('click')

would work but I get nothing when clicking the link.  Thanks in
advance!

jp


[jQuery] Slidemenu + Image Problem

2008-09-05 Thread Gmail PHP

Hi there, i've a slidemenu panel, and when i put some image inside this 
panel, or add a background-image, the links inside don't work, the 
images don't show and the input doesn't seen to work, it seens there is 
something over those objects, someone can help-me?

P.S.: It works fine in FF an IE7, only in IE6 that doesn't work, and 
another think, i'm brazilian, PT-EN!!

script type=text/javascript
$(document).ready(function(){
$(.btn-slide).click(function(){
$(#painel).slideToggle(slow);
$(this).toggleClass(active); return false;
});
});
/script


!-- Painel --
div class=p_painel

!-- Conteudo Painel --
div id=painel
   
div id=painel1
span class=texto5LOGIN |/span a href=# 
class=texto6Não é cadastrado?/a
/div
   
div id=painel2

div id=painel21
** These don´t work*
input type=txt class=input5
input type=password class=input5
/div
div id=painel22
** This doen´t show *
img src=images/slidepanel/ok.png  
style=position:relative;
/div
/div
   
!-- Conteudo Painel --   
/div
   
!-- Botão Painel --
div align=right class=aba
div class=btn-slide align=leftspan id=valorR$ 
(0,00)/span/div
/div
   
!-- Fim  Painel --
/div

css

/* Tamanho do Painel */
#painel {height:90px;;width:339px;display:none;position:relative;}

#painel1{padding-top:15px;height:19px;padding-left:15px;width:324px;}

#painel2{padding-top:13px;height:43px;padding-left:15px;width:324px;}
#painel21{height:20px;width:280px;background-color:red;}

#painel22{height:20px;width:30px;margin-top:-20px;margin-lefT:280px;}
/* Posição do Painel na Tela */
.p_painel {position:absolute;margin-left:620px;}
/* Toda a Aba = a largura do Painel */
.aba {width:339px;}
/* Área do botão qnd ñ ativa */
.btn-slide {font-family:Trebuchet 
MS;font-size:10px;padding-top:7px;padding-left:98px;width:65px;height:23px;color:#fff;text-decoration:none;background-image:url(../images/slidepanel/back_login1.png);cursor:pointer}
/* Área do botão qnd ativa */
.active 
{margin:0;padding:0;padding-top:7px;padding-left:98px;width:65px;height:23px;background-image:url(../images/slidepanel/back_login2.png);cursor:pointer}


[jQuery] Question about :contains filter

2008-09-05 Thread nabrown78

I am trying to select a list element that contains the text
ladies#8217; short-sleeve tee. I have tried

$(li:contains(ladies' short-sleeve tee)).addClass(selected);
$(li:contains('ladies\' short-sleeve tee')).addClass(selected);
$(li:contains(ladies#8217; short-sleeve tee)).addClass(selected);
 and
$(li:contains(ladies%27 short-sleeve tee)).addClass(selected);

with no luck. Does anyone know how I might accomplish this? I don't
know if jquery sees the html entity, or the apostrophe, and I think
even if I did know the answer to that, I still couldn't figure it
out.

Any help is much appreciated.



[jQuery] Re: Does anyone know what $('div.myclass img[src$=png]').click(function(){ $(this).parents('div.myclass').hide('slow'); }) does?

2008-09-05 Thread Ca-Phun Ung

I know!!! That is too simple for a top jQuery hacker. I think you'd find 
most people in this list knows the answer too!

Tempted to give the answer but don't want to spoil it for others :P


[jQuery] Re: fix a few simple things

2008-09-05 Thread [EMAIL PROTECTED]

Ok I forgot that this was in there... doesn't fix anything but
this : .remove(210) is not in the script... it was meant to remove the
item from the dom after the toggle animation which lasts 200 ... I'm
still try to think how to do the timed .remove, and I'm open to
ideas... any ways the main focus for me right now is the above stuff,
I just wanted to be clear... thanks for the help
jeremyBass


On Sep 5, 8:43 am, [EMAIL PROTECTED] [EMAIL PROTECTED]
wrote:
 Hello, I have been playing with jQuery for the last month or so and
 was wondering if some one could help me out with a few issues I've
 been having...

 The test page 
 ishttp://www.sjrmc.org/Scripts/jquery.ui-1.6b/demos/functional/Untitled...

 The issues is the... if when the page loads and some one closes the
 top boxes the boxes below move up... that is a problem when you drag
 the bottom one close to the top then close the box the started off
 above it.  It last box the was drug to the top now moves up past the
 page top making impossible to move it... hope that is clear...

 The second issue is for some odd reason I can't get the boxes to
 respect the size of the i-frame I put in...

 I think that is it although there is one more thing that I know I need
 to work on... in the script... start: function() { $(this).css(z-
 index, ++globalIndex); }, is repeated many times... but all tries to
 it as a global function has failed any help there would be great to...
 thank you and have a great day...
 jeremyBass

 the jQuery test script (the long goal is to make a dynamic version
 were the boxes are created on the fly):
 script type=text/javascript
                                 $(function(){
                                 var globalIndex  = 1;
 $(#simpleDiv).resizable({start: function() { $(this).css(z-index, +
 +globalIndex); }, handles: all, autoHide: true, transparent: true,
 helper: proxy , ghost: true }).draggable({start: function() { $
 (this).css(z-index, ++globalIndex); }, handle:
 div }).click(function() { $(this).css(z-index, ++globalIndex); });
 $(#simpleDiv2).resizable({start: function() { $(this).css(z-index,
 ++globalIndex); }, handles: all, autoHide: true, transparent: true,
 helper: proxy , ghost: true }).draggable({start: function() { $
 (this).css(z-index, ++globalIndex); }, handle:
 div }).click(function() { $(this).css(z-index, ++globalIndex); });
 $(#simpleDiv3).resizable({start: function() { $(this).css(z-index,
 ++globalIndex); }, handles: all, autoHide: true, transparent: true,
 helper: proxy , ghost: true }).draggable({start: function() { $
 (this).css(z-index, ++globalIndex); }, handle:
 div }).click(function() { $(this).css(z-index, ++globalIndex); });
 $(#doScale).click(function() { $(.scalefx).toggle(scale, {},
 200).remove(210); });
 $(#doScale2).click(function() { $(.scalefx2).toggle(scale, {},
 200).remove(210); });
 $(#doScale3).click(function() { $(.scalefx3).toggle(scale, {},
 200).remove(210); });
         });
             $(function() {
         var $frame = $('iframe style=width:100%; height:100%;');
         $('#replaceME').html( $frame );
         setTimeout( function() {
             var doc = $frame[0].contentWindow.document;
             var $body = $('body',doc);
             $body.html('h1Test/h1h1Test/h1h1Test/
 h1h1Test/h1h1Test/h1');
         }, 1 );
     });
 /script


[jQuery] Re: Triggering a click

2008-09-05 Thread Paul Thiel

At a glance it looks as though you are targeting the wrong element.
The parent() takes you to the DIV and the next() takes you to the next
DIV (awardnomination).  Just use $(this).prev('img').trigger('click')
or similar.

On Sep 5, 9:06 am, jerpod [EMAIL PROTECTED] wrote:
 I've got some html that looks like this:

 div class=awardheading
   img class=plusminus src=/images/plus.gif Some text here. a
 class=nominatelink href=#Make your nomination./a/div

 div class=awardnomination
         This is award info
 /div

 A click on the plusminus image shows/hides the awardnomination div.
 That's working.  I also want a click on the nominatelink to trigger a
 click on the image...since I've already got that working.

 I thought something like:

 $(this).parent().next('img').trigger('click')

 would work but I get nothing when clicking the link.  Thanks in
 advance!

 jp


[jQuery] Re: Triggering a click

2008-09-05 Thread Ca-Phun Ung

Try:

$('.nominatelink').click(function(e){
  $(this).siblings('img').trigger('click');
  e.preventDefault();
});


[jQuery] Re: Does anyone know what $('div.myclass img[src$=png]').click(function(){ $(this).parents('div.myclass').hide('slow'); }) does?

2008-09-05 Thread [EMAIL PROTECTED]

I'm a little new at this... but fade out of div of .myclass on click
of any png in a div of .myclass?  had to take a shot :)
jeremyBass

On Sep 5, 8:49 am, Syn-UX [EMAIL PROTECTED] wrote:
 If you can, then I would shamelessly ask you to go to right 
 wayhttp://www.synacor.com/jobsand discover the kind of coolness that a
 career at our company offers!

 We are sorely in need of expert jQuery hackers and are recruiting for
 GUI Developer and GUI Engineer positions. Did I mention we have a 25
 cent vending machine, movie popcorn maker, a sweet Ms. Vienna espresso
 maker with fresh beans delivered daily? Not to mention, an awesome
 office location right on the Buffalo, NY waterfront?

 Now, you might be saying, Buffalo???!!! Forget it! and you'd be dead
 wrong. Buffalo is one of the most fun (and cheapest) cities in the US.
 And with a Synacor gig - you're golden here.

 So, sorry for the shameless post, but we're looking for the best and
 brightest to join our team and do some really cool UI work. Hope to
 hear from some of you. Cheers!

 Michael Collins
 GUI Architect/Manager UX Architecture
 Synacor, Inc.
 [EMAIL PROTECTED]


[jQuery] Re: Triggering a click

2008-09-05 Thread [EMAIL PROTECTED]

$(this).parent().next('img').click();

then you can insert a function hope that helps...
jereyBass

On Sep 5, 9:06 am, jerpod [EMAIL PROTECTED] wrote:
 I've got some html that looks like this:

 div class=awardheading
   img class=plusminus src=/images/plus.gif Some text here. a
 class=nominatelink href=#Make your nomination./a/div

 div class=awardnomination
         This is award info
 /div

 A click on the plusminus image shows/hides the awardnomination div.
 That's working.  I also want a click on the nominatelink to trigger a
 click on the image...since I've already got that working.

 I thought something like:

 $(this).parent().next('img').trigger('click')

 would work but I get nothing when clicking the link.  Thanks in
 advance!

 jp


[jQuery] Re: jqModal - How to access the iframe from the parent

2008-09-05 Thread Francesc Rosàs

What about this?

parent.jQuery('#modalWindow').jqmHide()

I've tried something similar in IE 6  7, Firefox 3, Opera 9.5, Safari
3.1.2 and even Google Chrome and it seems to work.


[jQuery] Re: Tablesorter 2.0.3 - Sorting af column of checkboxes (resorting)

2008-09-05 Thread tlphipps

By default the tablesorter code uses some algorithm(s) to try and
'figure out' where the text starts. So it skips HTML entities (maybe
not all, but some).

Take a look at the textExtraction methods that are built into the code
and you'll see what I'm talking about.

On Sep 5, 9:54 am, MorningZ [EMAIL PROTECTED] wrote:
 that doesn't sound right

 because anything inside the td/td tag would be treated as text
 *unless* the built in parsers couldn't figure out what to do with them
 (or a custom parser was defined)

 so the columns could be like

 tdA/tdtdinput type=checkbox checked=checked //td
 tdB/tdtdinput type=checkbox //td
 tdC/tdtdinput type=checkbox //td
 tdD/tdtdinput type=checkbox checked=checked //td
 tdE/tdtdinput type=checkbox checked=checked //td

 and it would sort

 tdB/tdtdinput type=checkbox //td
 tdC/tdtdinput type=checkbox //td
 tdA/tdtdinput type=checkbox checked=checked //td
 tdD/tdtdinput type=checkbox checked=checked //td
 tdE/tdtdinput type=checkbox checked=checked //td

 because

 input type=checkbox /

 comes before

 input type=checkbox checked=checked /


[jQuery] Re: Question about :contains filter

2008-09-05 Thread Ca-Phun Ung

nabrown78 wrote:
 I am trying to select a list element that contains the text
 ladies#8217; short-sleeve tee. I have tried

 $(li:contains(ladies' short-sleeve tee)).addClass(selected);
 $(li:contains('ladies\' short-sleeve tee')).addClass(selected);
 $(li:contains(ladies#8217; short-sleeve tee)).addClass(selected);
  and
 $(li:contains(ladies%27 short-sleeve tee)).addClass(selected);
   
Try this (hope the apostrophe renders correctly when it gets to your end):

$('li:contains(ladies’ short-sleeve tee)').addClass(selected);

Explanation:

#8217; = rsquo; = ’ != '



[jQuery] Cappucino's FlickrDemo in 45 lines of jQuery

2008-09-05 Thread Ben Sargent

After reading about the release of the Cappuccino web application
framework a few days ago, I thought I'd take a stab at re-implementing
one of their demos in jQuery. Cappuccino is obviously a huge framework
with tons of features, but I don't think jQuery can be dismissed quite
so easily in favour of something so heavy.

This took me about 3 hours. It's probably not perfectly optimized, and
I took a few CSS shortcuts that only work in Gecko and WebKit.

http://www.brokendigits.com/2008/09/05/cappucinos-flickrdemo-in-45-lines-of-jquery/

Enjoy!

ben


[jQuery] MooTools to jQuery

2008-09-05 Thread israel.hayes

Hi,

I was using MooTools before and I'm kinda new to jQuery, I'd like to
know how you would modify this to use it in jQuery, Thanks,

- Israel

window.addEvent('domready', function()
{
var Boites = $$('.Boite');

Boites.each(function(Boite)
{
var Lien = Boite.getElement('a');

Lien.addEvent('click', function()
{
var Boite = Lien.getParent();
var Contenu = Boite.getElement('div');

if(Contenu.style.display == none)
{
Contenu.style.display = block;
}
else
{
Contenu.style.display = none;
}
});

var Contenu = Boite.getElement('div');
Contenu.style.display = 'none';
});
});


[jQuery] MooTools to jQuery

2008-09-05 Thread israel.hayes

Hi,

I was using MooTools before and I'm kinda new to jQuery, I'd like to
know how you would modify this to use it in jQuery, Thanks,

- Israel

window.addEvent('domready', function()
{
var Boites = $$('.Boite');

Boites.each(function(Boite)
{
var Lien = Boite.getElement('a');

Lien.addEvent('click', function()
{
var Boite = Lien.getParent();
var Contenu = Boite.getElement('div');

if(Contenu.style.display == none)
{
Contenu.style.display = block;
}
else
{
Contenu.style.display = none;
}
});

var Contenu = Boite.getElement('div');
Contenu.style.display = 'none';
});
});


[jQuery] Re: Triggering a click

2008-09-05 Thread jerpod

Thanks Ca-Phun Ung...that's exactly what I needed.

jp

On Sep 5, 11:25 am, Ca-Phun Ung [EMAIL PROTECTED] wrote:
 Try:

 $('.nominatelink').click(function(e){
   $(this).siblings('img').trigger('click');
   e.preventDefault();

 });


[jQuery] Re: porn here

2008-09-05 Thread Karl Swedberg
Thanks for the heads up on this. I've gone in and removed all the spam  
comments from the entry. If you see other entries being spammed like  
this, definitely let us know. But, as Gordon noted, a better subject  
line would help. :-)


thanks again,

--Karl


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




On Sep 5, 2008, at 3:25 AM, tlob wrote:



in the comment section:
http://jquery.com/blog/2007/02/17/the-jquery-irc-channel/




[jQuery] Convert MooTools to jQuery

2008-09-05 Thread israel.hayes

Hi,

I was using MooTools before and I'm kinda new to jQuery, I'd like to
know how you would modify this to use it in jQuery, Thanks,

- Israel

window.addEvent('domready', function()
{
var Boites = $$('.Boite');

Boites.each(function(Boite)
{
var Lien = Boite.getElement('a');

Lien.addEvent('click', function()
{
var Boite = Lien.getParent();
var Contenu = Boite.getElement('div');

if(Contenu.style.display == none)
{
Contenu.style.display = block;
}
else
{
Contenu.style.display = none;
}
});

var Contenu = Boite.getElement('div');
Contenu.style.display = 'none';
});
});


[jQuery] Re: firefox2 parsererror in jquery .ajax but not in browser

2008-09-05 Thread AstroIvan

I've isolated it to a document.domain issue.

one js file is setting document domani to the second level.
ajax is attempting to use the full subdomain.

for some reason this only is an issue in ff2.

i'll find the fix and post it here for records.

thanks!


[jQuery] Re: Convert MooTools to jQuery

2008-09-05 Thread Brandon Aaron
This should be the equivalent in jQuery code.
$(document).bind('ready', function() {
$('.Boite')
.find('div').hide().end()
.find('a')
.bind('click', function(event) {
$(this).parent().find('div').toggle();
})
});

--
Brandon Aaron

On Fri, Sep 5, 2008 at 12:38 PM, israel.hayes [EMAIL PROTECTED]wrote:


 Hi,

 I was using MooTools before and I'm kinda new to jQuery, I'd like to
 know how you would modify this to use it in jQuery, Thanks,

 - Israel

 window.addEvent('domready', function()
 {
var Boites = $$('.Boite');

Boites.each(function(Boite)
{
var Lien = Boite.getElement('a');

Lien.addEvent('click', function()
{
var Boite = Lien.getParent();
var Contenu = Boite.getElement('div');

if(Contenu.style.display == none)
{
Contenu.style.display = block;
}
else
{
Contenu.style.display = none;
}
});

var Contenu = Boite.getElement('div');
Contenu.style.display = 'none';
});
 });



[jQuery] Re: Convert MooTools to jQuery

2008-09-05 Thread real

$(function(){
$('.Boite').each(function(){
$(this).find('div').hide();
});

$('.Boite a').click(function(){
$(this).parent().find('div').toggle();
});
})

On Sep 5, 1:38 pm, israel.hayes [EMAIL PROTECTED] wrote:
 Hi,

 I was using MooTools before and I'm kinda new to jQuery, I'd like to
 know how you would modify this to use it in jQuery, Thanks,

 - Israel

 window.addEvent('domready', function()
 {
     var Boites = $$('.Boite');

     Boites.each(function(Boite)
     {
         var Lien = Boite.getElement('a');

         Lien.addEvent('click', function()
         {
             var Boite = Lien.getParent();
             var Contenu = Boite.getElement('div');

             if(Contenu.style.display == none)
             {
                 Contenu.style.display = block;
             }
             else
             {
                 Contenu.style.display = none;
             }
         });

         var Contenu = Boite.getElement('div');
         Contenu.style.display = 'none';
     });

 });


[jQuery] Re: Cappucino's FlickrDemo in 45 lines of jQuery

2008-09-05 Thread Josh Nathanson


Thanks Ben, that's really cool that you did that.

-- Josh


- Original Message - 
From: Ben Sargent [EMAIL PROTECTED]

To: jQuery (English) jquery-en@googlegroups.com
Sent: Friday, September 05, 2008 10:22 AM
Subject: [jQuery] Cappucino's FlickrDemo in 45 lines of jQuery




After reading about the release of the Cappuccino web application
framework a few days ago, I thought I'd take a stab at re-implementing
one of their demos in jQuery. Cappuccino is obviously a huge framework
with tons of features, but I don't think jQuery can be dismissed quite
so easily in favour of something so heavy.

This took me about 3 hours. It's probably not perfectly optimized, and
I took a few CSS shortcuts that only work in Gecko and WebKit.

http://www.brokendigits.com/2008/09/05/cappucinos-flickrdemo-in-45-lines-of-jquery/

Enjoy!

ben 




[jQuery] Re: Cappucino's FlickrDemo in 45 lines of jQuery

2008-09-05 Thread Andy Matthews

Are you supposed to be able to open the picture and view it large? Because
that's what I would expect to be able to do. That doesn't work in either
version, (yours or theirs). 

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Ben Sargent
Sent: Friday, September 05, 2008 12:23 PM
To: jQuery (English)
Subject: [jQuery] Cappucino's FlickrDemo in 45 lines of jQuery


After reading about the release of the Cappuccino web application framework
a few days ago, I thought I'd take a stab at re-implementing one of their
demos in jQuery. Cappuccino is obviously a huge framework with tons of
features, but I don't think jQuery can be dismissed quite so easily in
favour of something so heavy.

This took me about 3 hours. It's probably not perfectly optimized, and I
took a few CSS shortcuts that only work in Gecko and WebKit.

http://www.brokendigits.com/2008/09/05/cappucinos-flickrdemo-in-45-lines-of-
jquery/

Enjoy!

ben




[jQuery] Re: Autorefreshing DIV

2008-09-05 Thread real

setInterval(function(){
$('#my_refreshable_div').load('some_folder/my_div_content.html');
}, 2000)

On Sep 1, 7:02 am, Sir Rawlins [EMAIL PROTECTED]
wrote:
 Good morning all,

 I have a requirement to automaticly refresh a DIV with some content
 from another URL every couple of seconds and was hoping to get your
 opinions on how this is best handled.

 For instance, I have a div which looks like this:

 div id=my_refreshable_div
 /div

 I dont need a full blown AJAX call as I simply want to fill this div
 with the content from a remote file every few seconds, for instance. /
 some_folder/my_div_content.html.

 I've currently got a working Spry (sorry for swearing) example on the
 page but as part of our move over to jQuery (woohoo) I'm looking for
 your thoughts on how best to achieve this!?!

 Many thanks for your thoughts guys,

 Robert


[jQuery] Re: Triggering a click

2008-09-05 Thread Ca-Phun Ung

jerpod wrote:
 Thanks Ca-Phun Ung...that's exactly what I needed.

   

Cool :)


[jQuery] superfish - item height question

2008-09-05 Thread snlsn

Hello;

I'm working at integrating the superfish menu into a site I'm
redesigning. It's fabulous (the menu, not  the site!). Here's my issue
though. I am employing it as a horizontal drop down menu. I have the
menu ul contained in an absolutely positioned div. This div
element has been given a width of 100% and a height of 28px.

The menu itself is not wide enough to span the width of the page, so I
assigned a background color to the containing div element that
matches the color of the inactive state of the superfish menu item.

Because the menu items are sized in ems I noticed that when I increase
font size the menu items get taller than the containing div. I have
looked through the code but can't see where height is specified for
the top level li elements. Any tips on how I can keep the menu and
the containing div the same height regardless of what the user does
with font size?

Thanks.

Steve


[jQuery] need help with $.post with callback function in submit button

2008-09-05 Thread nananannae2

Is there any difference between $.post with callback function in a
submit button vs a regular input button?

When my submit button tries to post and get the callback result it
never happens.

Thanks!


[jQuery] Re: fix a few simple things

2008-09-05 Thread Ca-Phun Ung

Hi

[EMAIL PROTECTED] wrote:
 The issues is the... if when the page loads and some one closes the
 top boxes the boxes below move up... that is a problem when you drag
 the bottom one close to the top then close the box the started off
 above it.  It last box the was drug to the top now moves up past the
 page top making impossible to move it... hope that is clear...
   
If you give the boxes position:absolute they should stay put.

 The second issue is for some odd reason I can't get the boxes to
 respect the size of the i-frame I put in...
   
functional_demos.css line 102: You're setting the boxes width and height 
to 100px. That would be why they're not expanding to the i-frames size.

 I think that is it although there is one more thing that I know I need
 to work on... in the script... start: function() { $(this).css(z-
 index, ++globalIndex); }, is repeated many times... but all tries to
 it as a global function has failed any help there would be great to...
 thank you and have a great day...
   
This bit seems to work?



[jQuery] Re: Stumped by AJAX and events

2008-09-05 Thread JDawson

I finally figured it out! The input was in a form, so the implicit
form submit was apparently interfering with the AJAX callback.

This doesn't work:

form id=subscriptionForm action= method=post
  input type=image id=btn_recipient_search src=/IdeaStore/images/
btn_search.gif alt=Search /
  ...
/form

This does:

form id=subscriptionForm action= method=post
  a href=# id=btn_recipient_searchimg src=/IdeaStore/images/
btn_search.gif alt=Search //a
  ...
/form

John

On Sep 4, 11:23 pm, Jack Killpatrick [EMAIL PROTECTED] wrote:
 Sounds like you might having a caching issue. Try these:

 once:

 $.ajaxSetup({cache:false}); // global setting to prevent caching

 then do your $.get's as you have them. Or:

 append a timestamp to your get url:

 $.get(recipients.xml? + new Date().valueOf().toString(),

 - Jack

 JDawson wrote:
  I am trying to use .get in a click handler to load some XML, as shown
  below. The handler will only work if I first call my getRecipients
  function in $(document).ready. I am really pulling my hair out with
  this. I can see in my Firebug console that the file request is being
  made via the click event, but it just flashes in the console and
  nothing else happens.

  Any help is greatly appreciated.

  Thanks,
  John

input type=image id=btn_recipient_search src=btn_search.gif
  alt=Search /

$(#btn_recipient_search).click(
  function() {
getRecipients(John, Doe);
  }
);

function getRecipients(firstName, lastName) {
  $.get(recipients.xml, {fName: firstName, lName: lastName},
  function(xml){
alert('XML loaded');
$(xml).find('User').each(function() {
  var name_text = $(this).find('Name').text();
  var id_text = $(this).find('UserId').text();
  var email_text = $(this).find('Email').text();
  alert(name_text);
});
  });
}


[jQuery] Browser Object

2008-09-05 Thread [EMAIL PROTECTED]

Hi,
i hope u can help me. i need to indicate with javascript or php, which
objects in the browser IE, Mozilla etc are deactivate.
example:
Popups Blocked, please activate the popups!

the object what i need to indicate if they are deactivate are:
Session Cache,
Browser Name,
Full Version,
Cookies Enabled,
Popups Blocked,
Image Enabled,
PNG Supported,
Frames Supported,
Iframes Supported,
Adobe Acrobat Installed,
Adobe Acrobat Version,
Proxy Used,
JavaScript Supported,
JavaScript Enabled,
JavaScript Version,
JavaScript Build,
Browser Date Time,

thanks for ur support :)
best wishes,
sarmad


[jQuery] Re: Scrolling: FF3 vs IE7

2008-09-05 Thread p.mohanasundaram

Any Solution??

On Jul 13, 10:00 am, NA [EMAIL PROTECTED] wrote:
 IE7 ignoresscrollHeightand adds a horizontal scrollbar. How can I
 get the same display in IE7 as I get in FF3?


[jQuery] Re: How to apply jQuery to an item which doesn't exist when the page is loaded.

2008-09-05 Thread lukas

Thank you. I added LiveQuery but get the error message in Firebug:

jQuery(.inputsubmit).livequery is not a function

my code:
jQuery(document).ready(function(){
jQuery(.inputsubmit).livequery('click', 
function(event){
var id = 'reply_form_' + this.id;
jQuery(#+id).toggle();
});
});


On Sep 5, 10:59 am, Ryan Zec [EMAIL PROTECTED] wrote:
 If you use the livequery plugin, it will apply trigger events like
 click on element that are not available when the dom is first loaded.

 On Fri, Sep 5, 2008 at 10:49 AM, lukas [EMAIL PROTECTED] wrote:

  My PHP code creates a button which doesn't exist when my page is
  loaded.  Hence, the according jQuery command doesn't work. How can I
  fix this? Thank you!


[jQuery] Re: Does anyone know what $('div.myclass img[src$=png]').click(function(){ $(this).parents('div.myclass').hide('slow'); }) does?

2008-09-05 Thread Michael Geary

Naturally, you wouldn't put it all on one line like that. The code probably
looks more like:

 $('div.myclass img[src$=png]').click(function(){
 $(this).parents('div.myclass').hide('slow');
 });

The first thing I'd ask is why you're doing the .hide('slow'). Sometimes
people use that and .show('slow') just because they're sort of the default
jQuery animations. But that 2D resizing can be really annoying when it
causes text to reflow. You can see an example of this on the jQuery home
page, where the Run link animation reflows as it resizes. It would be
cleaner if it used .slideDown('slow').

An even better example is one of the jQuery date picker plugins, which uses
a .show('slow') when you open it - causing the calendar elements to shift
around as the animation changes width. (Apologies to the plugin author - I
don't remember which plugin it was, but it looked great otherwise. Trust me,
try .slideDown/Up instead of .show/hide and it will be a nice improvement.)

Just food for thought. Since I haven't seen what else is in those divs, nor
any of the other context, I'll assume that .hide('slow') is actually what
you want.

I also assume you wouldn't have one div.myclass nested inside another, would
you? You might get some surprising results if you did. If the answer is
What a silly question. Of course not!, keep in mind that we haven't see
your HTML code. :-)

Next, how many div.myclass elements are on the page and how many PNGs are in
each one? If there are very many of either, you'll be installing a lot of
event handlers. You could speed up the code with event delegation.

In fact, I think this particular code is easier to read with event
delegation. You don't need a delegation plugin or anything, the bare metal
version (buffed to a shine with jQuery) happens to read very nicely:

$('div.myclass').click( function( event ) {
if( $(event.target).is('img[src$=png]') )
$(this).hide('slow');
});

This will perform very well if there aren't too many div.myclass elements,
even if they contain a very large number of PNGs. It does install a click
handler for each div.myclass element, so if there were a large number of
those elements, then I'd put a single click event on some outer container
element. But that code will end up being a lot less elegant than this
version, so unless there's a performance issue, I'd go with this one.
(Assuming it works, of course - this is untested code after all.)

So, what *does* it do, anyway? :-)

-Mike



[jQuery] Re: How to apply jQuery to an item which doesn't exist when the page is loaded.

2008-09-05 Thread timothytoe

Yeah, this doesn't make sense. Either the HTML is served (exists) or
it's created on the fly in some way later on by JavaScript.

On Sep 5, 8:01 am, S P Arif Sahari Wibowo [EMAIL PROTECTED] wrote:
 On Fri, 5 Sep 2008, lukas wrote:
  My PHP code creates a button which doesn't exist when my page
  is loaded.  Hence, the according jQuery command doesn't work.

 Not sure what you meant. For server-side scripting - such as PHP
 - loading a page is the only way for the script to create HTML
 objects - including buttons. So what you said does not make any
 sense. Are you talking about XMLHttpRequest / AJAX request?

 Maybe you should point to an example page + source.

 --
                               (stephan paul) Arif Sahari Wibowo
     _  _  _  _
    /  // // /
   _/ /      /    / _/      http://www.arifsaha.com/


[jQuery] this - Basic question

2008-09-05 Thread Mario Moura
Hi Folks

I have:

$(.tr).each(function(i){
$(this).bind(click, function(event){
var tr = $(this).html();
.


My html is

div class=trmy text please!
  div class=wI dont want this children/div
/div

I am trying select only my text please! without children().

I tried .remove() .not(.w) .not(div.w) and a lot of variations

Look I am not working in the document I have this in this argument.

so

$(this).html() = my text please! div class=wI dont want this
children/div

so I want remove div class=wI dont want this children/div

Regards

Mario
macm


[jQuery] Re: MooTools to jQuery

2008-09-05 Thread Karl Swedberg
I've never used Mootools, so I can only guess, but it looks like you  
have an html structure like this:


div class=Boite
a href=#some link/a
divthis will be toggled/div
/div
div class=Boite
a href=#some link/a
divthis will be toggled/div
/div


If that's the case, this would probably work:

$(document).ready(function() {
  $('.Boite')
  .find('div').hide()
  .end()
  .find(' a').click(function() {
$(this).parent().find('div').toggle();
return false;
  });
});

Or at least it'll get you on the right track.

--Karl


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




On Sep 5, 2008, at 1:13 PM, israel.hayes wrote:



Hi,

I was using MooTools before and I'm kinda new to jQuery, I'd like to
know how you would modify this to use it in jQuery, Thanks,

- Israel

window.addEvent('domready', function()
{
   var Boites = $$('.Boite');

   Boites.each(function(Boite)
   {
   var Lien = Boite.getElement('a');

   Lien.addEvent('click', function()
   {
   var Boite = Lien.getParent();
   var Contenu = Boite.getElement('div');

   if(Contenu.style.display == none)
   {
   Contenu.style.display = block;
   }
   else
   {
   Contenu.style.display = none;
   }
   });

   var Contenu = Boite.getElement('div');
   Contenu.style.display = 'none';
   });
});




[jQuery] Re: this - Basic question

2008-09-05 Thread Michael Geary
Your question isn't really about this, but about how to get some text that
isn't in its own element. It's just a text node inside the .tr element.
 
Can you put it in a span?
div class=tr
  span class=xmy text please!/span
  div class=wI dont want this children/div
/div
Then you could just use:
var tr = $('.x',this).html();
You can get the text from the HTML code you have, though. Here's one way
that comes to mind - but maybe there is something simpler. Are you sitting
down? :-)
var tr = $.trim( $(this).clone().children('.w').remove().end().html() );
Let's break that down (in fact, you may like to format it this way in your
code instead of the one-liner):
var tr = $.trim( // remove extraneous whitespace when done
$(this)  // jQuery object for the element
.clone() // clone it so we don't change the original
.children('.w')  // select the div.w child element
.remove()// remove it
.end()   // go back to the cloned element
.html()  // and get its HTML
);
(We'll see how much of that formatting survives posting...)
 
-Mike



  _  

From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Mario Moura
Sent: Friday, September 05, 2008 11:51 AM
To: jquery-en@googlegroups.com
Subject: [jQuery] this - Basic question


Hi Folks

I have:

$(.tr).each(function(i){ 
$(this).bind(click, function(event){
var tr = $(this).html();
.


My html is

div class=trmy text please!
  div class=wI dont want this children/div
/div

I am trying select only my text please! without children().

I tried .remove() .not(.w) .not(div.w) and a lot of variations

Look I am not working in the document I have this in this argument.

so 

$(this).html() = my text please! div class=wI dont want this
children/div

so I want remove div class=wI dont want this children/div

Regards

Mario
macm



[jQuery] Re: Does anyone know what $('div.myclass img[src$=png]').click(function(){ $(this).parents('div.myclass').hide('slow'); }) does?

2008-09-05 Thread GasGiant

Gee, I wonder if I would get any special consideration because my name
is almost exactly the same as his? :-p


[jQuery] How to do something using JQuery

2008-09-05 Thread SEMMatt2

Hello,

I am fairly new to JQuery but it's so nice and simple to use that as
soon as I have some direction I can take it from there. So, my
question is, can anyone direct me regarding this project:

I have a list of names (maybe a few hundred). Each name will have a
checkbox next to it. After clicking on a little circle press down
(forget what there called...) a box should slide open or come up right
next to the name that let's a user enter in some information (it's
about the name that they selected). Once they enter the information,
the box slides back into place. Then, the user scrolls down to the
bottom of the page and clicks submit. Everything gets submitted
(checked boxes and the more information).

Thoughts...how would I use Jquery to accomplish this?

Thanks,
Matt


[jQuery] Re: Superfish - display2 deep and have mouseover for anything deeper

2008-09-05 Thread Mike Henke

kind of like a alwaysOpen option


[jQuery] Re: Convert MooTools to jQuery

2008-09-05 Thread israel.hayes

Thank you very much to both of you, I'm in your debt ;)
I prefer real method tho! hehe

Have a good day,

- Israel
-

$(function(){
$('.Boite').each(function(){
$(this).find('div').hide();
});

$('.Boite a').click(function(){
$(this).parent().find('div').toggle();
});

})


 On Sep 5, 1:38 pm, israel.hayes [EMAIL PROTECTED] wrote:

  Hi,

  I was using MooTools before and I'm kinda new to jQuery, I'd like to
  know how you would modify this to use it in jQuery, Thanks,

  - Israel

  window.addEvent('domready', function()
  {
      var Boites = $$('.Boite');

      Boites.each(function(Boite)
      {
          var Lien = Boite.getElement('a');

          Lien.addEvent('click', function()
          {
              var Boite = Lien.getParent();
              var Contenu = Boite.getElement('div');

              if(Contenu.style.display == none)
              {
                  Contenu.style.display = block;
              }
              else
              {
                  Contenu.style.display = none;
              }
          });

          var Contenu = Boite.getElement('div');
          Contenu.style.display = 'none';
      });

  });


[jQuery] Anyone know where to ask jQuery questions?

2008-09-05 Thread Jim Buzbee

I must be in the wrong group. This morning, I posted a question (I
must be missing something simple...) on a pared-down jQuery code
segment and a URL showing the problem. Out of the 10,000+ members of
the mailing list, my Apache log shows a grand total of 1 hit on the
example and I got no response on the mailing list.

I must be in the wrong list. Is there somewhere to ask jQuery
questions?

Once again, the code in question can be found at:

http://batbox.org/bh.html

It works under firefox/safari, and doesn't under IE7

Thanks,
Jim Buzbee


[jQuery] Alternate colors of a list (ul li)

2008-09-05 Thread Gewton Jhames
Alternate background-color of trs of a table is very easy with jquery, but,
anyone knows how to alternate these colors of an list? ul li? I mean,
alternate the colors of the lis of the list

Thanks!


[jQuery] Re: .ajax POST question, script stops.

2008-09-05 Thread [EMAIL PROTECTED]

http://hertzelle.com/pixel/ is where the demo is currently running.
Before you click you will see what is happening to the grid the
color is not returning to it's previous state.

Also, is there a better way or FASTER way to make these remote
requests. If you see my demo you will notice it takes a good amount of
time to complete the request.

Thanks for your help Ca-Phun Ung. :)

On Sep 5, 10:12 am, Ca-Phun Ung [EMAIL PROTECTED] wrote:
 [EMAIL PROTECTED] wrote:
          \$(.button).hover(function () {
                  var color = \$(input#color_code).val();
                  var p_color = \$(this).css(background-color);
                  \$(this).css({ backgroundColor:color });
          }, function () {
          \$(this).css(background-color) == p_color;
          });

 Not sure if this is the problem (or just a typo in your posting) but you
 have a double equal operator in the second last line. If that doesn't
 correct the problem it'll be great if you could post a demo page online
 so we could better help you. It's always easier to read code than to
 imagine it.


[jQuery] Re: Superfish - display2 deep and have mouseover for anything deeper

2008-09-05 Thread Mike Henke

Anybody?


  1   2   >