[jQuery] Re: noob: table row level link and hover

2007-10-20 Thread Chris Jordan
I just noticed Glen's reply and looked at that example. It's almost
identical to what i was suggesting with a couple of minor differences that I
thought I'd point out.

His example:

var newURL;
$("td").click(function(){
newURL = $(this).parents("tr").attr("goto");
window.location.href = newURL; alert(newURL);
});

the click event is being bound to each td. While there's nothing
particularly wrong with that it's not really necessary. Just bind the click
event to the tr. That's where you wanted it anyway wasn't it? The only time
I really bind click events to td tags is when it's possible that clicking on
one td will do one thing, while clicking on a different td (in the same row)
will do something else.

Also, the code I provided does less work. The selector I chose:
$("tr[link]")
... tells jQuery to look at only tr tags, and then return only those that
have an expando called "link". While the other example looks at every single
td in the DOM and tries to apply a click to it based on the parent's
expando.

I should also point out that I should probably have var'd my link variable
outside of the function just as a matter of form.

The last difference I want to point out is the use of the .click() method
vs. the .bind() method. Both work just fine. I *think* that the .click()
method is essentially a shortcut for the .bind() method. I'm not sure which
is preferred or "better". It probably comes down to a matter of style.
Someone please feel free to correct me if I'm wrong.

Cheers,
Chris

On 10/20/07, crybaby <[EMAIL PROTECTED]> wrote:
>
>
> I need to have each table rows point to different link.  I am looking
> at table striping and how hover works in 15daysofjquery.com.
>
> http://15daysofjquery.com/table-striping-made-easy/5/
>
> I need to make the whole table row clickable and should take the user
> to a different link on the site.
> How do I do this in jquery?
>
> For example table is as follows:
> 
> Row 1 Cell 1Row 1 Cell 2
> Row 2 Cell 1Row 2 Cell 2
> 
>
> Row1 link: site.com/tutorial/1
> Row2 link: site.com/tutorial/2 and so on.
>
>


-- 
http://cjordan.us


[jQuery] Re: noob: table row level link and hover

2007-10-20 Thread Chris Jordan
crybaby,

Given the following markup:


Row 1 Cell 1Row 1 Cell
2
Row 2 Cell 1Row 2 Cell
2


you could do something like this:

$(function(){
$("tr[link]").bind("click", function(){
var link = $(this).attr("link");
window.location.href = link;
});
});

In case you hadn't see this before, the
$(function(){
   // put all your jQuery goodness here.
});

bit of the code is short hand for

$(document).ready(function() {
// put all your jQuery goodness in here.
});

I hope this helps. If not, ping us back and keep askin' :o)

Cheers
Chris


On 10/20/07, crybaby <[EMAIL PROTECTED]> wrote:
>
>
> I need to have each table rows point to different link.  I am looking
> at table striping and how hover works in 15daysofjquery.com.
>
> http://15daysofjquery.com/table-striping-made-easy/5/
>
> I need to make the whole table row clickable and should take the user
> to a different link on the site.
> How do I do this in jquery?
>
> For example table is as follows:
> 
> Row 1 Cell 1Row 1 Cell 2
> Row 2 Cell 1Row 2 Cell 2
> 
>
> Row1 link: site.com/tutorial/1
> Row2 link: site.com/tutorial/2 and so on.
>
>


-- 
http://cjordan.us


[jQuery] Re: iTunes album flipping simulation

2007-10-20 Thread Benjamin Sterling
sf,
There was some close that was posted a few months back that used js with
canvas, not sure of the site, but I don't recall it working well in IE.  I
will see if I bookmarked it and will post the link here if I find it.

On 10/19/07, Steve Finkelstein <[EMAIL PROTECTED]> wrote:
>
>
> Greetings all!
>
> This might be more UI related, and if it is, apologies for spamming this
> list.
>
> I'm surfing iTunes album art flipping, the same thing that's on the
> iPhone, and I believe amazon has something very similar (but theirs is
> done in flash. :-( )
>
> I was curious if any of the brilliant minds who contribute to jQuery
> have created a similar widget yet with JavaScript? I suppose it would
> be like a Carousel on steroids. :-)
>
> Thanks again anyway for any input.
>
> - sf
>



-- 
Benjamin Sterling
http://www.KenzoMedia.com
http://www.KenzoHosting.com
http://www.benjaminsterling.com


[jQuery] Re: Masked Input Plugin Direction

2007-10-20 Thread Josh Bush

Thanks for the input I like the idea of just giving a string for
formatting purpose and then overriding the default behavior with some
other kind of include to specify decimal and grouper.  I'll come up
with something for that.

What's your take on including with the mask plugin?  They might share
some internal methods like character positioning, but that is about
it.  I'm thinking really hard about making them separate files, but
all in the $.fn.mask namespace.

Josh
digitalbush.com


On Oct 20, 9:32 am, Jörn Zaefferer <[EMAIL PROTECTED]> wrote:
> Josh Bush schrieb:> A lot of people seem to need dynamic width number 
> masking.  Where
> > currency symbols, decimal separators, and thousands separators are
> > applied automatically.  I'm thinking about taking this on, but I have
> > a few questions.
>
> > 1.Should is be a part of the masked input plugin or a separate new
> > plugin?
>
> I could imagine expressions specifiying the possible amount of
> characters, similar to regex. Or the number format as used by java,
> where you specify something like "#,###.00", and the seperators are
> replaced according to the locale. The 0 specifices a required
> placeholder, while the "#,###" can repeast (or something like 
> that:http://java.sun.com/j2se/1.4.2/docs/api/java/text/DecimalFormat.html).
>
> > {decimalSeparator:",",thousandsSeparator:"."}  This seems clunky to
> > me.  Is there any good way to read internationalization and
> > globalization stuff from the browser?My head is swimming with
> > ideas here, I just need some direction.
>
> I'd prefer including a another file for the appropiate locale that
> overwrites the defaults. For example, these date extensions define some
> names:http://dev.jquery.com/view/trunk/plugins/methods/date.js
> If the user locale is "de", I'd also include another file on the
> serverside:http://dev.jquery.com/view/trunk/plugins/methods/date_de.js
>
> Just a few ideas. I'm looking forward to what you come up with :-)
>
> Regards
> Jörn



[jQuery] Re: noob: table row level link and hover

2007-10-20 Thread Glen Lipka
Here is one way.  There are alot of ways to do this.
http://commadot.com/jquery/tableClick.php

You could populate the expandos out of an array.
You could do an each to iterate through the TRs and add the click.

Glen

On 10/20/07, crybaby <[EMAIL PROTECTED]> wrote:
>
>
> I need to have each table rows point to different link.  I am looking
> at table striping and how hover works in 15daysofjquery.com.
>
> http://15daysofjquery.com/table-striping-made-easy/5/
>
> I need to make the whole table row clickable and should take the user
> to a different link on the site.
> How do I do this in jquery?
>
> For example table is as follows:
> 
> Row 1 Cell 1Row 1 Cell 2
> Row 2 Cell 1Row 2 Cell 2
> 
>
> Row1 link: site.com/tutorial/1
> Row2 link: site.com/tutorial/2 and so on.
>
>


[jQuery] Re: How would I modify this to...

2007-10-20 Thread Rick Faircloth

No problem... I appreciate your reply.

I'll just repost the question and see if I get
any more response.

Thanks,

Rick


> -Original Message-
> From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Wizzud
> Sent: Saturday, October 20, 2007 6:51 PM
> To: jQuery (English)
> Subject: [jQuery] Re: How would I modify this to...
> 
> 
> I'm sorry but I haven't got the faintest idea. I can't even tell if
> what I proposed will work (I doubt it).
> I suspect that the HTML I would see in my browser would not look like
> that however, and it's what the browser sees that determines what the
> script needs to do.
> Sorry, but ColdFusion means nothing to me beyond sticking 2 ice cubes
> together by pressure alone!
> 





[jQuery] Re: jQuery Logging (to firebug)

2007-10-20 Thread Mike Alsup

Joan,  that code is going to bork if console is undefined.


> $.fn.log = function(msg){
> if (window.console || console.firebug){
> msg = msg || '';
> if(msg !== '') msg += ': ';
> console.log("%s%o", msg, this);
> }
>  return this;
> };


[jQuery] Re: jQuery Logging (to firebug)

2007-10-20 Thread Michael Geary
Looks good - but that first || needs to be && instead... :-)


  _  

From: Joan Piedra

Try this one :)
http://pastemonkey.org/paste/471a49a0-fc54-4ca8-b8e7-5411404fdb0d

(function($){ // block scope

$.fn.log = function(msg){ 
if (window.console || console.firebug){
msg = msg || '';
if(msg !== '') msg += ': ';
console.log("%s%o", msg, this);
}
return this;
};

})(jQuery);




On 10/19/07, Glen Lipka <[EMAIL PROTECTED]> wrote: 

I whipped up a demo using it.
http://www.commadot.com/jquery/consoleLog.php
 

I probably (definitely) overused it. :)

Glen



[jQuery] ajax() and get() not working, only load(). Why?

2007-10-20 Thread bro

Hi,
I'm not sure what i'm doing wrong. However, with this it works
$("#About").click(function() {
$("#content").load(
  "getthis.txt",
   function(){
$
("#content").animate({opacity:"1"},2000);})
return false;
});

But with this it doesn't:
$("#About").click(function() {
$.ajax({
url: "getthis.txt",
succes: function(ddd){
$("#content").append(ddd);

$("#content").animate({opacity:"1"},2000);
}
})
});

Anybody has a clue why? It tried with $.get as well. What is it that
i'm doing wrong?



[jQuery] search through ajax object

2007-10-20 Thread brobro


Hi,
if I use $.ajax() to fetch a file. Would it be possible to search throught
that file for a certain element and use that? 
like 
$.ajax({
url: "getthis.html",
success: function(html){
var mynewdiv = lookformydiv("#mydiv") in html   //this 
is what i
want to do
$("#content").append(#mynewdiv);
}
it would a great help

-- 
View this message in context: 
http://www.nabble.com/search-through-ajax-object-tf4664208s27240.html#a13324017
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: jQuery Logging (to firebug)

2007-10-20 Thread Joan Piedra
Try this one :)
http://pastemonkey.org/paste/471a49a0-fc54-4ca8-b8e7-5411404fdb0d

(function($){ // block scope

$.fn.log = function(msg){
if (window.console || console.firebug){
msg = msg || '';
if(msg !== '') msg += ': ';
console.log("%s%o", msg, this);
}
return this;
};

})(jQuery);



On 10/19/07, Glen Lipka <[EMAIL PROTECTED]> wrote:
>
> I whipped up a demo using it.
> http://www.commadot.com/jquery/consoleLog.php
>
> I probably (definitely) overused it. :)
>
> Glen
>
>
> On 10/19/07, Nikola Ivanov <[EMAIL PROTECTED]> wrote:
> >
> >
> > How about integrating it in the core? After if ( console ) of course
> >
> >
>


-- 
Joan Piedra  ||  Frontend web developer
http://www.justaquit.com/  ||  http://www.joanpiedra.com/


[jQuery] Does storing DOM references in object properties affect browser performance?

2007-10-20 Thread pford

Warning perhaps this is a dumb question.  I naively would have thought
that storing DOM references (in this case, in object properties
because our scripts are object-oriented) would improve performance,
eliminating needless lookups.  However, now I wonder if doing so taxes
browser memory, particularly in IE, and slows down a web application
as more and more DOM object references are stored in object
properties.  I'm basically unclear on the entire issue.  Could anyone
shed some light on this topic?



[jQuery] noob: table row level link and hover

2007-10-20 Thread crybaby

I need to have each table rows point to different link.  I am looking
at table striping and how hover works in 15daysofjquery.com.

http://15daysofjquery.com/table-striping-made-easy/5/

I need to make the whole table row clickable and should take the user
to a different link on the site.
How do I do this in jquery?

For example table is as follows:

Row 1 Cell 1Row 1 Cell 2
Row 2 Cell 1Row 2 Cell 2


Row1 link: site.com/tutorial/1
Row2 link: site.com/tutorial/2 and so on.



[jQuery] Re: jqGrid new version

2007-10-20 Thread Ryura

Tony,

I can't seem to get jqGrid to work. I've looked at all the examples
but I must be missing something somewhere. I would appreciate if you
would take a look at my PHP.

include("dbconfig.php");

include("JSON.php");

$json = new Services_JSON();

$examp = $_GET["q"];



$page = $_GET['page'];

$limit = $_GET['rows'];

$sidx = $_GET['sidx'];

$sord = $_GET['sord'];

if(!$sidx) $sidx =1;



$db = mysql_connect($dbhost, $dbuser, $dbpassword)

or die("Connection Error: " . mysql_error());



mysql_select_db($database) or die("Error conecting to db.");



switch ($examp) {

case 1:

$result = mysql_query("SELECT COUNT(*) AS count FROM scoremain 
a");

$row = mysql_fetch_array($result,MYSQL_ASSOC);

$count = $row['count'];



if( $count >0 ) {

$total_pages = ceil($count/$limit);

} else {

$total_pages = 0;

}

if ($page > $total_pages) $page=$total_pages;

$start = $limit*$page - $limit; // do not put $limit*($page - 1)

if ($start<0) $start = 0;

$SQL = "SELECT id, user, score, favgame, rank FROM scoremain
ORDER BY $sidx $sord LIMIT $start , $limit";

$result = mysql_query( $SQL ) or die("Couldn’t execute
query.".mysql_error());



if ( stristr($_SERVER["HTTP_ACCEPT"],"application/xhtml+xml") ) 
{

header("Content-type: application/xhtml+xml;charset=utf-8"); }
else {

header("Content-type: text/xml;charset=utf-8");

}

$et = ">";

echo "";

echo "".$page."";

echo "".$total_pages."";

echo "".$count."";

// be sure to put text data in CDATA

while($row = mysql_fetch_array($result,MYSQL_ASSOC)) {

echo "";

echo "". $row[rank]."";

echo "";
echo "". $row[score]."";

echo "";

echo "";

}

echo "";

break;

case 2:

$result = mysql_query("SELECT COUNT(*) AS count FROM 
scoremain");

$row = mysql_fetch_array($result,MYSQL_ASSOC);

$count = $row['count'];



if( $count >0 ) {

$total_pages = ceil($count/$limit);

} else {

$total_pages = 0;

}

if ($page > $total_pages) $page=$total_pages;

$start = $limit*$page - $limit; // do not put $limit*($page - 1)

if ($start<0) $start = 0;

$SQL = "SELECT id, user, score, favgame, rank FROM scoremain
ORDER BY $sidx $sord LIMIT $start , $limit";

$result = mysql_query( $SQL ) or die("Couldn’t execute
query.".mysql_error());

$responce->page = $page;

$responce->total = $total_pages;

$responce->records = $count;

$i=0;

while($row = mysql_fetch_array($result,MYSQL_ASSOC)) {

$responce->rows[$i]['id']=$row[id];

$responce->rows[$i]['cell']=array($row[rank],$row[user],
$row[score],$row[favgame]);

$i++;

}

echo $json->encode($responce);
// coment if php 5

echo json_encode($responce);



break;

}

This is uploaded at http://xeolife.com/dbtest/. Thanks.



[jQuery] Re: clueTip feedback and suggestions

2007-10-20 Thread DaveG


Responses below.

Karl Swedberg wrote:
5] Consider adding a top/bottom arrow pointer for use with 
positionBy:'bottomTop'.


Added! :-) Already had this working, but forgot to upload the new images 
and the updated css file to the server.
I see it working on the demo site -- now you just need to release it on 
jQuery plugins site :) In the meantime, I grabbed it from the site.



6] The left/right arrow appears very specific to putting the arrow in 
the top left/right corners. It would be nice to be able to put the 
arrow in the center, so it might be used in conjunction with the 
bubble type style.


One way to do this might be to provide a means of replacing the tl.gif 
and bl.gif classes with their top/bottom or left/right equivalents. 
This would fix [5] as well.




Hmmm. The code is supposed to adjust the background position of the 
clue-left-[theme name] and clue-right-[theme name] classes so that the 
arrows will point to the invoking element even if the tooltip is 
adjusted upwards. However, the rounded corners css, specifically the 
background images, might make it difficult to implement arrows with it. 
I'm not sure where to go with this one. But maybe since I added support 
for #5, this is already a possibility?

I *think* what you've done on [5] addresses this.



--- *Possible Bugs* ---
7] positionBy 'auto' appears not to work. The hint does not seem to 
accommodate the viewport scrolling. The other positioning methods work 
fine though. (I'm using the latest dimensions -- the one provided in 
the clueTip download.)


The only time I have heard of this breaking is when the plugin has been 
used with the latest Dimensions plugin in svn, not the one that comes 
with the clueTip download bundle. But maybe there is a problem on a 
particular browser that I'm not aware of yet.

Could you please do 2 things for me?
1. tell me which browser you're using

Firefox 2.0.0.8

2. test the examples at http://plugins.learningjquery.com/cluetip/demo/ 
and let me know if you encounter the problem there as well.

I do not see any errors on the demo site.

There *seems* to be a pattern where the elements are floated, it causes 
the problem -- I'm not 100% sure of this though.


The problem is odd in that there seems to be a relationship between 
where the hint last appeared, and where it is displayed for a subsequent 
element.


There are some elements on the page where the hint is consistently shown 
in the correct place (the element is non-floated, but lives within 
floated elements). If I then hover over a 'broken' element, the hint 
appears in the same 'top' position as the prior correctly shown hint; 
the left position is probably correct.


Now, it gets stranger... if I hover over another element with the same 
class as the prior 'broken' element, the tip shows in the exact same 
location as the last 'broken' element, even though the two targets have 
very different 'top' positions.


And finally, if I scroll one of the broken elements to the bottom of the 
viewport, the hint appears in the correct top position.


Hope that helps :)

btw, I switched to positionBy:'bottomTop', so this is not a problem for 
me right now. I'm happy to continue to help track the problem down though.



8] When shrinking the window, the hint for elements on the right side 
gets moved over to the center of the window, too far from the target 
element.


I haven't come across this one before, but I'll play around with 
resizing and see if I can find/solve the problem.



I suspect it's related to [7].

 ~ ~ David


[jQuery] Re: How would I modify this to...

2007-10-20 Thread Wizzud

I'm sorry but I haven't got the faintest idea. I can't even tell if
what I proposed will work (I doubt it).
I suspect that the HTML I would see in my browser would not look like
that however, and it's what the browser sees that determines what the
script needs to do.
Sorry, but ColdFusion means nothing to me beyond sticking 2 ice cubes
together by pressure alone!

On Oct 20, 12:29 am, "Rick Faircloth" <[EMAIL PROTECTED]>
wrote:
> You're actually correct, Wizzud...
>
> In experimenting with opening and closing a details section
> I started with trying to manipulate table rows, but the animation
> would stutter and jerk.
>
> I finally got totally smooth animation by using separate tables
> for each row.  Looks exactly the same as a table with multiple rows,
> but works better with the animation.
>
> I've posted the entire block of HTML below, if you want to view it.
>
> Where would I put your line of code in my current jquery code?  Or
> would it be a separate function?  (It's at the bottom of the HTML...)
>
> Rick
>
> Here's the HTML:  (Some of it is ColdFusion...)
>
> 
>
> 
>
> 
>
> Day
> Date
> Time
>  class="cal_heading">Event
>  class="cal_heading">Update
>  class="cal_heading">Delete
>
> 
>
> 
>
> 
>
> 
> select distinct event_date from calendar order by event_date
> 
>
> 
>
> 
>
> 
> select * from calendar where event_date =
> '#dateformat(get_dates.event_date, '-mm-dd')#'
> order by event_date, event_time
> 
>
> 
>
> 
>
>  cellspacing="0" border="0" width="532">
>
> 
>
> 
>  id="calcellday">#dateformat(get_events.event_date, "ddd")#
> 
>  id="calcellday">  
> 
>
> 
>  id="calcelldate">#dateformat(get_events.event_date, "mmm d, ")#
> 
>  id="calcelldate">  
> 
>
>  id="calcelltime">#timeformat(get_events.event_time, "h:mm tt")#
>  id="calcellevent">#get_events.event_name#
>  href="calendar_update.cfm event_id=#get_events.event_id#">Update
>  href="calendar_delete.cfm?event_id=#get_events.event_id#">Delete
>
> 
>
> 
>
> 
> #get_events.event_description#
> 
>
> 
> function noBreak(str)
> {
> blockArr = arrayNew(1);
> while (reFindNoCase("<.*?", str) and reFindNoCase("<.*?", str))
> {
> startPos = reFindNoCase("<.*?", str);
> endPos = reFindNoCase("<*.?>", str);
>
> thisBlock = Mid(str, startPos, endPos - startPos+2);
> str = removeChars(str, startPos, endPos - startPos+2);
>
> ArrayAppend(blockArr, thisBlock);
> str = Insert("[!*#ArrayLen(blockArr)#*!]", str, startPos -
> 1);
> }
>
> str = replace(str, ' ', ' ', 'all');
>
> for (i=1; i lte ArrayLen(blockArr); i=i+1)
> {
> str = replacenocase(str, '[!*#i#*!]', blockArr[i]);
> }
>
> return str;
> }
> 
>
> 
>
>  width="532">
>
> 
>  class="cal_show_head">Event
>  class="cal_show_data">#get_events.event_name#
> 
> 
>
> Event
> Date
>  class="cal_show_data">#dateformat(get_events.event_date, "mmm d,
> ")# 
> 
>
> Event
> Time
>  class="cal_show_data">#timeformat(get_events.event_time, "h:mm tt")#
> 
> 
>
>  class="cal_show_head">Event Location
>  class="cal_show_data">#get_events.event_location#
> 
> 
>
> Event
> Details
>  class="cal_show_data">#replace(noBreak(str), "#Chr(13)#", "",
> "All")#
> 
> 
>
>  class="cal_s

[jQuery] jqModal ajax question

2007-10-20 Thread danrich


I'm issuing an ajax call, and passing a parameter.  The parameter is the
value of a text box on the page, which loads with a default based on a
database call.

But for some reason, the value isn't being sent in the ajax call.  It just
stays the same as it is when the page loads, even if the user updates what's
in the text box.

 
\$(document).ready(function() { 
$('#bar').jqm({ajax: 'ajax_hspick.cgi?q=' + document.myForm.foo.value ,
trigger: 'input.bar'}); 
}); 
 

 
 
 
Please wait... 
 


In this instance, it will past "testing" to the cgi, even if I change the
value in the text box.  I've tried numerous stuff and can't figure this one
out.

Thanks!
-- 
View this message in context: 
http://www.nabble.com/jqModal-ajax-question-tf4664038s27240.html#a13323545
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: clueTip feedback and suggestions

2007-10-20 Thread Karl Swedberg


David,

Thank you so much for the excellent feedback! I appreciate your  
taking the time to offer suggestions and report problems. I'll  
respond to the individual items below, but overall, this is really,  
really helpful.


Please especially look at my response to #7, as I hate the thought of  
this not working at all for you.


On Oct 20, 2007, at 4:18 PM, DaveG wrote:


PS: Some of the books on your Amazon list look interesting :)


thanks for visiting. :)


--- *Usage* ---
1] On the demo page, I'd suggest that the simplest case (from a  
library user perspective) is actually a link with a tip provided in  
the title. It took me quite a while to work out how to do this, as  
the hint attempted to get loaded from the title element as if title  
was a URL. My problem was that I was trying to use "attribute" to  
set my hint text, not *titleAttribute*.


However after I figured it out I did find the appropriate  
documentation, just scattered around a little. Here's the new demo  
I'd suggest adding as number 1, simple case:


http://"; title="My title|my hint">abc

jQuery('#e')
   .cluetip({
  titleAttribute:'title',
  splitTitle:'|'
});


I see your point here. Since the plugin was inspired by jTip, which  
just does the ajax bit (no local or title-based tooltips), I always  
had it in my head that an ajax example would be the simplest. But  
you're absolutely right that a user would probably think of the title- 
based tooltip as the simplest. To accommodate that perspective, I'll  
have to rewrite some of the documentation as well as the demo, but I  
think it's worth it.




2] Next demo you might add is a hint with no title.

http://"; title="|my hint">abc

jQuery('#e')
   .cluetip({
  titleAttribute:'title',
  splitTitle:'|',
  showTitle: false;
});


good idea. will add that.

3] It looks like adding a hint to an element, and then hovering  
over the target changes the cursor to a 'question-mark arrow'.  
That's fine, except when combined with the ability to turn off  
hints, when elements which were hovered over retain the question- 
mark cursor, which seems odd to users, now that hints are off.


I'd suggest returning the cursor state to it's original value on  
mouseout. That way when hints are later turned off all is well.


another good idea.

4] You might consider adding a means of removing hints from  
elements (or simply document the workaround). I accomplished this  
by simply adding an onActivate handler:

   jQuery( element )
  .cluetip({
 onActivate: function(e) {
return false;
 }
  });


yes. The onActivate option was added by Hector Santos, but I'm not  
sure it's available in the 0.9.0 version on the download page at  
jquery.com/plugins/ yet. The jTip theme example #5 at http:// 
plugins.learningjquery.com/cluetip/demo/ shows how to use onActivate  
to turn clueTips on and off with a checkbox (also provided by  
Hector). I need to add this to the API/options tab, though.


5] Consider adding a top/bottom arrow pointer for use with  
positionBy:'bottomTop'.


Added! :-) Already had this working, but forgot to upload the new  
images and the updated css file to the server.



6] The left/right arrow appears very specific to putting the arrow  
in the top left/right corners. It would be nice to be able to put  
the arrow in the center, so it might be used in conjunction with  
the bubble type style.


One way to do this might be to provide a means of replacing the  
tl.gif and bl.gif classes with their top/bottom or left/right  
equivalents. This would fix [5] as well.




Hmmm. The code is supposed to adjust the background position of the  
clue-left-[theme name] and clue-right-[theme name] classes so that  
the arrows will point to the invoking element even if the tooltip is  
adjusted upwards. However, the rounded corners css, specifically the  
background images, might make it difficult to implement arrows with  
it. I'm not sure where to go with this one. But maybe since I added  
support for #5, this is already a possibility?





--- *Possible Bugs* ---
7] positionBy 'auto' appears not to work. The hint does not seem to  
accommodate the viewport scrolling. The other positioning methods  
work fine though. (I'm using the latest dimensions -- the one  
provided in the clueTip download.)


The only time I have heard of this breaking is when the plugin has  
been used with the latest Dimensions plugin in svn, not the one that  
comes with the clueTip download bundle. But maybe there is a problem  
on a particular browser that I'm not aware of yet.

Could you please do 2 things for me?
1. tell me which browser you're using
2. test the examples at http://plugins.learningjquery.com/cluetip/ 
demo/ and let me know if you encounter the problem there as well.



8] When shrinking the window, the hint for elements on the right  
side gets moved over to the center of the window, too far from the  
target element.


I haven'

[jQuery] clueTip feedback and suggestions

2007-10-20 Thread DaveG


After looking into a few of the tooltip libraries, I've ended up 
implementing clueTip (http://jquery.com/plugins/project/cluetip/) on an 
existing project. In general it fit in very well, with pretty nearly all 
the features we need. The only real issue was [7], which I didn't manage 
to work around.


This post is a little long, but I just want to share my experience, and 
provide a little feedback to hopefully make the library even better!


All-in-all, I found this library to be the most feature complete, so 
great job Karl!



 ~ ~ David

PS: Some of the books on your Amazon list look interesting :)


--- *Usage* ---
1] On the demo page, I'd suggest that the simplest case (from a library 
user perspective) is actually a link with a tip provided in the title. 
It took me quite a while to work out how to do this, as the hint 
attempted to get loaded from the title element as if title was a URL. My 
problem was that I was trying to use "attribute" to set my hint text, 
not *titleAttribute*.


However after I figured it out I did find the appropriate documentation, 
just scattered around a little. Here's the new demo I'd suggest adding 
as number 1, simple case:


http://"; title="My title|my hint">abc

jQuery('#e')
   .cluetip({
  titleAttribute:'title',
  splitTitle:'|'
});

2] Next demo you might add is a hint with no title.

http://"; title="|my hint">abc

jQuery('#e')
   .cluetip({
  titleAttribute:'title',
  splitTitle:'|',
  showTitle: false;
});

3] It looks like adding a hint to an element, and then hovering over the 
target changes the cursor to a 'question-mark arrow'. That's fine, 
except when combined with the ability to turn off hints, when elements 
which were hovered over retain the question-mark cursor, which seems odd 
to users, now that hints are off.


I'd suggest returning the cursor state to it's original value on 
mouseout. That way when hints are later turned off all is well.


4] You might consider adding a means of removing hints from elements (or 
simply document the workaround). I accomplished this by simply adding an 
onActivate handler:

   jQuery( element )
  .cluetip({
 onActivate: function(e) {
return false;
 }
  });

5] Consider adding a top/bottom arrow pointer for use with 
positionBy:'bottomTop'.


6] The left/right arrow appears very specific to putting the arrow in 
the top left/right corners. It would be nice to be able to put the arrow 
in the center, so it might be used in conjunction with the bubble type 
style.


One way to do this might be to provide a means of replacing the tl.gif 
and bl.gif classes with their top/bottom or left/right equivalents. This 
would fix [5] as well.



--- *Possible Bugs* ---
7] positionBy 'auto' appears not to work. The hint does not seem to 
accommodate the viewport scrolling. The other positioning methods work 
fine though. (I'm using the latest dimensions -- the one provided in the 
clueTip download.)


8] When shrinking the window, the hint for elements on the right side 
gets moved over to the center of the window, too far from the target 
element.



-- *Documentation* ---
9] The Demo Page seems to have Known Issues and Downloads at the bottom 
-- not sure that's meant to be there.


10] On the details page you mention that hints can fade in, but it takes 
a little digging to find out *how* to do this (it's on the API page).


11] Example 5 shows how hints can be turned off. However the code in the 
download does not include the onActivate parameter required to make this 
happen. I found a copy in SVN which has this in it, so presumably the 
doc is a little ahead of the production code. Took a while to work out 
what I was doing wrong though :)


In the meantime, I simply copy/pasted the few lines required for this 
functionality from svn.




[jQuery] Re: binding dynamically inserted DOM elements

2007-10-20 Thread Flesler

I was answering, not asking...

Ariel Flesler

On Oct 19, 10:28 am, "Andy Matthews" <[EMAIL PROTECTED]> wrote:
> Yep...
>
> There's another plugin called LiveQuery.
>
>
>
> -Original Message-
> From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
>
> Behalf Of Flesler
> Sent: Friday, October 19, 2007 7:20 AM
> To: jQuery (English)
> Subject: [jQuery] Re: binding dynamically inserted DOM elements
>
> > are there any other known methods?
>
> http://jquery.com/plugins/project/Listen- Hide quoted text -
>
> - Show quoted text -



[jQuery] Re: Selecting elements WITHOUT children?

2007-10-20 Thread Damien

Thanks all, this is exactly what I was looking for! I was not aware of
the :not or :has selectors, this should make my life significantly
easier.

(I also need to pay a bit more attention next time I RTFM).



[jQuery] ui calendar missing

2007-10-20 Thread Greg Warner
>From the ui.jquery.com page...


 2
3404 Not Found
4
5Not Found
6The requested URL /view/trunk/ui/calendar/jquery-calendar.js was not
found on this server.
7
8Apache/2.0.59 (Unix) Server at dev.jquery.com Port 80
9
10


I believe several of the other components are broken too.


[jQuery] Re: ui.tabs bug

2007-10-20 Thread Klaus Hartl

On 20 Okt., 16:16, Mayowa <[EMAIL PROTECTED]> wrote:
> Sorry if this is the wrong place to post this but i've found a
> ui.tabs bug.
>
> To recreate
> 1. create a tab that uses ajax to load the tabs
>
> 
> $(function() {
> $('#maintab ul').tabs({ remote: true });
> });
> 
> ...
> ...
>
>
> 
> Boys
> Girls li>
> 
>   
>
> then from firebug console add a new tab
> $('#maintab ul').tabsAdd('/uitest/men', 'Chat')
>
> now click on the any of existing tabs... that tab caption will be
> permanently overwritten with 'Loading...'
>
> I've tried to debug it but i cant figure out why it happens...

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


--Klaus



[jQuery] Re: disable effect in images

2007-10-20 Thread Feijó

Nice idea!! Will try that one :)

Thanks, Wizzud


On Oct 19, 7:31 pm, Wizzud <[EMAIL PROTECTED]> wrote:
> The simplest way is to reduce it's opacity ...
>
> jQuery('img').css({opacity:0.5});
>
> On Oct 19, 10:31 am, "Alessandro Feijó" <[EMAIL PROTECTED]> wrote:
>
> > Its possible to turn any image to gray simulating a disabled effect??
>
> > I'm trying to find it out but don't know what are the keywords to search for
>
> > Thanks!
>



[jQuery] Re: Selecting elements WITHOUT children?

2007-10-20 Thread Jörn Zaefferer


Damien schrieb:

Hey all, this is my first time posting to the mailing list, so please,
be gentle. ;)

Anyway, to the point, I have long lists of items similar to the HTML
below

Item 1
Item 2
Item 3

Now, what I need to do here is be able to select and apply a function
to Item 1, without having the said function cascade and apply to Item
2 and Item 3.

Any one have any idea how I should go about this?

For your reference, here are the selectors I've been using for Item 2
and 3:

$("ul.preview span a")
  

Give this a try:

$("ul.preview span:not(:has(a))")

See http://docs.jquery.com/Selectors/not#selector and 
http://docs.jquery.com/Selectors/has#selector


-- Jörn


[jQuery] Re: Selecting elements WITHOUT children?

2007-10-20 Thread Karl Swedberg


On Oct 19, 2007, at 8:12 PM, Damien wrote:



Hey all, this is my first time posting to the mailing list, so please,
be gentle. ;)

Anyway, to the point, I have long lists of items similar to the HTML
below

Item 1
Item 2
Item 3

Now, what I need to do here is be able to select and apply a function
to Item 1, without having the said function cascade and apply to Item
2 and Item 3.

Any one have any idea how I should go about this?

For your reference, here are the selectors I've been using for Item 2
and 3:

$("ul.preview span a")


From there, i just differentiate in my code between the two by what

attributes they have. Unfortunately, I have no way to do that with the
span tags without modifying the HTML.



Hi Damien,

I think you're on the right track here. It looks like you want to  
select all LI elements that don't have a link in them. Is that right?  
If so, you could do this:


$('li:not(:has(a))')

--Karl
_
Karl Swedberg
www.englishrules.com
www.learningjquery.com



[jQuery] Re: select the last 2 elements in list

2007-10-20 Thread Karl Swedberg


On Oct 20, 2007, at 8:41 AM, figo2476 wrote:



e.g.


a
b <-
c <-


I did:

$(document).ready(function() {
   $("#update li:last").addClass("last_li");
   $(jQuery.sibling("#update
li:last").prev).addClass("sec_last_li");
});


The last element works, but not the 2nd last



Hi there,

Your "second to last" line could be rewritten like this:

$("#update li:last").prev().addClass("sec_last_li");

You could also write it like this:

$('#update li').slice(-2, -1);

It probably makes sense, though, to chain the two selections:

	$("#update li:last").addClass("last_li").prev().addClass 
("sec_last_li");


And finally, to make it a bit more readable, you can break that into  
two lines:


$("#update li:last").addClass("last_li")
  .prev().addClass("sec_last_li");


Hope that helps.


--Karl
_
Karl Swedberg
www.englishrules.com
www.learningjquery.com




[jQuery] Re: Masked Input Plugin Direction

2007-10-20 Thread Jörn Zaefferer


Josh Bush schrieb:

A lot of people seem to need dynamic width number masking.  Where
currency symbols, decimal separators, and thousands separators are
applied automatically.  I'm thinking about taking this on, but I have
a few questions.

1.Should is be a part of the masked input plugin or a separate new
plugin?
  
I could imagine expressions specifiying the possible amount of 
characters, similar to regex. Or the number format as used by java, 
where you specify something like "#,###.00", and the seperators are 
replaced according to the locale. The 0 specifices a required 
placeholder, while the "#,###" can repeast (or something like that: 
http://java.sun.com/j2se/1.4.2/docs/api/java/text/DecimalFormat.html).



{decimalSeparator:",",thousandsSeparator:"."}  This seems clunky to
me.  Is there any good way to read internationalization and
globalization stuff from the browser?My head is swimming with
ideas here, I just need some direction.
  
I'd prefer including a another file for the appropiate locale that 
overwrites the defaults. For example, these date extensions define some 
names: http://dev.jquery.com/view/trunk/plugins/methods/date.js
If the user locale is "de", I'd also include another file on the 
serverside: http://dev.jquery.com/view/trunk/plugins/methods/date_de.js


Just a few ideas. I'm looking forward to what you come up with :-)

Regards
Jörn


[jQuery] Re: AJAX and dynamically created dropdowns

2007-10-20 Thread Karl Swedberg
One other Firefox add-on that allows you to see the *generated*  
source is "Web Developer" toolbar:

http://chrispederick.com/work/web-developer/
Click on the "View Source" menu, and then choose "View Generated  
Source."


Web Developer, along with Firebug, is a must-have extension. Also,  
look closely at that page ... Chris Pederick is using jQuery!



--Karl
_
Karl Swedberg
www.englishrules.com
www.learningjquery.com



On Oct 19, 2007, at 5:13 PM, Brook Davies wrote:



You'll never see it in the 'view source' if its dynamically added.  
If you

use the Inspect function of firefox you can see the dynamically added
content. I think the IE developer toolbar does the same thing.

Make sure that you are setting the length of the selects option  
array and

setting a text/value pair for each entry in the drop down.

When you say 'no results', what do you mean? No results when you  
submit the

form?

Brook

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

Behalf Of Yaz
Sent: October 19, 2007 11:59 AM
To: jQuery (English)
Subject: [jQuery] Re: AJAX and dynamically created dropdowns


With the select plugin I get the same results.
Added the form tag. Still no results.

Btw, I noticed that even though in Firefox the dropdown does get
populated, at view source there is no list of schools

Thanks for the suggestion guys.

-yaz

On Oct 19, 2:31 pm, Jack Killpatrick <[EMAIL PROTECTED]> wrote:

FWIW, I've never had any problems with id and name being the same on
controls in IE. I don't see a  tag on the page, maybe that's  
the

issue?

You might also want to try this:

http://www.texotela.co.uk/code/jquery/select/

- Jack

Chris Jordan wrote:

Could it be because you're name and id are identical?








Perhaps IE doesn't like this?



Just a guess.



Chris


On 10/19/07, *Yaz* <[EMAIL PROTECTED] >  
wrote:



Hello everyone,



I have a script that basically just reads some data from an xml

file,
then the data gets loaded into a  dropdown, by  
dynamically

creating  tags.



Here's the working sample:
   http://yazmedia.com/sandbox/


View source for the code. XML:http://yazmedia.com/sandbox/ 
data.html



It works fine in Firefox, but in IE 7 or 6 it doesn't. I tried
using a
function "addOption()" that I found online, to see if at  
least I was
doing something wrong in my code, but still neither option  
works.



Anything that could shed a little light into this would be much
appreciated.



-yaz



--
http://cjordan.us








[jQuery] ui.tabs bug

2007-10-20 Thread Mayowa

Sorry if this is the wrong place to post this but i've found a
ui.tabs bug.

To recreate
1. create a tab that uses ajax to load the tabs


$(function() {
$('#maintab ul').tabs({ remote: true });
});

...
...

   

Boys
Girls

  

then from firebug console add a new tab
$('#maintab ul').tabsAdd('/uitest/men', 'Chat')

now click on the any of existing tabs... that tab caption will be
permanently overwritten with 'Loading...'


I've tried to debug it but i cant figure out why it happens...



[jQuery] Re: jquery 1.2.1 and form plugin

2007-10-20 Thread Mike Alsup

Mark,

My demo page is using jQuery v1.2.1 and I'm not aware of any problems.

http://www.malsup.com/jquery/form/

If you can post a demo page that is not working I'm sure someone here
can figure out the problem.

Mike


On 10/19/07, Mark <[EMAIL PROTECTED]> wrote:
>
> Hi, please check if is everything fine with the new jquery version.
>
> I am having a problem with ajaxSubmit. It seems like never call the
> success funcion configured in the options object.
>
> It works with jquery 1.1.3, but dont with the new one.
> I am using the latest form plugin published in the form plugin site.
>
> Thanks.
> Mark
>
>


[jQuery] Binding functions referenced by an array

2007-10-20 Thread Jarodium

Hello

I'm having some troubles regarding binding functions referenced by an
Array:

I have this piece of code

function f1() {
alert("dklfsd");
}

function Dialog(title) {
this._dlg_btns_fns = new Array("f1");
}

Dialogo.prototype.setButtons = function (val) {
var tp = valor.split("@");
for(i=0;i'+this._dlg_btns[i]+'';
   html += ' ';
}
html += '';
html += '';

$("body").append(html);

var links = $("#overlay_botoes a");
links.click(function(e) {
  e.preventDefault();
  var indexOfThisLink = links.index(this);

  var tb = $("#overlay_botoes 
a").get(indexOfThisLink).toString();

  eval(tb.replace(location.href,""));
});

I want to assign the contents of the this._dlg_btns_fns as functions
but I can't reference the this._dlg_btns_fns from the object. I've
read something on the groups like caching the variable but can't seem
to apply in this piece of code.

Thank you for any help you can provide on this.



[jQuery] Re: AJAX and dynamically created dropdowns

2007-10-20 Thread Brook Davies

You'll never see it in the 'view source' if its dynamically added. If you
use the Inspect function of firefox you can see the dynamically added
content. I think the IE developer toolbar does the same thing.

Make sure that you are setting the length of the selects option array and
setting a text/value pair for each entry in the drop down.

When you say 'no results', what do you mean? No results when you submit the
form?

Brook

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Yaz
Sent: October 19, 2007 11:59 AM
To: jQuery (English)
Subject: [jQuery] Re: AJAX and dynamically created dropdowns


With the select plugin I get the same results.
Added the form tag. Still no results.

Btw, I noticed that even though in Firefox the dropdown does get
populated, at view source there is no list of schools

Thanks for the suggestion guys.

-yaz

On Oct 19, 2:31 pm, Jack Killpatrick <[EMAIL PROTECTED]> wrote:
> FWIW, I've never had any problems with id and name being the same on
> controls in IE. I don't see a  tag on the page, maybe that's the
> issue?
>
> You might also want to try this:
>
> http://www.texotela.co.uk/code/jquery/select/
>
> - Jack
>
> Chris Jordan wrote:
> > Could it be because you're name and id are identical?
>
> > 
> > 
>
> > Perhaps IE doesn't like this?
>
> > Just a guess.
>
> > Chris
>
> > On 10/19/07, *Yaz* <[EMAIL PROTECTED] > wrote:
>
> > Hello everyone,
>
> > I have a script that basically just reads some data from an xml
file,
> > then the data gets loaded into a  dropdown, by dynamically
> > creating  tags.
>
> > Here's the working sample:
> >http://yazmedia.com/sandbox/
>
> > View source for the code. XML:http://yazmedia.com/sandbox/data.html
>
> > It works fine in Firefox, but in IE 7 or 6 it doesn't. I tried
> > using a
> > function "addOption()" that I found online, to see if at least I was
> > doing something wrong in my code, but still neither option works.
>
> > Anything that could shed a little light into this would be much
> > appreciated.
>
> > -yaz
>
> > --
> >http://cjordan.us





[jQuery] select the last 2 elements in list

2007-10-20 Thread figo2476

e.g.


a
b <-
c <-


I did:

$(document).ready(function() {
   $("#update li:last").addClass("last_li");
   $(jQuery.sibling("#update
li:last").prev).addClass("sec_last_li");
});


The last element works, but not the 2nd last



[jQuery] Re: slideDown problem in IE6 and IE7

2007-10-20 Thread chrisandy

Sorry - very new to this and thought that it maybe a known issue -
anyway here's the link:

http://www.nedhomes.com/Manners-Court-Averham-Newark.html


Thanks



[jQuery] Re: Does anyone know about Easy Dom?

2007-10-20 Thread charliend

Thank you a lot for your answer,
It will help me a lot i'm sure about it, I will look at it soonly
Because I'm done for today I finally succeed to do what I wanted. I
will contact you if have any problem.
Thank you again have a good weekend!
Charlie

On 19 oct, 20:58, polyrhythmic <[EMAIL PROTECTED]> wrote:
> Charliend,
>
> That blog entry IS the original website, and it has a download link.
> (Look about a page and a half down, where it says "Here is the source
> code, or you can download it:")  The source is also plainly written in
> the blog entry.  I have used EasyDOM as part of the basis for my
> SuperFlyDOM plugin -- and the methods have been discussed at length,
> read through the comments on that entry debating DOM creation methods
> to get some more ideas, Oslow's suggestions are particularly
> interesting.
>
> Feel free to pick up SuperFlyDOM (http://jquery.com/plugins/project/
> SuperFlyDOM), it's pretty well documented, but works less like the
> original EasyDOM and more like Oslow's suggestions, so I don't know if
> it'll interest you.
>
> I'm going to be updating my code this weekend, but I'm also familiar
> with EasyDOM if you have any questions.
>
> Charles
> doublerebel.com
>
> On Oct 19, 6:51 am, charliend <[EMAIL PROTECTED]> wrote:
>
> > Hello all,
>
> > I'm currently working on a project which used previously EasyDom based
> > on Jquery. I would like to find some information about it. But, except
> > on this 
> > website:http://mg.to/2006/02/27/easy-dom-creation-for-jquery-and-prototype
> > , I can't find anything. I can't even find the original website to
> > download it...
> > Does anyone have something?
>
> > Thanks,
> > Charliend



[jQuery] Re: Masked Input Plugin Direction

2007-10-20 Thread sidisinsane

I've been using a i18n.css which makes heavy use of serving language
specific styles using the lang attribute as selector.
While at the moment this is pure css (IE needs some javascript), I
would love to see more use of the lang attribute in more sofisticated
ways.

Just for better understanding, this is an extract from my i18n.css for
serving quotes:
/* display from right to left */
[lang*="ar"],[lang*="fa"],[lang*="he"],[lang*="ur"] {
unicode-bidi: bidi-override;
direction: rtl;
}
/* japanese single-quote, blockquote, blockquote inner inner quote */
[lang*="ja"] q::before,blockquote p[lang*="ja"]::before,
blockquote p[lang*="ja"] q q::before {
content: "\300C";
}
[lang*="ja"] q::after,blockquote p[lang*="ja"]::after,
blockquote p[lang*="ja"] q q::after {
content: "\300D";
}
/* japanese inner quote, blockquote inner quote */
[lang*="ja"] q q::before,blockquote p[lang*="ja"] q::before {
content: "\300E";
}
[lang*="ja"] q q::after,blockquote p[lang*="ja"] q::after {
content: "\300F";
}

You can grab the country-code of your visitor on the server-side (see
here: http://www.maxmind.com/app/api) or
with javascript only by using this service: 
http://www.maxmind.com/app/javascript
The country-code could then be the default lang value.

I hope this offers a little direction.



[jQuery] jquery 1.2.1 and form plugin

2007-10-20 Thread Mark

Hi, please check if is everything fine with the new jquery version.

I am having a problem with ajaxSubmit. It seems like never call the
success funcion configured in the options object.

It works with jquery 1.1.3, but dont with the new one.
I am using the latest form plugin published in the form plugin site.

Thanks.
Mark



[jQuery] Selecting elements WITHOUT children?

2007-10-20 Thread Damien

Hey all, this is my first time posting to the mailing list, so please,
be gentle. ;)

Anyway, to the point, I have long lists of items similar to the HTML
below

Item 1
Item 2
Item 3

Now, what I need to do here is be able to select and apply a function
to Item 1, without having the said function cascade and apply to Item
2 and Item 3.

Any one have any idea how I should go about this?

For your reference, here are the selectors I've been using for Item 2
and 3:

$("ul.preview span a")

>From there, i just differentiate in my code between the two by what
attributes they have. Unfortunately, I have no way to do that with the
span tags without modifying the HTML.



[jQuery] Re: Getting window portal size in 1.2.1

2007-10-20 Thread Alexandre Plennevaux

oups, sorry i answered before reading the origin of this thread. Nevermind!!

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Alexandre Plennevaux
Sent: samedi 20 octobre 2007 13:54
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Getting window portal size in 1.2.1


i think with jquery1.2.1 you can just do this:

$(window).width();
$(window).height();

if not, you can do that using the dimensions.js plugin. 

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Olaf Bosch
Sent: samedi 20 octobre 2007 8:23
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Getting window portal size in 1.2.1


Jeffrey Kretz schrieb:
> Using jQuery 1.2.1, I wanted to get the window portal size for use in 
> some layer positioning.
> 
>  
> 
> I am able to obtain the correct width but NOT the correct height.

I use this function from Thickbox ;)

   function TB_getPageSize(){
 var de = document.documentElement;
 var w = window.innerWidth || self.innerWidth ||
(de&&de.clientWidth) || document.body.clientWidth;
 var h = window.innerHeight || self.innerHeight ||
(de&&de.clientHeight) || document.body.clientHeight;
 arrayPageSize = new Array(w,h);
 return arrayPageSize;
   }

And then use this:


 var pagesize = TB_getPageSize();
 var win_w = pagesize[0];
 var win_h = pagesize[1];


--
Viele Grüße, Olaf

---
[EMAIL PROTECTED]
http://olaf-bosch.de
www.akitafreund.de
---

Ce message Envoi est certifié sans virus connu.
Analyse effectuée par AVG.
Version: 7.5.488 / Base de données virus: 269.15.3/1081 - Date: 19/10/2007
17:41
 

Ce message Envoi est certifié sans virus connu.
Analyse effectuée par AVG.
Version: 7.5.488 / Base de données virus: 269.15.3/1081 - Date: 19/10/2007
17:41
 



[jQuery] Re: Getting window portal size in 1.2.1

2007-10-20 Thread Alexandre Plennevaux

i think with jquery1.2.1 you can just do this:

$(window).width();
$(window).height();

if not, you can do that using the dimensions.js plugin. 

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Olaf Bosch
Sent: samedi 20 octobre 2007 8:23
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Getting window portal size in 1.2.1


Jeffrey Kretz schrieb:
> Using jQuery 1.2.1, I wanted to get the window portal size for use in 
> some layer positioning.
> 
>  
> 
> I am able to obtain the correct width but NOT the correct height.

I use this function from Thickbox ;)

   function TB_getPageSize(){
 var de = document.documentElement;
 var w = window.innerWidth || self.innerWidth ||
(de&&de.clientWidth) || document.body.clientWidth;
 var h = window.innerHeight || self.innerHeight ||
(de&&de.clientHeight) || document.body.clientHeight;
 arrayPageSize = new Array(w,h);
 return arrayPageSize;
   }

And then use this:


 var pagesize = TB_getPageSize();
 var win_w = pagesize[0];
 var win_h = pagesize[1];


--
Viele Grüße, Olaf

---
[EMAIL PROTECTED]
http://olaf-bosch.de
www.akitafreund.de
---

Ce message Envoi est certifié sans virus connu.
Analyse effectuée par AVG.
Version: 7.5.488 / Base de données virus: 269.15.3/1081 - Date: 19/10/2007
17:41
 



[jQuery] Re: Getting window portal size in 1.2.1

2007-10-20 Thread Olaf Bosch


Jeffrey Kretz schrieb:

Using jQuery 1.2.1, I wanted to get the window portal size for use in some
layer positioning.

 


I am able to obtain the correct width but NOT the correct height.


I use this function from Thickbox ;)

  function TB_getPageSize(){
var de = document.documentElement;
var w = window.innerWidth || self.innerWidth || 
(de&&de.clientWidth) || document.body.clientWidth;
var h = window.innerHeight || self.innerHeight || 
(de&&de.clientHeight) || document.body.clientHeight;

arrayPageSize = new Array(w,h);
return arrayPageSize;
  }

And then use this:


var pagesize = TB_getPageSize();
var win_w = pagesize[0];
var win_h = pagesize[1];


--
Viele Grüße, Olaf

---
[EMAIL PROTECTED]
http://olaf-bosch.de
www.akitafreund.de
---