[jQuery] Re: is it possible to do this (ignore clicks)

2009-03-20 Thread gmoniey

thanks...i'll give that a shot...i knew there had to be an easy
wayim loving jquery more and more...

On Mar 19, 4:42 pm, Richard D. Worth rdwo...@gmail.com wrote:
 In the click callback, check event.target

 $('div.mydiv').click(function(event) {
   if ($(event.target).is('.mydiv')) {
     //this code will not run if you click on an element without .mydiv class
   }

 });

 - Richard

 On Thu, Mar 19, 2009 at 5:42 PM, gmoniey gmon...@gmail.com wrote:

  Hi...I have div that when clicks on expands (kinda like an
  accordion...but multiple divs can be expanded at once)

  The code is something like this:

  $('div').filter('.mydiv').click(function () {
  //expand the div here (ajax call)
  });

  Now my problem is that inside this div, there can sometimes be a
  link.When the link is clicked, the browser is obviously directed to
  the new page, however, the ajax call is still fired off, and the div
  attempts to expand (or collapse) before the new page is rendered

  Is it possible to somehow ignore the click when it is on a hyperlink?
  I want to reduce the load on the server by removing the unneeded ajax
  call.

  Thanks!




[jQuery] Re: Javascript city state zipcode country component

2009-03-20 Thread Vijay

Do you use this from the client side using Javascript like jquery ?
Thanks for your response.
Vijay

On Mar 19, 7:47 am, ricardobeat ricardob...@gmail.com wrote:
 I'm using Maxmind's GeoLite City open-source database. It's free and
 has surprising accuracy. They also have paid webservice plans with
 more precise data.

 http://www.maxmind.com/app/geolitecity

 cheers,
 - ricardo

 On Mar 19, 12:06 am, Vijay Balakrishnan bvija...@gmail.com wrote:

  Hi,

  Has anyone used a stable Javascript component for city, state,zip,country ?
  Doesn't matter if it costs money as long as it is usable off the shelf and
  has the US Military Area codes too.

  I have found a few by Googling but wanted to know if PJUG users had any good
  experience with any of these components ?

 http://www.google.com/search?hl=enq=javascript+zipcode+city+state+co...

  TIA,
  Vijay


[jQuery] Re: Javascript city state zipcode country component

2009-03-20 Thread Vijay

Thanks for your response. I am looking for a full fledged commercial
ready to use product hopefully making a call from the client side.

Vijay

On Mar 19, 9:04 am, MorningZ morni...@gmail.com wrote:
 Another option to possible look at

 http://bassistance.de/2009/03/03/jquery-snippet-autocomplete-city-bas...

 although i have idea if it applies to PJUG since I have no idea what
 it is

 On Mar 19, 10:47 am, ricardobeat ricardob...@gmail.com wrote:

  I'm using Maxmind's GeoLite City open-source database. It's free and
  has surprising accuracy. They also have paid webservice plans with
  more precise data.

 http://www.maxmind.com/app/geolitecity

  cheers,
  - ricardo

  On Mar 19, 12:06 am, Vijay Balakrishnan bvija...@gmail.com wrote:

   Hi,

   Has anyone used a stable Javascript component for city, state,zip,country 
   ?
   Doesn't matter if it costs money as long as it is usable off the shelf and
   has the US Military Area codes too.

   I have found a few by Googling but wanted to know if PJUG users had any 
   good
   experience with any of these components ?

  http://www.google.com/search?hl=enq=javascript+zipcode+city+state+co...

   TIA,
   Vijay


[jQuery] Re: is it possible to do this (ignore clicks)

2009-03-20 Thread Steven Yang
i believe you can simply do e.stopPropagation()because you get event
bubbling for the events inside the div
all the events bind to element inside your div should use
e.stopPropagation()

please correct me if i am wrong


[jQuery] Re: Call for contributors: A simple, fast and flexible grid/spreadsheet component.

2009-03-20 Thread Tin

Sridhar,

The grid itself is fairly data-agnostic.  It reads the data through
the JavaScript array interface, but what drives the datasource is
completely arbitrary.  The examples on the project home page show
several ways of feeding the data to the grid.  Examples #1-#3 load the
data directly in a client-side JavaScript array - you can adapt that
to load the missing parts from the server through ajax.  I will add
some examples of doing that soon, but it is pretty straightforward.
The MUCH more interesting way of feeding the data to the grid is
through a Model or, in the case of example #4 a filtered DataView.
That allows you to implement search, filter, sort, expand/collapse,
etc. and have all of that happen on the client and real-time.  It does
have limitations on the amount of the data since the browser has to do
all the work for sorting, filtering and figuring out the differences
between the two consecutive states.  Those limitations will really
depend on your data, but just to give you an example, on my laptop,
example #4 is still quite usable with 50'000 items after yesterday's
round of optimizations :)

The next logical step is to write a disconnected, AJAX-enabled server-
driven DataView for working with extremely large datasets, and that is
what I will likely have to tackle soon (btw, this is where some help
would be appreciated!).  The implementation would be pretty similar,
but most of the operations would get moved to the server, and the data
will be lazy-loaded.




On Mar 19, 9:02 pm, Sridhar dsridha...@gmail.com wrote:
 Hi,

    I am not sure how you are loading the data from server side and how
 you are updating the data. do you have any examples? The grid looks
 really nice. It is as fast as it can be. I am really impressed with
 speed. I am still learning jquery. I wish I could have contributed for
 this. By the way, I am trying to use this in asp.net 2.0

 Thanks,
 sridhar.

 On Mar 18, 5:25 pm, Tin michael.leib...@gmail.com wrote:



  Updated the last example (http://slickgrid.googlecode.com/svn/trunk/
  example4-model.html) with column sorting (click on column headers).
  Some grid code refactoring plus multiple bug fixes and performance
  enhancements (try the slider!).


[jQuery] Re: Call for contributors: A simple, fast and flexible grid/spreadsheet component.

2009-03-20 Thread Tin

BTW, I *did* mean to say 50'000 items - that's not a typo.  The
example is set to use 500 rows, but setting it to 50'000 works
reasonably well in IE7, which by my benchmarks (http://
slickgrid.googlecode.com/svn/trunk/model%20benchmarks.html) is about 4
times slower than FF3 and Chrome/Safari.  The slider can't keep up
with the processing, but sorting and filtering by task title works
fine.


On Mar 20, 1:23 am, Tin michael.leib...@gmail.com wrote:
 Sridhar,

 The grid itself is fairly data-agnostic.  It reads the data through
 the JavaScript array interface, but what drives the datasource is
 completely arbitrary.  The examples on the project home page show
 several ways of feeding the data to the grid.  Examples #1-#3 load the
 data directly in a client-side JavaScript array - you can adapt that
 to load the missing parts from the server through ajax.  I will add
 some examples of doing that soon, but it is pretty straightforward.
 The MUCH more interesting way of feeding the data to the grid is
 through a Model or, in the case of example #4 a filtered DataView.
 That allows you to implement search, filter, sort, expand/collapse,
 etc. and have all of that happen on the client and real-time.  It does
 have limitations on the amount of the data since the browser has to do
 all the work for sorting, filtering and figuring out the differences
 between the two consecutive states.  Those limitations will really
 depend on your data, but just to give you an example, on my laptop,
 example #4 is still quite usable with 50'000 items after yesterday's
 round of optimizations :)

 The next logical step is to write a disconnected, AJAX-enabled server-
 driven DataView for working with extremely large datasets, and that is
 what I will likely have to tackle soon (btw, this is where some help
 would be appreciated!).  The implementation would be pretty similar,
 but most of the operations would get moved to the server, and the data
 will be lazy-loaded.

 On Mar 19, 9:02 pm, Sridhar dsridha...@gmail.com wrote:



  Hi,

     I am not sure how you are loading the data from server side and how
  you are updating the data. do you have any examples? The grid looks
  really nice. It is as fast as it can be. I am really impressed with
  speed. I am still learning jquery. I wish I could have contributed for
  this. By the way, I am trying to use this in asp.net 2.0

  Thanks,
  sridhar.

  On Mar 18, 5:25 pm, Tin michael.leib...@gmail.com wrote:

   Updated the last example (http://slickgrid.googlecode.com/svn/trunk/
   example4-model.html) with column sorting (click on column headers).
   Some grid code refactoring plus multiple bug fixes and performance
   enhancements (try the slider!).


[jQuery] Cross-Domain Jquery event?

2009-03-20 Thread david.0pl...@gmail.com

I ask you gurus of jquery because I have no clue if this thing is even
possible: I'll try to explain:

I have several domains, which resides on the same server, on top of
the page of each domain there's an iframe with the same content for
every domain (there's a precise reason for this but it's complex and
pretty long to explain and not relevant here). Now I want the user to
be able to click a link inside this iframe and fire an event on the
top level page, this can be achieved easily (http://
webmastereseller.com/test/iframe_test.htm).
The problem is that the content of the iframe resides on a
completely different domain and java returns a permission denied to
obtain properties of Window.centerPopup in fact the .centerPopup
resides on a completely different domain.

Now is there a workaround for this?
If not, is there another way to trigger and event after a click inside
an iframe linked to a file in another domain?

thanks


[jQuery] Re: findValue

2009-03-20 Thread Bright Dadson
Thanks very much guys for the advice - it is really usefull to me.
Apppreciate it alot.

Quick question! my code has been altered to reflect the change suggested,
like this;

 $(#operator).autocomplete(auto.php,
   {
   delay:10,
   lineSeparator: ^,
   cacheLength: 10,
   matchSubset:1,
   matchContains:1,
   onFindValue:function(){
   if ($(#operator:first).autocompleter.findValue() !== ' '){
  $(#mesage).append(I am working);
   }
   },
   autoFill:true
   });

After testing, it is still not displaying the message as required - can
anyone spot the ommition?


[jQuery] Re: compare jQuery objects

2009-03-20 Thread DBJDBJ

Urgh, I was typing too fast ;o( Meaning was lost. This is the amended
versio :

On Mar 20, 9:45 am, DBJDBJ dbj...@gmail.com wrote:
 The real issue is architecture of jQ. By design jQ object keeps its
 state. State being array of references to dom nodes aka elements.
 The references NOT the objects. The pointers. One has to expect that
 anything can happen to the objects which are being referenced.

 Example:
 var $1 = $(#sprite) ;
 var $2 = $(#sprite, document.body ) ;
 // at this point $1 and $2 do point to the same element
 $2.remove() ;
 // now where does $1 points to ?
 $1.show()

 Think a bit about this : when are two jQ objects equal ?
 They are actually equal when they operate on the same dom objects.
 Which are result of the INITIAL selection STATEMENT.
 Can we have two same sets of dom objects , arrived at with two
 different selectors? Of course we can.
 But does this mean that their two jQ handlers are equal (aka) same
 objects ? No. They are different.

 So we have two valid QUESTIONS ON equality of two jQ objects :

 Q1 :: Are two jQ objects operating on same DOM elements ?

 Q2 :: Are two jQ objects the same ?

 Matt has given code to support the answer to the Q1. It is only that
 plugin nAme is deeply troublesome. It should be nameD something like :
 equal_elements

 Answer to Q2 is simple :

 $(#sprite).selector == $(#sprite).selector // true

 And reveals clearly that we have here an very questionable approach.

 Q3 :: Why have two jQ objects with same selectors?
 Q4 :: Why have two jQ objects operating on same set of elements ?

 I think this might happen only accidentaly. With dynamicaly created
 elements, or simillar ?
 Also I can imagine one wishing to have some globar manager of jQ
 instances on the page ... Where one would like to manage (keep) one
 instance per one set of elements ... I think they would be an overkill
 for scripting of web application client side ? A factory of jQ
 instances anyone ;o)


[jQuery] Re: compare jQuery objects

2009-03-20 Thread DBJDBJ


The real issue is architecture of jQ. By design jQ object keeps its
state. State being array of references to dom nodes aka elements.
The references no the objects. The pointers. One has to expect that
anything can happen to the objects which are being referenced.

Example:
precode
var $1 = $(#sprite) ;
var $2 = $(#sprite, document.body ) ;
// at this point $1 and $2 do point to the same element
$2.remove() ;
// now where does $1 points to ?
$1.show()
/code/pre

Think a bit about this : when are two jQ objects equal ?
They are actually equal when they operate on the same dom objects.
Which are result of the selection.
Can we have two same sets of dom objects , arrived at with two
different selectors? Of course we can.
But does this mean that their two jQ handlers are equal (aka) same
objects ? No. Theey are different.

So we have two valid quations of equality of two jQ objects :

Q1 :: Are two jQ objects operating on same DOM elements ?

Q2 :: Are two jQ objects the same ?

Matt has given code to support the answer to the Q1. It is only that
plugin neme is deeply troublesome. It should be names something like :
equal_elements

Answer to Q2 is simple :

strong$(#sprite).selector == $(#sprite).selector // true/
strong

And reveals clearly the questionable approach.

Q3 :: Why have two jQ objects with same selectors?
Q4 :: Why have two jQ objects operating on same set of elements ?

I think this might happen only accidentaly. With dynamicaly created
elements, or simillar ?
Also I can imagine one wishing to have some globar manager of jQ
instances on the page ... Where one would like to manage (keep) one
instance per one set of elements ... I think they would be a overkill
for scripting of web application client side ? A factory of jQ
instances anyone ;o)




[jQuery] Re: Do you figure out how to do this?

2009-03-20 Thread Adrian Grigoras

So if I use a reverse proxy it will work.In this case there will be
seen as a single domain.


On Mar 20, 5:24 am, James james.gp@gmail.com wrote:
 No, I believe that calling example1.mydomain.com from
 example2.mydomain.com will still not work. That is also considered a
 separate domain.

 On Mar 19, 4:47 am, Adrian Grigoras adrianc.grigo...@gmail.com
 wrote:

  If the call in in the same domain, but on another machine, it will
  work?

  For example, call example1.mydomain.com from example2.mydomain.com

  Thanks

  On Mar 19, 3:36 pm, MorningZ morni...@gmail.com wrote:

   I'm not sure who you are replying to, but regardless, the $.ajax code
   cannot call another domain

   you'll have to use an iframe tag or work out something on your
   server side code to call the remote domain and then call that code
   from your javascript  (pretty much using your server/code as a proxy)

   On Mar 19, 5:46 am, Adrian Grigoras adrianc.grigo...@gmail.com
   wrote:

I have the same question. I want to load some external file, for
example:http://www.google.com.

This is my code:
html
head
        titlejQuery - Ajax dynamic content loading/title
        script src=http://code.jquery.com/jquery-latest.js; 
type=text/
javascript/script
        script type=text/javascript
                function loadContent(id) {
                        $.ajax({
                                url: http://www.google.com;,
                                cache: false,
                                success: function(html){
                                $(#contentArea).append(html);
  }});

                }
        /script
/head
body onLoad=loadContent();

        div id=contentArea style=margin: 20px 0px 10px 10px; 
border: 1px
solid #CCC; width: 780px; height: 250px; float: left;
                nbsp;
        /div

/body
/html


[jQuery] Re: Cross-Domain Jquery event?

2009-03-20 Thread Martin Möller

david wrote:
 in fact the .centerPopup
 resides on a completely different domain.
 Now is there a workaround for this?

Dear David,
 you could read up on:

Cross Frame Communication with Fragment Identifiers
http://www.tagneto.org/blogcode/xframe/ui.html#pipeMessage_1237544371429

And this might be interesting too:
http://scvdotnet.org/index.php?/archives/8-Autofitting-iFrame.html

Cheers,
Martin


[jQuery] Re: Validation and Tabs plugins compatibility

2009-03-20 Thread Jörn Zaefferer

I've released an update to the validation plugin, including a demo
showing integration with jQuery UI tabs:
http://jquery.bassistance.de/validate/demo/tabs

Jörn

On Tue, Jul 8, 2008 at 10:56 PM, peace4theapes peace4thea...@gmail.com wrote:

 Diego,

 Thanks for the reply. I tried this idea but it threw up another
 interesting problem. I was wondering if you could throw some light on
 it.

 When the validation plugin adds an error class, it does not remove it
 once the form is validated. Therefore when I switch to the tab with
 the error class, the same tab is selected every time.

 Also, do you know how I could call this small (tab changing) function
 from the validate plugin? Something like form.validate({onerror:
 changetabs()}

 Thanks again,
 -P



[jQuery] jQuery.strict === true

2009-03-20 Thread DBJDBJ

http://x.dbjsystems.com/blog/?p=86


[jQuery] Re: is it possible to do this (ignore clicks)

2009-03-20 Thread Brendan

Couldn't you bind an onclick event to whatever links you want to stop
and just have them return false; ?

On Mar 20, 3:22 am, Steven Yang kenshin...@gmail.com wrote:
 i believe you can simply do e.stopPropagation()because you get event
 bubbling for the events inside the div
 all the events bind to element inside your div should use
 e.stopPropagation()

 please correct me if i am wrong


[jQuery] Re: live works in IE6?

2009-03-20 Thread benjamw

http://jsbin.com/evuqi

Does not work in IE6

On Feb 7, 9:15 pm, Dave Methvin dave.meth...@gmail.com wrote:
  File a ticket:http://dev.jquery.com

 Before doing that, post a sample here. A lot of bugs are not bugs.


[jQuery] Re: live works in IE6?

2009-03-20 Thread benjamw

My bad, disregard that previous one, I was unaware that 'submit' was
not yet supported by live( ).

Is there a quick way I can fake it for now?

On Mar 20, 12:52 pm, benjamw benjamwel...@gmail.com wrote:
 http://jsbin.com/evuqi

 Does not work inIE6

 On Feb 7, 9:15 pm, Dave Methvin dave.meth...@gmail.com wrote:



   File a ticket:http://dev.jquery.com

  Before doing that, post a sample here. A lot of bugs are not bugs.


[jQuery] What does this do?

2009-03-20 Thread Danjojo

Sorry not a quiz... I just am having trouble remembering how I built
this.

What does this do?

firstInt = Number($(div#upsell .upsell_feature_module:visible).attr
(id));

Is it counting where in the chain of Div's the current position is?

My code is:

function scrollCartUpsells(num){
if (Number(num) == 1){
firstInt = Number($
(div#upsell .upsell_feature_module:visible).attr(id));
alert(firstInt);
nextInt = Number(firstInt) + 1;
prevInt = Number(firstInt) - 1;
lastInt = Number(firstInt) + Number(spanInt); // lastInt
gets display: none;
}
if (Number(num) == -1){
firstInt = Number($
(div#upsell .upsell_feature_module:visible).attr(id)) -1;
nextInt = Number(firstInt) + 1;
prevInt = Number(firstInt) - 1;
lastInt = Number(firstInt) + Number(spanInt); // lastInt
gets display: none;
}

//   BUTTON VISIBILITY CONTROLS 

if(Number(firstInt)  0) {
$(#scrollLeft).removeClass(none);
}
if(Number(firstInt) = 1) {
$(#scrollLeft).addClass(none);
if(Number($(div#upsell .upsell_feature_module:visible).attr
(id)) == 1){
$(#scrollLeft).removeClass(none);
}
}
if(Number(lastInt) = Number(endInt)) {
$(#scrollRight).addClass(none);
}
if(Number(lastInt)  Number(endInt)) {
$(#scrollRight).removeClass(none);
}
//   BUTTON VISIBILITY CONTROLS 



if (Number(num) == 1){
$(#+firstInt).addClass(none);
$(#+firstInt).css('margin-left', '5px');
$(#+nextInt).css('margin-left', '40px');
$(#+lastInt).removeClass(none);
}
if (Number(num) == -1){
lastInt = Number(firstInt) + Number(spanInt);
$(#+firstInt).removeClass(none);
$(#+firstInt).css('margin-left', '40px');
$(#+nextInt).css('margin-left', '5px');
$(#+lastInt).addClass(none);
$(#scrollRight).removeClass(none);
}
}


[jQuery] Rotating CSS classes each 5 sec

2009-03-20 Thread Alexandru Dinulescu
Hello.

I have a huge question. I need something that rotates classes each 5 seconds
for ex

I have a div class=img1 /div. I want each 5 seconds the class to be
changed from img1 to img2, and so on so at the start an array should be
placed like
imgArray = [ img1 , img2, img3,  etc ]

I need css classes changed not a plain image since  the image is a
background image and i have text on it.

I did look over google but i couldnt find any help regarding this matter.

Thank you

---
Alexandru Dinulescu
Web Developer
(X)HTML/CSS Specialist
Expert Guarantee Certified Developer
XHTML: http://www.expertrating.com/transcript.asp?transcriptid=1879053
CSS : http://www.expertrating.com/transcript.asp?transcriptid=1870619
RentACoder Profile:
http://www.rentacoder.com/RentACoder/DotNet/SoftwareCoders/ShowBioInfo.aspx?lngAuthorId=6995323

MainWebsite: http://alexd.adore.ro


[jQuery] problems with dynamic click event... how do I get the index in there ?

2009-03-20 Thread hybris77

hi folks, if anyone could direct me in the right direction here I'd be
very happy

what's wrong here :

$( calculationsArray ).each(function(){
var index = $( calculationsArray ).index(this);
$( .calculations_list ).append( li
class='calculations_menu_list'+ (index+1)+/li)
.click( function(){
var i = $(  this  ).index( this );

alert( i );

});
});

im trying to get the index into the event. either the index that i
have already defined before the event
or extracting it from the element with the event on it...

many thanks


[jQuery] Re: Rotating CSS classes each 5 sec

2009-03-20 Thread hybris77

if that is all you want to do using jQuery or pure javascript then
look
at how to use setInterval ... that can be defined to run a function
at sertain intervals.

check this one out also

http://www.thatagency.com/design-studio-blog/2009/01/refreshing-an-element-at-a-set-time-interval-using-jquery-and-a-sprinkle-of-ajax/



On 20 Mar, 13:15, Alexandru Dinulescu alex.d.a...@gmail.com wrote:
 Hello.

 I have a huge question. I need something that rotates classes each 5 seconds
 for ex

 I have a div class=img1 /div. I want each 5 seconds the class to be
 changed from img1 to img2, and so on so at the start an array should be
 placed like
 imgArray = [ img1 , img2, img3,  etc ]

 I need css classes changed not a plain image since  the image is a
 background image and i have text on it.

 I did look over google but i couldnt find any help regarding this matter.

 Thank you

 ---
 Alexandru Dinulescu
 Web Developer
 (X)HTML/CSS Specialist
 Expert Guarantee Certified Developer
 XHTML:http://www.expertrating.com/transcript.asp?transcriptid=1879053
 CSS :http://www.expertrating.com/transcript.asp?transcriptid=1870619
 RentACoder 
 Profile:http://www.rentacoder.com/RentACoder/DotNet/SoftwareCoders/ShowBioInf...

 MainWebsite:http://alexd.adore.ro


[jQuery] Re: Rotating CSS classes each 5 sec

2009-03-20 Thread jQuery Lover

The code is not perfect:

var imgArray = [ img1 , img2, img3];

function swap(i){
if(imgArray.length  i){
$('.' + imgArray[i]).removeClass(imgArray[i]).addClass(imgArray[i+1]);
}else{
return;
}
setTimeout(swap(+(i+1)+), 5000);
}

// Call the function
swap(0);


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



On Fri, Mar 20, 2009 at 5:15 PM, Alexandru Dinulescu
alex.d.a...@gmail.com wrote:
 Hello.

 I have a huge question. I need something that rotates classes each 5 seconds
 for ex

 I have a div class=img1 /div. I want each 5 seconds the class to be
 changed from img1 to img2, and so on so at the start an array should be
 placed like
 imgArray = [ img1 , img2, img3,  etc ]

 I need css classes changed not a plain image since  the image is a
 background image and i have text on it.

 I did look over google but i couldnt find any help regarding this matter.

 Thank you

 ---
 Alexandru Dinulescu
 Web Developer
 (X)HTML/CSS Specialist
 Expert Guarantee Certified Developer
 XHTML: http://www.expertrating.com/transcript.asp?transcriptid=1879053
 CSS : http://www.expertrating.com/transcript.asp?transcriptid=1870619
 RentACoder Profile:
 http://www.rentacoder.com/RentACoder/DotNet/SoftwareCoders/ShowBioInfo.aspx?lngAuthorId=6995323

 MainWebsite: http://alexd.adore.ro




[jQuery] Re: problems with dynamic click event... how do I get the index in there ?

2009-03-20 Thread jQuery Lover

Why don't you use this syntax so .each() would pass the current index for you...

$( calculationsArray ).each(function( INDEX ){


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



On Fri, Mar 20, 2009 at 5:29 PM, hybris77 dist...@yahoo.com wrote:

 hi folks, if anyone could direct me in the right direction here I'd be
 very happy

 what's wrong here :

 $( calculationsArray ).each(function(){
        var index = $( calculationsArray ).index(this);
        $( .calculations_list ).append( li
 class='calculations_menu_list'+ (index+1)+/li)
        .click( function(){
        var i = $(  this  ).index( this );

        alert( i );

        });
 });

 im trying to get the index into the event. either the index that i
 have already defined before the event
 or extracting it from the element with the event on it...

 many thanks


[jQuery] Re: What does this do?

2009-03-20 Thread jQuery Lover

Gets you the first visible .upsell_feature_module's ID (in id=upcell
container).


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



On Fri, Mar 20, 2009 at 5:01 PM, Danjojo dlcac...@gmail.com wrote:

 Sorry not a quiz... I just am having trouble remembering how I built
 this.

 What does this do?

 firstInt = Number($(div#upsell .upsell_feature_module:visible).attr
 (id));

 Is it counting where in the chain of Div's the current position is?

 My code is:

 function scrollCartUpsells(num){
        if (Number(num) == 1){
            firstInt = Number($
 (div#upsell .upsell_feature_module:visible).attr(id));
            alert(firstInt);
            nextInt = Number(firstInt) + 1;
            prevInt = Number(firstInt) - 1;
            lastInt = Number(firstInt) + Number(spanInt); // lastInt
 gets display: none;
        }
        if (Number(num) == -1){
            firstInt = Number($
 (div#upsell .upsell_feature_module:visible).attr(id)) -1;
            nextInt = Number(firstInt) + 1;
            prevInt = Number(firstInt) - 1;
            lastInt = Number(firstInt) + Number(spanInt); // lastInt
 gets display: none;
        }

            //   BUTTON VISIBILITY CONTROLS 
 
            if(Number(firstInt)  0) {
                $(#scrollLeft).removeClass(none);
            }
            if(Number(firstInt) = 1) {
                $(#scrollLeft).addClass(none);
                if(Number($(div#upsell .upsell_feature_module:visible).attr
 (id)) == 1){
                $(#scrollLeft).removeClass(none);
                }
            }
        if(Number(lastInt) = Number(endInt)) {
            $(#scrollRight).addClass(none);
        }
                if(Number(lastInt)  Number(endInt)) {
            $(#scrollRight).removeClass(none);
        }
        //   BUTTON VISIBILITY CONTROLS 
 


            if (Number(num) == 1){
                $(#+firstInt).addClass(none);
                $(#+firstInt).css('margin-left', '5px');
                $(#+nextInt).css('margin-left', '40px');
                    $(#+lastInt).removeClass(none);
                }
            if (Number(num) == -1){
            lastInt = Number(firstInt) + Number(spanInt);
                $(#+firstInt).removeClass(none);
                $(#+firstInt).css('margin-left', '40px');
                $(#+nextInt).css('margin-left', '5px');
                    $(#+lastInt).addClass(none);
                    $(#scrollRight).removeClass(none);
        }
 }


[jQuery] Re: scrollTo firefox ugliness

2009-03-20 Thread Dan Pouliot

THANK YOU THANK YOU THANK YOU!!! Worked like a charm!

On Mar 19, 8:47 pm, mkmanning michaell...@gmail.com wrote:
 Try changing overflow:auto to overflow:hidden in scroll.css*:

 .section{
         width:3900px;
         position:relative;
         overflow:auto;

 }

 *n.b.: I only did this in Firebug, so not promising anything :)

 On Mar 19, 4:36 pm, Dan Pouliot danpoul...@gmail.com wrote:



  First let me say a great THANKS to Ariel Flesler, the author of
  scrollTo.

  Now on to the odd behavior. I have it working on this 
  page:http://www.omansion.com/weddings_and_parties/

  (click the more link in the tan box in the center of the page).

  Every browser scrolls this correctly, includingfirefox, but FF on the
  PC shows the objects on either side of the scrollable region moving
  annoyingly while the text is scrolling. Hopefully there is an easy fix
  for this!

  Thanks in advance,
  Dan Pouliot


[jQuery] Re: What does this do?

2009-03-20 Thread Danjojo

Ok cool, I was wondering, isn't it supposed to return a number?
because I am alerting NaN

On Mar 20, 8:19 am, jQuery Lover ilovejqu...@gmail.com wrote:
 Gets you the first visible .upsell_feature_module's ID (in id=upcell
 container).

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

 On Fri, Mar 20, 2009 at 5:01 PM, Danjojo dlcac...@gmail.com wrote:

  Sorry not a quiz... I just am having trouble remembering how I built
  this.

  What does this do?

  firstInt = Number($(div#upsell .upsell_feature_module:visible).attr
  (id));

  Is it counting where in the chain of Div's the current position is?

  My code is:

  function scrollCartUpsells(num){
         if (Number(num) == 1){
             firstInt = Number($
  (div#upsell .upsell_feature_module:visible).attr(id));
             alert(firstInt);
             nextInt = Number(firstInt) + 1;
             prevInt = Number(firstInt) - 1;
             lastInt = Number(firstInt) + Number(spanInt); // lastInt
  gets display: none;
         }
         if (Number(num) == -1){
             firstInt = Number($
  (div#upsell .upsell_feature_module:visible).attr(id)) -1;
             nextInt = Number(firstInt) + 1;
             prevInt = Number(firstInt) - 1;
             lastInt = Number(firstInt) + Number(spanInt); // lastInt
  gets display: none;
         }

             //   BUTTON VISIBILITY CONTROLS 
  
             if(Number(firstInt)  0) {
                 $(#scrollLeft).removeClass(none);
             }
             if(Number(firstInt) = 1) {
                 $(#scrollLeft).addClass(none);
                 if(Number($(div#upsell .upsell_feature_module:visible).attr
  (id)) == 1){
                 $(#scrollLeft).removeClass(none);
                 }
             }
         if(Number(lastInt) = Number(endInt)) {
             $(#scrollRight).addClass(none);
         }
                 if(Number(lastInt)  Number(endInt)) {
             $(#scrollRight).removeClass(none);
         }
         //   BUTTON VISIBILITY CONTROLS 
  

             if (Number(num) == 1){
                 $(#+firstInt).addClass(none);
                 $(#+firstInt).css('margin-left', '5px');
                 $(#+nextInt).css('margin-left', '40px');
                     $(#+lastInt).removeClass(none);
                 }
             if (Number(num) == -1){
             lastInt = Number(firstInt) + Number(spanInt);
                 $(#+firstInt).removeClass(none);
                 $(#+firstInt).css('margin-left', '40px');
                 $(#+nextInt).css('margin-left', '5px');
                     $(#+lastInt).addClass(none);
                     $(#scrollRight).removeClass(none);
         }
  }


[jQuery] Re: What does this do?

2009-03-20 Thread Danjojo

For clarity:

script type=text/javascript src=/includes/jquery.js/script
script type=text/javascript
//*** for scrolling cart upsells
$(document).ready(function(){
   $(#scrollLeft).addClass(none);
});
/script
style media=all type=text/css
.none {
display: none;
}
/style

div id=upsell
%
Dim
strACCItem,strACCItemNo,strACCItemDescription,strACCItemPrice,strACCItemEDP

For intA = 1 to RELATEDNUM
If intA = intACCItemCount Then
strACCItem = Trim(objRelateds.GetValue
(ItemNo, intA))
strACCItemNo = server.urlencode(Trim
(objRelateds.GetValue(ItemNo, intA)))
strACCItemDescription = trim
(objRelateds.GetValue(ItemDescription, intA))
strACCItemPrice = FormatCurrency(Trim
(objrELATEDS.GetValue(ItemPrice, intA)))
strACCItemEDP = trim
(objRelateds.GetValue(ItemEDP, intA))
%
div class=upsell_feature_module %
if intA = 2 then % style=margin-left:32px; %end if%
a class=upsell_img href=/
detail/%=strACCItemNo%
img src=%=getEDPImage
(strACCItemEDP,)% alt= border=0 width=84 height=84 //a
div class=upsell_text
a href=/detail/%=strACCItemNo
%%=Replace(strAccItem, MACS_PREFIX   , )%/a
/div!-- /upsell_text --
/div!-- /upsell_feature --
%
End If
Next
' Remaining products to cycle/scroll through
BUT THESE ARE HIDDEN
For intA = intA to intACCItemCount
strACCItem = Trim(objRelateds.GetValue
(ItemNo, intA))
strACCItemNo = server.urlencode(Trim
(objRelateds.GetValue(ItemNo, intA)))
strACCItemDescription = trim
(objRelateds.GetValue(ItemDescription, intA))
strACCItemPrice = FormatCurrency(Trim
(objrELATEDS.GetValue(ItemPrice, intA)))
strACCItemEDP = trim(objRelateds.GetValue
(ItemEDP, intA))
%
div class=upsell_feature_module none
style=margin-left: 5px;
a class=upsell_img href=/detail/
%=strACCItemNo%
img src=%=getEDPImage
(strACCItemEDP,)% alt= border=0 width=84 height=84 //a
div class=upsell_text
a href=/detail/%=strACCItemNo%
%=Replace(strAccItem, MACS_PREFIX   , )%/a
/div!-- /upsell_text --
/div!-- /upsell_feature --
%
Next
%

div style=position: absolute; width: 24px; 
left:
6px; top: 52px;
img class=hmm onclick=scrollCartUpsells
(-1); id=scrollLeft src=/images/arrow_left.gif alt=scroll left
width=24 height=77/
/div
div style=position: absolute; width: 24px;
left: 259px; top: 52px;
img class=hmm onclick=scrollCartUpsells
(1); id=scrollRight src=/images/arrow_right.gif alt=scroll
right width=24 height=77/
/div

script type=text/javascript
// BEGIN JSCRIPT FOR SCROLLING CART UPSELLS //
var firstInt;
var nextInt;
var prevInt;
var lastInt;

var endInt = %=intACCItemCount%;
var spanInt = %=RELATEDNUM%;
//alert('spanInt = ' + spanInt);

var endScroll = Number(endInt) - Number(spanInt);
//alert('endScroll = ' + endScroll);

var totalDiv = Number($
(div#upsell .upsell_feature_module:visible).siblings(div).size())
- 2

if(Number(totalDiv) = Number(spanInt)){
$(#scrollRight).addClass(none);
}
function scrollCartUpsells(num){
if (Number(num) == 1){
firstInt = Number($
(div#upsell .upsell_feature_module:visible).attr(id));
//Gets you the first visible .upsell_feature_module's ID
(in id=upcell container)...
alert(firstInt);
nextInt = Number(firstInt) + 1;
prevInt = Number(firstInt) - 1;
lastInt = Number(firstInt) + Number(spanInt); // lastInt
gets display: none;
}
if (Number(num) == -1){
firstInt = Number($
(div#upsell .upsell_feature_module:visible).attr(id)) -1;
nextInt = Number(firstInt) + 1;
prevInt = Number(firstInt) - 1;
lastInt = Number(firstInt) + Number(spanInt); // lastInt
gets display: none;
}

//   BUTTON VISIBILITY 

[jQuery] Re: Cross-Domain Jquery event?

2009-03-20 Thread david.0pl...@gmail.com

I just wanted to thank you, those link helped me achieve what I wanted
to do I learned a lot today, thank you!

David

On Mar 20, 11:23 am, Martin Möller ceu...@gmail.com wrote:
 david wrote:
  in fact the .centerPopup
  resides on a completely different domain.
  Now is there a workaround for this?

 Dear David,
  you could read up on:

 Cross Frame Communication with Fragment 
 Identifiershttp://www.tagneto.org/blogcode/xframe/ui.html#pipeMessage_1237544371429

 And this might be interesting 
 too:http://scvdotnet.org/index.php?/archives/8-Autofitting-iFrame.html

 Cheers,
 Martin


[jQuery] Help with jCarousel and fluide height...

2009-03-20 Thread Fix

Hello,

On my blog, I have a list of the last 5 messages posted. It's a
ullipost #5/lilipost #4/lietc.../ul list.

I'd like to display a  previous messages link on the bottom of
that list, that - when clicked - would display the 5 previous
messages, etc.

So I use jCarousel to do that, and it works well... except for 1
point : sometimes the title of the post is 1-line long, sometimes it's
2-line long, so that I can't know how long is the list of 5 posts !

So I'v tried to scroll this list horizontally, instead of
vertically... but then I'm only able to scroll 1 post per 1 post.

So here is what I'd like : I'd like to have a list like that :
ul
   liPost 1/li
   liPost 2/li
   liPost 3/li
   liPost 4/li
   liPost 5/li
/ul
And scroll it horizontally (so that it would have a fixed width, but a
fluide height)... Is this possible using jCarousel ? Or will I have to
try another script ? But which one ?

Thanx in advance.


[jQuery] Re: wmode not being written

2009-03-20 Thread ghires

Did you ever figure out a solution to this problem?  I can't get the
latest version of jquery.media.js (ver .87) to generate the wmode
param either.

On Feb 18, 2:02 pm, Jedipunk jedip...@gmail.com wrote:
 When using the jquery.Media plugin for flash video, the resulting HTML
 does not write out the wmode parameter.


[jQuery] Feedback on jQuery powered template editor

2009-03-20 Thread Cadu de Castro Alves

Hi people!

I've been developing a jQuery-powered template editor for my company.
It has a toolbox with some portlets and two columns where it ones are
dropped.

After stop creating the template, the user is able to save or preview
the template. And here is my issue. How could I do it?


[jQuery] Re: Do you figure out how to do this?

2009-03-20 Thread Marco Elisio Oliveira Jardim
You need a JSONP callback for this:

http://docs.jquery.com/Getjson

But the other web app must support it...


_
Lois Griffin: I’m a naughty girl and I need a spanking!
Peter Griffin: And I'm a paladin with 18 charisma and 97 hit-points, I can
use my helm of disintegration and do 1d4 damage as my half-mage elf wields
his +5 holy avenger.
Lois Griffin: Wait a minute, paladins can’t use the helm of disentegration!
Peter Griffin: oh — In that case then I’m a black guy.


On Fri, Mar 20, 2009 at 00:24, James james.gp@gmail.com wrote:


 No, I believe that calling example1.mydomain.com from
 example2.mydomain.com will still not work. That is also considered a
 separate domain.

 On Mar 19, 4:47 am, Adrian Grigoras adrianc.grigo...@gmail.com
 wrote:
  If the call in in the same domain, but on another machine, it will
  work?
 
  For example, call example1.mydomain.com from example2.mydomain.com
 
  Thanks
 
  On Mar 19, 3:36 pm, MorningZ morni...@gmail.com wrote:
 
   I'm not sure who you are replying to, but regardless, the $.ajax code
   cannot call another domain
 
   you'll have to use an iframe tag or work out something on your
   server side code to call the remote domain and then call that code
   from your javascript  (pretty much using your server/code as a proxy)
 
   On Mar 19, 5:46 am, Adrian Grigoras adrianc.grigo...@gmail.com
   wrote:
 
I have the same question. I want to load some external file, for
example:http://www.google.com.
 
This is my code:
html
head
titlejQuery - Ajax dynamic content loading/title
script src=http://code.jquery.com/jquery-latest.js;
 type=text/
javascript/script
script type=text/javascript
function loadContent(id) {
$.ajax({
url: http://www.google.com;,
cache: false,
success: function(html){
$(#contentArea).append(html);
  }});
 
}
/script
/head
body onLoad=loadContent();
 
div id=contentArea style=margin: 20px 0px 10px 10px;
 border: 1px
solid #CCC; width: 780px; height: 250px; float: left;
nbsp;
/div
 
/body
/html



[jQuery] JQuery selectors and Umlaute

2009-03-20 Thread srudin

I'm trying to select an element with an id containing a German Umlaut:

input id=Bestätigung.../

Unfortunately the jquery selector $(#Bestätigung) is not returning
any result. Is there a trick to make this work or is it not possible
at all?


[jQuery] Re: What does this do?

2009-03-20 Thread MorningZ

If you are getting NaN that means not a number, probably meaning
your selector isn't valid

On Mar 20, 9:07 am, Danjojo dlcac...@gmail.com wrote:
 For clarity:

 script type=text/javascript src=/includes/jquery.js/script
 script type=text/javascript
 //*** for scrolling cart upsells
 $(document).ready(function(){
    $(#scrollLeft).addClass(none);});

 /script
 style media=all type=text/css
 .none {
     display: none;}

 /style

                         div id=upsell
                                 %
                                 Dim
 strACCItem,strACCItemNo,strACCItemDescription,strACCItemPrice,strACCItemEDP

                         For intA = 1 to RELATEDNUM
                             If intA = intACCItemCount Then
                                 strACCItem = Trim(objRelateds.GetValue
 (ItemNo, intA))
                                 strACCItemNo = server.urlencode(Trim
 (objRelateds.GetValue(ItemNo, intA)))
                                 strACCItemDescription = trim
 (objRelateds.GetValue(ItemDescription, intA))
                                 strACCItemPrice = FormatCurrency(Trim
 (objrELATEDS.GetValue(ItemPrice, intA)))
                                 strACCItemEDP = trim
 (objRelateds.GetValue(ItemEDP, intA))
                                 %
                                 div class=upsell_feature_module %
 if intA = 2 then % style=margin-left:32px; %end if%
                                     a class=upsell_img href=/
 detail/%=strACCItemNo%
                                     img src=%=getEDPImage
 (strACCItemEDP,)% alt= border=0 width=84 height=84 //a
                                     div class=upsell_text
                                     a href=/detail/%=strACCItemNo
 %%=Replace(strAccItem, MACS_PREFIX   , )%/a
                                     /div!-- /upsell_text --
                                 /div!-- /upsell_feature --
                         %
                             End If
                         Next
                         ' Remaining products to cycle/scroll through
 BUT THESE ARE HIDDEN
                         For intA = intA to intACCItemCount
                             strACCItem = Trim(objRelateds.GetValue
 (ItemNo, intA))
                             strACCItemNo = server.urlencode(Trim
 (objRelateds.GetValue(ItemNo, intA)))
                             strACCItemDescription = trim
 (objRelateds.GetValue(ItemDescription, intA))
                             strACCItemPrice = FormatCurrency(Trim
 (objrELATEDS.GetValue(ItemPrice, intA)))
                             strACCItemEDP = trim(objRelateds.GetValue
 (ItemEDP, intA))
                             %
                             div class=upsell_feature_module none
 style=margin-left: 5px;
                                 a class=upsell_img href=/detail/
 %=strACCItemNo%
                                 img src=%=getEDPImage
 (strACCItemEDP,)% alt= border=0 width=84 height=84 //a
                                 div class=upsell_text
                                 a href=/detail/%=strACCItemNo%
 %=Replace(strAccItem, MACS_PREFIX   , )%/a
                                 /div!-- /upsell_text --
                             /div!-- /upsell_feature --
                         %
                         Next
                         %

                                 div style=position: absolute; width: 24px; 
 left:
 6px; top: 52px;
                                     img class=hmm 
 onclick=scrollCartUpsells
 (-1); id=scrollLeft src=/images/arrow_left.gif alt=scroll left
 width=24 height=77/
                                 /div
                         div style=position: absolute; width: 24px;
 left: 259px; top: 52px;
                             img class=hmm onclick=scrollCartUpsells
 (1); id=scrollRight src=/images/arrow_right.gif alt=scroll
 right width=24 height=77/
                         /div

 script type=text/javascript
 // BEGIN JSCRIPT FOR SCROLLING CART UPSELLS //
 var firstInt;
 var nextInt;
 var prevInt;
 var lastInt;

 var endInt = %=intACCItemCount%;
 var spanInt = %=RELATEDNUM%;
     //alert('spanInt = ' + spanInt);

 var endScroll = Number(endInt) - Number(spanInt);
     //alert('endScroll = ' + endScroll);

 var totalDiv = Number($
 (div#upsell .upsell_feature_module:visible).siblings(div).size())
 - 2

     if(Number(totalDiv) = Number(spanInt)){
         $(#scrollRight).addClass(none);
     }
 function scrollCartUpsells(num){
         if (Number(num) == 1){
             firstInt = Number($
 (div#upsell .upsell_feature_module:visible).attr(id));
             //Gets you the first visible .upsell_feature_module's ID
 (in id=upcell container)...
             alert(firstInt);
             nextInt = Number(firstInt) + 1;
             prevInt = Number(firstInt) - 1;
             lastInt = Number(firstInt) + Number(spanInt); // lastInt
 gets display: none;
         }
         if (Number(num) == -1){
             firstInt = Number($
 (div#upsell 

[jQuery] Re: jquery.dates

2009-03-20 Thread RyanEv

Anyone have any other ideas?

On Mar 19, 2:53 pm, RyanEv ryan.everh...@gmail.com wrote:
 I still get the same error on the datePicker line.

 $(document).ready( function ()
         {
                       setTimeout(function(){
                       $(#sample1).datePicker();
                }, 50);
                });

 Is the DatePicker function included in the jquery 1.3 file?

 On Mar 19, 12:41 pm, Jack Killpatrick j...@ihwy.com wrote:



  IIRC I had a similar issue with datePicker in IE and doing something
  like this resolved it:

  $(document).ready(function(){
      setTimeout(function(){
         $('#sample1').datePicker();
      }, 50);

  });

  worth a quick try, at least. I've also had to use a setTimeout like that
  for IE when there was Flash on the page.

  - Jack

  RyanEv wrote:
   All,
   I'm having an issue with the jquery.dates plug-in (http://
   grover.open2space.com/jquery.dates/home).  What is strange is that the
   error only happens in IE and not in FF.  Everything plays nice in FF.
   The error I am getting in IE is the the object does not support this
   property or method on line 29.

   27:  script type=text/javascript
   28:    $(document).ready( function () {
   29:      $(#sample1).datePicker();
   30:      $(#sample2).datePicker({format: .mm.dd});
   31:      $(#anchorSample3).datePicker({parent: $(#sample3)[0]});

   Not sure why the datePicker() function would work in FF but not IE.
   Do you guys think it has somethign to do with $(document).ready
   ( function () { on line 28?   Is there an issue with jquery, IE and
   this function?  I am using jquery 1.3.

   Ryan- Hide quoted text -

  - Show quoted text -- Hide quoted text -

 - Show quoted text -


[jQuery] Help tracking down error in IE8 / jquery 1.3.2

2009-03-20 Thread Adam

Message: Invalid argument.
Line: 12
Char: 12949
Code: 0
URI: http://domain/shared/jquery/jquery-1.3.2.min.js


I keep getting the above error In IE but Not FF.. Everything works
great in FF, and almost in IE.. But I am having a hard time tracking
down the cause this issue in IE...  any help appreciated.


[jQuery] Re: Help tracking down error in IE8 / jquery 1.3.2

2009-03-20 Thread MorningZ

Got any example code?

You haven't provided even close to enough information to help

also, use the full version of jQuery instead of the minified version,
then you'll may get a more specific location of where this happens

On Mar 20, 10:07 am, Adam epne...@gmail.com wrote:
 Message: Invalid argument.
 Line: 12
 Char: 12949
 Code: 0
 URI:http://domain/shared/jquery/jquery-1.3.2.min.js

 I keep getting the above error In IE but Not FF.. Everything works
 great in FF, and almost in IE.. But I am having a hard time tracking
 down the cause this issue in IE...  any help appreciated.


[jQuery] Re: What does this do?

2009-03-20 Thread Danjojo

Ok.. I was missing the  id=%=intA% on the element.

Thanks for the help.

It's working in another site now.

On Mar 20, 9:29 am, MorningZ morni...@gmail.com wrote:
 If you are getting NaN that means not a number, probably meaning
 your selector isn't valid

 On Mar 20, 9:07 am, Danjojo dlcac...@gmail.com wrote:

  For clarity:

  script type=text/javascript src=/includes/jquery.js/script
  script type=text/javascript
  //*** for scrolling cart upsells
  $(document).ready(function(){
     $(#scrollLeft).addClass(none);});

  /script
  style media=all type=text/css
  .none {
      display: none;}

  /style

                          div id=upsell
                                  %
                                  Dim
  strACCItem,strACCItemNo,strACCItemDescription,strACCItemPrice,strACCItemEDP

                          For intA = 1 to RELATEDNUM
                              If intA = intACCItemCount Then
                                  strACCItem = Trim(objRelateds.GetValue
  (ItemNo, intA))
                                  strACCItemNo = server.urlencode(Trim
  (objRelateds.GetValue(ItemNo, intA)))
                                  strACCItemDescription = trim
  (objRelateds.GetValue(ItemDescription, intA))
                                  strACCItemPrice = FormatCurrency(Trim
  (objrELATEDS.GetValue(ItemPrice, intA)))
                                  strACCItemEDP = trim
  (objRelateds.GetValue(ItemEDP, intA))
                                  %
                                  div class=upsell_feature_module %
  if intA = 2 then % style=margin-left:32px; %end if%
                                      a class=upsell_img href=/
  detail/%=strACCItemNo%
                                      img src=%=getEDPImage
  (strACCItemEDP,)% alt= border=0 width=84 height=84 //a
                                      div class=upsell_text
                                      a href=/detail/%=strACCItemNo
  %%=Replace(strAccItem, MACS_PREFIX   , )%/a
                                      /div!-- /upsell_text --
                                  /div!-- /upsell_feature --
                          %
                              End If
                          Next
                          ' Remaining products to cycle/scroll through
  BUT THESE ARE HIDDEN
                          For intA = intA to intACCItemCount
                              strACCItem = Trim(objRelateds.GetValue
  (ItemNo, intA))
                              strACCItemNo = server.urlencode(Trim
  (objRelateds.GetValue(ItemNo, intA)))
                              strACCItemDescription = trim
  (objRelateds.GetValue(ItemDescription, intA))
                              strACCItemPrice = FormatCurrency(Trim
  (objrELATEDS.GetValue(ItemPrice, intA)))
                              strACCItemEDP = trim(objRelateds.GetValue
  (ItemEDP, intA))
                              %
                              div class=upsell_feature_module none
  style=margin-left: 5px;
                                  a class=upsell_img href=/detail/
  %=strACCItemNo%
                                  img src=%=getEDPImage
  (strACCItemEDP,)% alt= border=0 width=84 height=84 //a
                                  div class=upsell_text
                                  a href=/detail/%=strACCItemNo%
  %=Replace(strAccItem, MACS_PREFIX   , )%/a
                                  /div!-- /upsell_text --
                              /div!-- /upsell_feature --
                          %
                          Next
                          %

                                  div style=position: absolute; width: 
  24px; left:
  6px; top: 52px;
                                      img class=hmm 
  onclick=scrollCartUpsells
  (-1); id=scrollLeft src=/images/arrow_left.gif alt=scroll left
  width=24 height=77/
                                  /div
                          div style=position: absolute; width: 24px;
  left: 259px; top: 52px;
                              img class=hmm onclick=scrollCartUpsells
  (1); id=scrollRight src=/images/arrow_right.gif alt=scroll
  right width=24 height=77/
                          /div

  script type=text/javascript
  // BEGIN JSCRIPT FOR SCROLLING CART UPSELLS //
  var firstInt;
  var nextInt;
  var prevInt;
  var lastInt;

  var endInt = %=intACCItemCount%;
  var spanInt = %=RELATEDNUM%;
      //alert('spanInt = ' + spanInt);

  var endScroll = Number(endInt) - Number(spanInt);
      //alert('endScroll = ' + endScroll);

  var totalDiv = Number($
  (div#upsell .upsell_feature_module:visible).siblings(div).size())
  - 2

      if(Number(totalDiv) = Number(spanInt)){
          $(#scrollRight).addClass(none);
      }
  function scrollCartUpsells(num){
          if (Number(num) == 1){
              firstInt = Number($
  (div#upsell .upsell_feature_module:visible).attr(id));
              //Gets you the first visible .upsell_feature_module's ID
  (in id=upcell container)...
              alert(firstInt);
              

[jQuery] Re: Help tracking down error in IE8 / jquery 1.3.2

2009-03-20 Thread Adam Drew

FYI, all is well in Safari as well as Firefox... The main thing in IE
that breaks down is my main Tabs setup...   and the only javascript
error indicated is that it  Could not get display title. Invalid
Argument, but that's all I can see about this.


On Mar 20, 10:07 am, Adam epne...@gmail.com wrote:
 Message: Invalid argument.
 Line: 12
 Char: 12949
 Code: 0
 URI:http://domain/shared/jquery/jquery-1.3.2.min.js

 I keep getting the above error In IE but Not FF.. Everything works
 great in FF, and almost in IE.. But I am having a hard time tracking
 down the cause this issue in IE...  any help appreciated.


[jQuery] Re: Help tracking down error in IE8 / jquery 1.3.2

2009-03-20 Thread Adam Drew

Using the dev version, I can break it down to this function..  line
1061 ch 4

I guess i should go track down anything that's playing with an
elements opacity???


// from jquery.1.3.2.js
// IE uses filters for opacity

if ( !jQuery.support.opacity  name == opacity ) {
if ( set ) {
// IE has trouble with opacity if it does not 
have layout
// Force it by setting the zoom level
elem.zoom = 1;

// Set the alpha filter to set the opacity
elem.filter = (elem.filter || ).replace( 
/alpha\([^)]*\)/,  )
+
(parseInt( value ) + '' == NaN ?  : 
alpha(opacity= + value
* 100 + ));
}

return elem.filter  elem.filter.indexOf(opacity=) 
= 0 ?
(parseFloat( 
elem.filter.match(/opacity=([^)]*)/)[1] ) / 100) +
'':
;
}

name = name.replace(/-([a-z])/ig, function(all, letter){
return letter.toUpperCase();
});

if ( set )
  elem[ name ] =
value;  //
BREAKS HERE -

return elem[ name ];
},


[jQuery] Re: Malsup's Cycle plugin exhibiting strange behavior

2009-03-20 Thread Asinox


Hi Mike, thanks for u great Plugin... now i need to know how ill change the
width and height and the padding.

Thanks u




malsup wrote:
 
 
 The first issue is in FF 3.0.7 on Mac. Occasionally, the first image
 appears no problem, however the remaining images show up extremely
 small. I tried setting a fixed width and height to the images, but
 that didn't have an effect on it.

 The other issue is in Safari 3 on Mac. The first image appears, but
 after it fades out no other images fade in. After a set amount of
 time, the first image shows up again, then it repeats the process.
 This happens every time.

 Is this an issue with the JQuery?
 
 
 Can you please try the latest version of the Cycle plugin?  Some
 sizing bugs were fixed in late February.
 
 http://www.malsup.com/jquery/cycle/download.html
 
 Mike
 
 

-- 
View this message in context: 
http://www.nabble.com/Malsup%27s-Cycle-plugin-exhibiting-strange-behavior-tp22399553s27240p22621605.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: Help tracking down error in IE8 / jquery 1.3.2

2009-03-20 Thread Martijn Houtman



On Mar 20, 2009, at 3:07 PM, Adam wrote:


Message: Invalid argument.
Line: 12
Char: 12949
Code: 0
URI: http://domain/shared/jquery/jquery-1.3.2.min.js


Half of the time I get this error, it is because I have one comma too  
much in an array, such as:


var foo {
foo: bar,
bar: foo,   - note the comma here
};

Check it out.


[jQuery] Re: Help tracking down error in IE8 / jquery 1.3.2

2009-03-20 Thread Martijn Houtman



On Mar 20, 2009, at 3:22 PM, Adam Drew wrote:



Using the dev version, I can break it down to this function..  line
1061 ch 4

I guess i should go track down anything that's playing with an
elements opacity???


// from jquery.1.3.2.js
// IE uses filters for opacity

if ( !jQuery.support.opacity  name == opacity ) {
if ( set ) {
// IE has trouble with opacity if it does not 
have layout
// Force it by setting the zoom level
elem.zoom = 1;

// Set the alpha filter to set the opacity
elem.filter = (elem.filter || ).replace( 
/alpha\([^)]*\)/,  )
+
(parseInt( value ) + '' == NaN ?  : 
alpha(opacity= + value
* 100 + ));
}

return elem.filter  elem.filter.indexOf(opacity=) 
= 0 ?
(parseFloat( 
elem.filter.match(/opacity=([^)]*)/)[1] ) / 100) +
'':
;
}

name = name.replace(/-([a-z])/ig, function(all, letter){
return letter.toUpperCase();
});

if ( set )
  elem[ name ] =
value;  //
BREAKS HERE -

return elem[ name ];
},


Ah, this seems like an invalid or non-existent CSS property. What CSS  
options are you passing?


Regards,
--
Martijn.


[jQuery] how to load(text with the + sign in it)

2009-03-20 Thread Alexandre Plennevaux

friends,

i'm doing an ajax call via the load() function. The fetched string
contains the + sign, and it gets removed in the resulting html. Why
is that?
note: i'm using php. The only way i found to have the string shown, is
to urlencode() it. But i don't want to urlencode() entire texts that
should remain human-readable.
I'm sure there is an obvious solution, however i can't seem to find it.

thank you in advance for your help in solving this weird issue.

Alexandre


[jQuery] Re: Help tracking down error in IE8 / jquery 1.3.2

2009-03-20 Thread Adam Drew

Thanks For your input Martijn,

Unfortunately, I'm not sure where my culprit code is yet.. so I'm not
sure what options are being passed.

I'm looking now for typos, extra properties or invalid attr
references..\


-Adam



[jQuery] Best way to iterate over a string (each character)

2009-03-20 Thread dimitre

Hello, I am trying to do a simple thing in JQuery, and found some
different ways to make it work. Altough all of them behave identically
and correct in Firefox  Safari, few works in IE.
Which of them you consider the correct way, OR
Was ths supposed to work OK on IE too?
Thank you

PS: in the case you were wondering, I was not using console.log on
IE

$(function() {
texto = 'persona non grata';
$.each(texto, function() {
console.log($(this)[0]);
});
})


$(function() {
texto = 'persona non grata';
$.each(texto, function() {
console.log(this[0]);
});
})



$(function() {
texto = 'persona non grata';
$.each(texto, function(i, nome) {
console.log(nome);
});
})



$(function() {
texto = 'persona non grata';
$.each(texto.split(''), function(i, nome) {
console.log(nome);
});
})



[jQuery] Re: how to load(text with the + sign in it)

2009-03-20 Thread Martijn Houtman



On Mar 20, 2009, at 3:59 PM, Alexandre Plennevaux wrote:


i'm doing an ajax call via the load() function. The fetched string
contains the + sign, and it gets removed in the resulting html. Why
is that?
note: i'm using php. The only way i found to have the string shown, is
to urlencode() it. But i don't want to urlencode() entire texts that
should remain human-readable.
I'm sure there is an obvious solution, however i can't seem to find  
it.


try htmlentities() rather than urlencode() (PHP). I believe the plus  
sign is interpreted as a space. Please do note that this escapes  
_all_ HTML code, so it will not be interpreted as HTML (if it  
contains any).


Regards,
--
Martijn. 


[jQuery] Re: Help tracking down error in IE8 / jquery 1.3.2

2009-03-20 Thread Martijn Houtman



On Mar 20, 2009, at 4:02 PM, Adam Drew wrote:


Thanks For your input Martijn,


You're welcome. I just now remember when I got this error. It was  
when I was (accidentally) trying to set the CSS property  
backgroundColor to none, rather than transparent. This worked  
in FF/Safari (or at least no error), but IE gave me an error, just  
like yours.


Regards,
--
Martijn.


[jQuery] Re: how to load(text with the + sign in it)

2009-03-20 Thread Alexandre Plennevaux

Hello, i tried that, but htmlentities(A+) echos A+, so it does not
convert it.

On Fri, Mar 20, 2009 at 4:06 PM, Martijn Houtman
martijn.hout...@gmail.com wrote:


 On Mar 20, 2009, at 3:59 PM, Alexandre Plennevaux wrote:

 i'm doing an ajax call via the load() function. The fetched string
 contains the + sign, and it gets removed in the resulting html. Why
 is that?
 note: i'm using php. The only way i found to have the string shown, is
 to urlencode() it. But i don't want to urlencode() entire texts that
 should remain human-readable.
 I'm sure there is an obvious solution, however i can't seem to find it.

 try htmlentities() rather than urlencode() (PHP). I believe the plus sign is
 interpreted as a space. Please do note that this escapes _all_ HTML code, so
 it will not be interpreted as HTML (if it contains any).

 Regards,
 --
 Martijn.



[jQuery] Re: Help tracking down error in IE8 / jquery 1.3.2

2009-03-20 Thread Adam Drew

did a break point in the ie8 dev console on it and watched the
following values break at that line a few times during the page
load...

name = outline
value = 0 none !important

Those values breaks it every time it comes around..

I'm going to see what is setting these values..


On Mar 20, 10:40 am, Martijn Houtman martijn.hout...@gmail.com
wrote:
 On Mar 20, 2009, at 3:22 PM, Adam Drew wrote:





  Using the dev version, I can break it down to this function..  line
  1061 ch 4

  I guess i should go track down anything that's playing with an
  elements opacity???

  // from jquery.1.3.2.js
  // IE uses filters for opacity

             if ( !jQuery.support.opacity  name == opacity ) {
                     if ( set ) {
                             // IE has trouble with opacity if it does not 
  have layout
                             // Force it by setting the zoom level
                             elem.zoom = 1;

                             // Set the alpha filter to set the opacity
                             elem.filter = (elem.filter || ).replace( 
  /alpha\([^)]*\)/,  )
  +
                                     (parseInt( value ) + '' == NaN ?  : 
  alpha(opacity= + value
  * 100 + ));
                     }

                     return elem.filter  elem.filter.indexOf(opacity=) = 
  0 ?
                             (parseFloat( 
  elem.filter.match(/opacity=([^)]*)/)[1] ) / 100) +
  '':
                             ;
             }

             name = name.replace(/-([a-z])/ig, function(all, letter){
                     return letter.toUpperCase();
             });

             if ( set )
                        elem[ name ] =
  value;                                                          //
  BREAKS HERE -

             return elem[ name ];
     },

 Ah, this seems like an invalid or non-existent CSS property. What CSS  
 options are you passing?

 Regards,
 --
 Martijn.


[jQuery] $(document).ready(function() is causing scripts to run twice!

2009-03-20 Thread Derek Perkins

I encase all of my functions inside of a jQuery(document).ready
(function() {} block, but I noticed recently that my scripts are
running multiple times.  After a lot of debugging, I realized that
they only ran once after I deleted that segment of code.  The first
time it ran however, it wouldn't stop at any debugging breakpoints.
Should I just avoid that function altogether?


[jQuery] Re: Best way to iterate over a string (each character)

2009-03-20 Thread MorningZ

Why not use simple JavaScript (which under the hood jQuery is using
anyways)?

for (var i=0; i  texto.length; i++) {
 console.log(texto.charAt(i));
}



On Mar 20, 11:04 am, dimitre dimitr...@gmail.com wrote:
 Hello, I am trying to do a simple thing in JQuery, and found some
 different ways to make it work. Altough all of them behave identically
 and correct in Firefox  Safari, few works in IE.
 Which of them you consider the correct way, OR
 Was ths supposed to work OK on IE too?
 Thank you

 PS: in the case you were wondering, I was not using console.log on
 IE

 $(function() {
         texto = 'persona non grata';
         $.each(texto, function() {
                 console.log($(this)[0]);
         });

 })

 $(function() {
         texto = 'persona non grata';
         $.each(texto, function() {
                 console.log(this[0]);
         });

 })

 $(function() {
         texto = 'persona non grata';
         $.each(texto, function(i, nome) {
                 console.log(nome);
         });

 })

 $(function() {
         texto = 'persona non grata';
         $.each(texto.split(''), function(i, nome) {
                 console.log(nome);
         });

 })


[jQuery] Re: Help tracking down error in IE8 / jquery 1.3.2

2009-03-20 Thread Martijn Houtman


On Mar 20, 2009, at 4:35 PM, Adam Drew wrote:


name = outline
value = 0 none !important

Those values breaks it every time it comes around..

I'm going to see what is setting these values..


http://www.w3schools.com/CSS/pr_outline.asp

The value you are setting seems unsupported. Try either outline- 
style: none or 0px as width.


Regards,
--
Martijn.

[jQuery] Re: JQuery selectors and Umlaute

2009-03-20 Thread Karl Swedberg
Which version of jQuery are using? Are you seeing any JavaScript  
errors? I just tested this and it worked fine:


result:
http://jsbin.com/otaya/

code:
http://jsbin.com/otaya/edit

--Karl


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




On Mar 20, 2009, at 5:57 AM, srudin wrote:



I'm trying to select an element with an id containing a German Umlaut:

input id=Bestätigung.../

Unfortunately the jquery selector $(#Bestätigung) is not returning
any result. Is there a trick to make this work or is it not possible
at all?




[jQuery] Re: Help tracking down error in IE8 / jquery 1.3.2

2009-03-20 Thread Adam Drew

Looks like it's due to the themeswitcher widget I setup
yesterday.

// jquery.themeswitcher.js
//pane css
switcherpane.css({
position: 'absolute',
float: 'left',
fontFamily: 'Trebuchet MS, Verdana, sans-serif',
fontSize: '12px',
background: '#000',
color: '#fff',
padding: '8px 3px 3px',
border: '1px solid #ccc',
'-moz-border-radius-bottomleft': '6px',
'-webkit-border-bottom-left-radius': '6px',
'-moz-border-radius-bottomright': '6px',
'-webkit-border-bottom-right-radius': '6px',
borderTop: 0,
zIndex: 99,
width: options.width-6//minus must match left and right padding
})
.find('ul').css({
listStyle: 'none',
margin: '0',
padding: '0',
overflow: 'auto',
height: options.height
}).end()
.find('li').hover(
function(){
$(this).css({
'borderColor':'#555',
'background': 
'url(/themeroller/themeswitchertool/images/
menuhoverbg.png) 50% 50% repeat-x',
cursor: 'pointer'
});
},
function(){
$(this).css({
'borderColor':'#111',
'background': '#000',
cursor: 'auto'
});
}
).css({
width: options.width-30,
height: '',
padding: '2px',
margin: '1px',
border: '1px solid #111',
'-moz-border-radius': '4px',
clear: 'left',
float: 'left'
}).end()
.find('a').css({
color: '#aaa',
textDecoration: 'none',
float: 'left',
width: '100%',
outline: '0 none !important'// THIS LINE BREAKS 
IN
IE8
}).end()
.find('img').css({
float: 'left',
border: '1px solid #333',
margin: '0 2px'
}).end()
.find('.themeName').css({
float: 'left',
margin: '3px 0'
}).end();



On Mar 20, 11:35 am, Adam Drew epne...@gmail.com wrote:
 did a break point in the ie8 dev console on it and watched the
 following values break at that line a few times during the page
 load...

 name = outline
 value = 0 none !important

 Those values breaks it every time it comes around..

 I'm going to see what is setting these values..

 On Mar 20, 10:40 am, Martijn Houtman martijn.hout...@gmail.com
 wrote:

  On Mar 20, 2009, at 3:22 PM, Adam Drew wrote:

   Using the dev version, I can break it down to this function..  line
   1061 ch 4

   I guess i should go track down anything that's playing with an
   elements opacity???

   // from jquery.1.3.2.js
   // IE uses filters for opacity

              if ( !jQuery.support.opacity  name == opacity ) {
                      if ( set ) {
                              // IE has trouble with opacity if it does not 
   have layout
                              // Force it by setting the zoom level
                              elem.zoom = 1;

                              // Set the alpha filter to set the opacity
                              elem.filter = (elem.filter || ).replace( 
   /alpha\([^)]*\)/,  )
   +
                                      (parseInt( value ) + '' == NaN ?  
   : alpha(opacity= + value
   * 100 + ));
                      }

                      return elem.filter  elem.filter.indexOf(opacity=) 
   = 0 ?
                              (parseFloat( 
   elem.filter.match(/opacity=([^)]*)/)[1] ) / 100) +
   '':
                              ;
              }

              name = name.replace(/-([a-z])/ig, function(all, letter){
                      return letter.toUpperCase();
              });

              if ( set )
                         elem[ name ] =
   value;                                                          //
   BREAKS HERE -

              return elem[ name ];
      },

  Ah, this seems like an invalid or non-existent CSS property. What CSS  
  options are you passing?

  Regards,
  --
  Martijn.


[jQuery] Re: $(document).ready(function() is causing scripts to run twice!

2009-03-20 Thread MorningZ

If the code is running twice, then you don't have it wired in
correctly

showing the HTML and script would be a big help to getting others to
help you


On Mar 20, 11:38 am, Derek Perkins derekaperk...@gmail.com wrote:
 I encase all of my functions inside of a jQuery(document).ready
 (function() {} block, but I noticed recently that my scripts are
 running multiple times.  After a lot of debugging, I realized that
 they only ran once after I deleted that segment of code.  The first
 time it ran however, it wouldn't stop at any debugging breakpoints.
 Should I just avoid that function altogether?


[jQuery] How do you iterate across elements with the same class name?

2009-03-20 Thread Thierry

I have a bunch of hyperlinks with class 'hello_world'.  I want to
assign each one of them a random colour.  I can set the colour for all
of them with the following:

$(a[class=hello_world]).css(color, red);

How can I iterate over every element with class name 'hello_world'?


[jQuery] Re: How do you iterate across elements with the same class name?

2009-03-20 Thread Mike Fratto

I think you are looking for each( callback )
http://docs.jquery.com/Core/each#callback

On Fri, Mar 20, 2009 at 12:48 PM, Thierry lamthie...@gmail.com wrote:

 I have a bunch of hyperlinks with class 'hello_world'.  I want to
 assign each one of them a random colour.  I can set the colour for all
 of them with the following:

 $(a[class=hello_world]).css(color, red);

 How can I iterate over every element with class name 'hello_world'?


[jQuery] Re: How do you iterate across elements with the same class name?

2009-03-20 Thread MorningZ

$(a.hello_world).each(function() {
  //  $(this) = this current hyperlink
});

On Mar 20, 12:48 pm, Thierry lamthie...@gmail.com wrote:
 I have a bunch of hyperlinks with class 'hello_world'.  I want to
 assign each one of them a random colour.  I can set the colour for all
 of them with the following:

 $(a[class=hello_world]).css(color, red);

 How can I iterate over every element with class name 'hello_world'?


[jQuery] Re: How do you iterate across elements with the same class name?

2009-03-20 Thread Charlie Griefer
On Fri, Mar 20, 2009 at 9:48 AM, Thierry lamthie...@gmail.com wrote:


 I have a bunch of hyperlinks with class 'hello_world'.  I want to
 assign each one of them a random colour.  I can set the colour for all
 of them with the following:

 $(a[class=hello_world]).css(color, red);

 How can I iterate over every element with class name 'hello_world'?


$(function() {
$('a[class=hello_world]').each(function() {
 randomColor = (some code here to create a random color);
 $(this).css('color', randomColor);
});
});


-- 
I have failed as much as I have succeeded. But I love my life. I love my
wife. And I wish you my kind of success.


[jQuery] Tutorial for serialScroll?

2009-03-20 Thread Jack Killpatrick


Hi All,

I did a nifty implementation using jquery serialScroll to scroll images 
inside an iphone image (to display screenshots: site isn't publicly 
available yet). I had to reverse-engineer my way through the demos and 
other people's implementations to figure out how to make it work. Main 
problems stemmed from getting the html and css right. Anyway, I'm 
wondering if anyone knows of some good tutorials for serialScroll? If 
not, I rekkin I might write one up.


Thx,
Jack



[jQuery] Re: How do you iterate across elements with the same class name?

2009-03-20 Thread Thierry L

Great, that helps but I think I'll do it from the server side code,
the web page loads much faster when the operation is done on the
server side.

On Mar 20, 12:58 pm, Charlie Griefer charlie.grie...@gmail.com
wrote:
 On Fri, Mar 20, 2009 at 9:48 AM, Thierry lamthie...@gmail.com wrote:

  I have a bunch of hyperlinks with class 'hello_world'.  I want to
  assign each one of them a random colour.  I can set the colour for all
  of them with the following:

  $(a[class=hello_world]).css(color, red);

  How can I iterate over every element with class name 'hello_world'?

 $(function() {
 $('a[class=hello_world]').each(function() {
  randomColor = (some code here to create a random color);
  $(this).css('color', randomColor);

 });
 });

 --
 I have failed as much as I have succeeded. But I love my life. I love my
 wife. And I wish you my kind of success.


[jQuery] Re: How do you iterate across elements with the same class name?

2009-03-20 Thread Eric Garside

Take a look at this page I threw up on jsbin: http://jsbin.com/uzecu/edit

It uses a neat little random color generator I found years ago bound
to an event. Seems pretty quick, too. The javascript:

$(function(){
  $('.colour')
.bind('randomizeColor', function(){ this.style.background =
(Math.round(0xFF * Math.random()).toString(16) + 00).replace
(/([a-f0-9]{6}).+/, #$1).toUpperCase()})
.trigger('randomizeColor');
});

On Mar 20, 1:24 pm, Thierry L lamthie...@gmail.com wrote:
 Great, that helps but I think I'll do it from the server side code,
 the web page loads much faster when the operation is done on the
 server side.

 On Mar 20, 12:58 pm, Charlie Griefer charlie.grie...@gmail.com
 wrote:

  On Fri, Mar 20, 2009 at 9:48 AM, Thierry lamthie...@gmail.com wrote:

   I have a bunch of hyperlinks with class 'hello_world'.  I want to
   assign each one of them a random colour.  I can set the colour for all
   of them with the following:

   $(a[class=hello_world]).css(color, red);

   How can I iterate over every element with class name 'hello_world'?

  $(function() {
  $('a[class=hello_world]').each(function() {
   randomColor = (some code here to create a random color);
   $(this).css('color', randomColor);

  });
  });

  --
  I have failed as much as I have succeeded. But I love my life. I love my
  wife. And I wish you my kind of success.


[jQuery] Re: JQuery selectors and Umlaute

2009-03-20 Thread Klaus Hartl

Even if it would work I recommend to avoid Umlaute. They're invalid in
ids.

http://www.w3.org/TR/REC-html40/types.html#type-name


--Klaus



On 20 Mrz., 16:52, Karl Swedberg k...@englishrules.com wrote:
 Which version of jQuery are using? Are you seeing any JavaScript  
 errors? I just tested this and it worked fine:

 result:http://jsbin.com/otaya/

 code:http://jsbin.com/otaya/edit

 --Karl

 
 Karl Swedbergwww.englishrules.comwww.learningjquery.com

 On Mar 20, 2009, at 5:57 AM, srudin wrote:



  I'm trying to select an element with an id containing a German Umlaut:

  input id=Bestätigung.../

  Unfortunately the jquery selector $(#Bestätigung) is not returning
  any result. Is there a trick to make this work or is it not possible
  at all?




[jQuery] Re: Rotating CSS classes each 5 sec

2009-03-20 Thread Alexandru Dinulescu
Thank you.

I will try that tomorrow morning and see if it works

Cheers

---
Alexandru Dinulescu
Web Developer
(X)HTML/CSS Specialist
Expert Guarantee Certified Developer
XHTML: http://www.expertrating.com/transcript.asp?transcriptid=1879053
CSS : http://www.expertrating.com/transcript.asp?transcriptid=1870619
RentACoder Profile:
http://www.rentacoder.com/RentACoder/DotNet/SoftwareCoders/ShowBioInfo.aspx?lngAuthorId=6995323

MainWebsite: http://alexd.adore.ro



On Fri, Mar 20, 2009 at 2:39 PM, jQuery Lover ilovejqu...@gmail.com wrote:


 The code is not perfect:

 var imgArray = [ img1 , img2, img3];

 function swap(i){
if(imgArray.length  i){
$('.' +
 imgArray[i]).removeClass(imgArray[i]).addClass(imgArray[i+1]);
}else{
return;
}
 setTimeout(swap(+(i+1)+), 5000);
 }

 // Call the function
 swap(0);

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



 On Fri, Mar 20, 2009 at 5:15 PM, Alexandru Dinulescu
 alex.d.a...@gmail.com wrote:
  Hello.
 
  I have a huge question. I need something that rotates classes each 5
 seconds
  for ex
 
  I have a div class=img1 /div. I want each 5 seconds the class to be
  changed from img1 to img2, and so on so at the start an array should be
  placed like
  imgArray = [ img1 , img2, img3,  etc ]
 
  I need css classes changed not a plain image since  the image is a
  background image and i have text on it.
 
  I did look over google but i couldnt find any help regarding this matter.
 
  Thank you
 
  ---
  Alexandru Dinulescu
  Web Developer
  (X)HTML/CSS Specialist
  Expert Guarantee Certified Developer
  XHTML: http://www.expertrating.com/transcript.asp?transcriptid=1879053
  CSS : http://www.expertrating.com/transcript.asp?transcriptid=1870619
  RentACoder Profile:
 
 http://www.rentacoder.com/RentACoder/DotNet/SoftwareCoders/ShowBioInfo.aspx?lngAuthorId=6995323
 
  MainWebsite: http://alexd.adore.ro
 
 



[jQuery] Re: $(document).ready(function() is causing scripts to run twice!

2009-03-20 Thread James

Showing some code and html would definitely help.
There's a possibility that you're loading a page that runs the code,
and then dynamically loading another page immediately (e.g. through
AJAX Tabs) that contains the piece of code again on that page and
executing it.

On Mar 20, 6:25 am, MorningZ morni...@gmail.com wrote:
 If the code is running twice, then you don't have it wired in
 correctly

 showing the HTML and script would be a big help to getting others to
 help you

 On Mar 20, 11:38 am, Derek Perkins derekaperk...@gmail.com wrote:

  I encase all of my functions inside of a jQuery(document).ready
  (function() {} block, but I noticed recently that my scripts are
  running multiple times.  After a lot of debugging, I realized that
  they only ran once after I deleted that segment of code.  The first
  time it ran however, it wouldn't stop at any debugging breakpoints.
  Should I just avoid that function altogether?




[jQuery] Plugin or examples to filter display of table data?

2009-03-20 Thread Brad

I searched this group and Googled for examples but haven't what I was
looking for.

Consider this use case:

A database-driven backend presents a page with a table containing many
rows (100's or more). Instead of having the user enter new search
criteria and send another request to the backend, I'd like to provide
client side filtering to narrow the displayed results, with the option
to restore the original results.

There is (was?) a TableFilter plugin, but it offers different
functionality.

Are there any plugins or examples that do this? I'm especially
interested in something that could peacefully co-exist with
TableSorter.


[jQuery] Modal Window Background Fade/Disable

2009-03-20 Thread Desinger

Hi I have this Java sciprt code and jquery and this is a sliding
window hide/open.

The html is not in  a seperate page its in the same page as the
background of the page is.
I would like to make the background fade or disable untill we close
this window.
I dont' think I can call it modal window if I am not wrong

very similar to this page
http://www.webresourcesdepot.com/wp-content/uploads/file/jquery-sliding-menu/


script type=text/javascript
$(document).ready(function() {
$(.topMenuAction).click(function() {
if ($(#openCloseIdentifier).is(:hidden)) {
$(#slider).animate({
marginTop: -534px
}, 500);
$(#topMenuImage).html('img
src=customercare_btn.gif alt=open /');
$(#openCloseIdentifier).show();
} else {
$(#slider).animate({
marginTop: 0px
}, 500);
$(#topMenuImage).html('img
src=customer_care_bgtrans.gif alt=close /');
$(#openCloseIdentifier).hide();
}
});
});
/script






this is the Jquery in a file  its ver long

(function(){var _jQuery=window.jQuery,_$=window.$;var
jQuery=window.jQuery=window.$=function(selector,context){return new
jQuery.fn.init(selector,context);};var quickExpr=/^[^]*((.|\s)+)[^]
*$|^#(\w+)$/,isSimple=/^.[^:#\[\.]*
$/,undefined;jQuery.fn=jQuery.prototype={init:function
(selector,context){selector=selector||document;if(selector.nodeType)
{this[0]=selector;this.length=1;return this;}if(typeof
selector==string){var match=quickExpr.exec(selector);if(match(match
[1]||!context)){if(match[1])selector=jQuery.clean([match
[1]],context);else{var elem=document.getElementById(match[3]);if(elem)
{if(elem.id!=match[3])return jQuery().find(selector);return jQuery
(elem);}selector=[];}}else
return jQuery(context).find(selector);}else if(jQuery.isFunction
(selector))return jQuery(document)[jQuery.fn.ready?ready:load]
(selector);return this.setArray(jQuery.makeArray
(selector));},jquery:1.2.6,size:function(){return
this.length;},length:0,get:function(num){return num==undefined?
jQuery.makeArray(this):this[num];},pushStack:function(elems){var
ret=jQuery(elems);ret.prevObject=this;return ret;},setArray:function
(elems){this.length=0;Array.prototype.push.apply(this,elems);return
this;},each:function(callback,args){return jQuery.each
(this,callback,args);},index:function(elem){var ret=-1;return
jQuery.inArray(elemelem.jquery?elem[0]:elem,this);},attr:function
(name,value,type){var options=name;if(name.constructor==String)if
(value===undefined)return this[0]jQuery[type||attr](this
[0],name);else{options={};options[name]=value;}return this.each
(function(i){for(name in options)jQuery.attr(type?
this.style:this,name,jQuery.prop(this,options
[name],type,i,name));});},css:function(key,value){if((key=='width'||
key=='height')parseFloat(value)0)value=undefined;return this.attr
(key,value,curCSS);},text:function(text){if(typeof text!
=objecttext!=null)return this.empty().append((this[0]this
[0].ownerDocument||document).createTextNode(text));var
ret=;jQuery.each(text||this,function(){jQuery.each
(this.childNodes,function(){if(this.nodeType!=8)ret+=this.nodeType!=1?
this.nodeValue:jQuery.fn.text([this]);});});return
ret;},wrapAll:function(html){if(this[0])jQuery(html,this
[0].ownerDocument).clone().insertBefore(this[0]).map(function(){var
elem=this;while(elem.firstChild)elem=elem.firstChild;return
elem;}).append(this);return this;},wrapInner:function(html){return
this.each(function(){jQuery(this).contents().wrapAll
(html);});},wrap:function(html){return this.each(function(){jQuery
(this).wrapAll(html);});},append:function(){return this.domManip
(arguments,true,false,function(elem){if(this.nodeType==1)
this.appendChild(elem);});},prepend:function(){return this.domManip
(arguments,true,true,function(elem){if(this.nodeType==1)
this.insertBefore(elem,this.firstChild);});},before:function(){return
this.domManip(arguments,false,false,function(elem)
{this.parentNode.insertBefore(elem,this);});},after:function(){return
this.domManip(arguments,false,true,function(elem)
{this.parentNode.insertBefore(elem,this.nextSibling);});},end:function
(){return this.prevObject||jQuery([]);},find:function(selector){var
elems=jQuery.map(this,function(elem){return jQuery.find
(selector,elem);});return this.pushStack(/[^+] [^+]/.test(selector)||
selector.indexOf(..)-1?jQuery.unique(elems):elems);},clone:function
(events){var ret=this.map(function(){if(jQuery.browser.msie!
jQuery.isXMLDoc(this)){var clone=this.cloneNode
(true),container=document.createElement(div);container.appendChild
(clone);return jQuery.clean([container.innerHTML])[0];}else
return this.cloneNode(true);});var clone=ret.find(*).andSelf().each

[jQuery] Re: Plugin or examples to filter display of table data?

2009-03-20 Thread Brad

Sorry for the noise, I should have looked at the jQuery plugins site
first. There are a number of offerings there that may do what I want.
DataTables looks very promising.

On Mar 20, 12:44 pm, I wrote:
 I searched this group and Googled for examples but haven't what I was
 looking for.

 Consider this use case:

 A database-driven backend presents a page with a table containing many
 rows (100's or more). Instead of having the user enter new search
 criteria and send another request to the backend, I'd like to provide
 client side filtering to narrow the displayed results, with the option
 to restore the original results.

 There is (was?) a TableFilter plugin, but it offers different
 functionality.

 Are there any plugins or examples that do this? I'm especially
 interested in something that could peacefully co-exist with
 TableSorter.


[jQuery] jQuery/Cycle: Binding Secondary Nav

2009-03-20 Thread studiobl

Hi, I'm working on a banner display, using Cycle.  The banner will use
the out-of-the-box Cycle numbered nav, but the client also wants text
links in the banner to page from slide to slide as well.

How can I bind the pager functions to additional anchors?


[jQuery] Cycle breaks in IE7 when using list box

2009-03-20 Thread christopherious

I have an instance of Cycle 2.63 (jquery.cycle.all.min.js) that works
great except for one thing.  By using a list box for selection, it
breaks under IE7 (content doesn't change upon user selection).

I'm still pretty new to JS development.  Haven't tried IE8 out just
yet, but I'd like to get this working in IE7 anyway.

Here's a sample of my code:


?php
  jq_add('cycle');
?

script type=text/javascript
$(function() {
$('#s1').cycle({
timeout: 0,
speed:   300,
startingSlide: 0
});
$('#goto1').click(function() {
$('#s1').cycle(0);
return false;
});
$('#goto2').click(function() {
$('#s1').cycle(1);
return false;
});
$('#goto3').click(function() {
$('#s1').cycle(2);
return false;
});
});
/script

script type=text/javascript
document.open();
document.write('strongPick a section:\/strongnbsp;selectoption
id=goto1 value=Section 1Section 1\/optionoption id=goto2
value=Section 2Section 2\/optionoption id=goto3 value=Section
3Section 3\/option\/select');
document.close();
/script

noscriptdiv class=toc
div class=toc-titlePick a Section/div
div class=toc-list
ul
 lia href=#Section1Section 1/a/li
 lia href=#Section2Section 2/a/li
 lia href=#Section3Section 3/a/li
/ul
/div
/div/noscript

ul id=s1
 liSection 1, Lorem ipsum./li
 liSection 2, Lorem ipsum./li
 liSection 3, Lorem ipsum./li
/ul




[jQuery] Validation: How to get group key that the current invalidate element belong to?

2009-03-20 Thread doutu

If this feature  exists now, tell me please. If not, just a feature
request!
What's my plan ?

div id=err_group_id1invalid error place holder/div
ulliinput type=checkbox name=g1[] id= value= //li
liinput type=checkbox name=g1[] id= value= //li
liinput type=checkbox name=g1[] id= value= //li
liinput type=checkbox name=g1[] id= value= //li
/ul

ulliinput type=checkbox name=g2[] id= value= //li
liinput type=checkbox name=g2[] id= value= //li
liinput type=checkbox name=g2[] id= value= //li
liinput type=checkbox name=g2[] id= value= //li
/ul

script type=text/javascript//![CDATA[
$(#myform).validate({
  groups: {
err_group_id1: g1[] g2[]
  },
  errorPlacement: function(error, element) {
 if (element.group_key)
   error.appendTo('#' + element.group_key);
 else
   error.insertAfter(element);
   }
 })
//]]/script


[jQuery] newbie question: how can i prevent this infinite loop scenario?

2009-03-20 Thread bobby burgess

Hi all,

jQuery newbie here and this is my first post. I'm stuck on this
conundrum:

I have some images on a page and .hover() is bound to each. The is
hovering function displays an absolute-positioned DIV on top of
everything  else (it contains a bigger version of the clicked-on
image). The is not hovering function removes that DIV.

$('TD IMG').hover(
   function () {
   $('DIV/DIV').addClass('test_lightbox').append( $(this).clone
() ).fadeIn('fast').prependTo('BODY');
   },
   function () {
   $('DIV.test_lightbox').fadeOut('fast').remove();
   }
);

This works well, except in the rare case when the pop-up DIV overlaps
the thumbnail IMG that was clicked on (say, the user had their browser
shrunk super small). When that happens, the cursor is no longer
hovering over the thumbnail; it's hovering over the DIV. That causes
the IMG's is not hovering function to fire which removes the DIV--
but then the cursor falls upon the IMG again, starting the loop all
over again.

What approach or best practice should I follow to resolve this? I
could probably find a way to ensure that the DIV element never appears
over the IMG element, but there must be a way to handle this with the
JS code directly. Ideas?

Thanks,

Bobby


[jQuery] Re: .ajax doesn't execute success handler in IE7

2009-03-20 Thread topherez

I had this trouble before, and after 2 hours, finally remembered what
it was.
IE needs to know that the xml returned is actually xml. It uses the
header of the document to determine that, so you must set the header
in the php/asp file to set it.

For PHP, include this before passing back the response:
header('Content-type: text/xml');

In ASP:
response.ContentType=text/xml

 - Peace and good luck


On Mar 3, 5:36 am, Kasper kazz...@gmail.com wrote:
 I swear, I didn't change a thing when moving my site from my
 production work station to our server, but then, my IE 7 doesn't
 execute the $.ajax success handler all of a sudden? What the deuce?

 Something as simple as this:
 Code:

 function logOff() {
 $.ajax({
 type: POST,
 url: /logoff.asp,
 success: function(msg){
 alert(msg);

 }
 });
 }

 doesn't do nything in IE7, but in all other browsers it works like
 a charm! Even if I add a cache-buster like math.random() = nothing!

 I can't imagine it beeing a server issue, but on the other hand DID
 the problem first occur when I moved it from my computer to my
 server..

 UPDATE!
 It actually executes the ajax request, and does what logoff.asp should
 do, but the success function is never run... what the..?? :(


[jQuery] [Validation] How to get group key that the current invalidate element belong to?

2009-03-20 Thread doutu

If this feature  exists now, tell me please. If not, just a feature
request!
What's my plan ?

div id=err_group_id1invalid error place holder/div
ulliinput type=checkbox name=g1[] id= value= //li
liinput type=checkbox name=g1[] id= value= //li
liinput type=checkbox name=g1[] id= value= //li
liinput type=checkbox name=g1[] id= value= //li
/ul

ulliinput type=checkbox name=g2[] id= value= //li
liinput type=checkbox name=g2[] id= value= //li
liinput type=checkbox name=g2[] id= value= //li
liinput type=checkbox name=g2[] id= value= //li
/ul

script type=text/javascript//![CDATA[
$(#myform).validate({
  groups: {
err_group_id1: g1[] g2[]
  },
  errorPlacement: function(error, element) {
 if (element.group_key)
   error.appendTo('#' + element.group_key);
 else
   error.insertAfter(element);
   }
 })
//]]/script


[jQuery] jcarousel - use an image as an external control

2009-03-20 Thread djrein

Hello,

I want to be able to use an image as an external control instead of
text.  I'm not familiar with jquery and need some help.  Thanks in
advance.


[jQuery] Preventing A link clicks before document.ready();

2009-03-20 Thread HippieX

I have a problem I am sure others have encountered.  I have .click()
events attached to a links in my web page, but the user is clicking
the links before the document.ready(); fires causing unexpected
results.  Is there anyway to stop this from happening?

Thanks,

Jeff


[jQuery] Re: setExpression makes IE8 crash in blockUI plugin

2009-03-20 Thread JFK

I'm seeing the same issue with IE8 and setExpression. From MSDN:
http://msdn.microsoft.com/en-us/library/ms537634.aspx

As of Windows Internet Explorer 8, dynamic properties have been
deprecated and are only supported for Web pages displayed in IE5 mode
or IE7 mode.

it looks like they suggest replacing code such as
s.setExpression('height','Math.max(document.body.scrollHeight,
document.body.offsetHeight) - (jQuery.boxModel?
0:'+opts.quirksmodeOffsetHack+') + px')
with
s.height = Math.max(document.body.scrollHeight,
document.body.offsetHeight) - (jQuery.boxModel?
0:'+opts.quirksmodeOffsetHack+') + px'


Thoughts?


[jQuery] How to select nested tabs

2009-03-20 Thread randy...@gmail.com

I have created nested tabs using Tabs 3. Trying to select the second
nested tab by default. Doing this does not work...

$(document).ready(function() {
$('#container ul').tabs(1);
$('#container-2 ul').tabs(2);
})

The second container is ignored and the first nested tab is selected.


[jQuery] Re: Best way to iterate over a string (each character)

2009-03-20 Thread dimitre

Super! Sometimes I have to remember that JQuery is based in Javascript
not the opposite.
thank you


[jQuery] Re: Cycle breaks in IE7 when using list box

2009-03-20 Thread Mike Alsup

 document.write('strongPick a section:\/strongnbsp;selectoption
 id=goto1 value=Section 1Section 1\/optionoption id=goto2
 value=Section 2Section 2\/optionoption id=goto3 value=Section
 3Section 3\/option\/select');
 document.close();
 /script


You should be binding the 'change' event on the select, not the
'click' event on the option.


[jQuery] Re: Rotating CSS classes each 5 sec

2009-03-20 Thread Alexandru Dinulescu
Hello.

Can i call this function normally like
function imageSwap(){
function code goes in here
}

$(document).ready(imageSwap);
?

And another question
can i put in the array paramters and have variables declared at the top
for ex is this correct?

function imageSwap() {
var img1 = classImg1
var img2 = classImg2
var img3 = classImg3

var imgArray = [ img1 , img2, img3];

function swap(i){
   if(imgArray.length  i){
   $('.' + imgArray[i]).removeClass(

 imgArray[i]).addClass(imgArray[i+1]);
}else{
return;
}
 setTimeout(swap(+(i+1)+), 5000);
 }

 // Call the function
 swap(0);


}

$(document).ready(imageSwap);
---
Alexandru Dinulescu
Web Developer
(X)HTML/CSS Specialist
Expert Guarantee Certified Developer
XHTML: http://www.expertrating.com/transcript.asp?transcriptid=1879053
CSS : http://www.expertrating.com/transcript.asp?transcriptid=1870619
RentACoder Profile:
http://www.rentacoder.com/RentACoder/DotNet/SoftwareCoders/ShowBioInfo.aspx?lngAuthorId=6995323

MainWebsite: http://alexd.adore.ro



On Fri, Mar 20, 2009 at 2:39 PM, jQuery Lover ilovejqu...@gmail.com wrote:


 The code is not perfect:

 var imgArray = [ img1 , img2, img3];

 function swap(i){
if(imgArray.length  i){
$('.' +
 imgArray[i]).removeClass(imgArray[i]).addClass(imgArray[i+1]);
}else{
return;
}
 setTimeout(swap(+(i+1)+), 5000);
 }

 // Call the function
 swap(0);

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



 On Fri, Mar 20, 2009 at 5:15 PM, Alexandru Dinulescu
 alex.d.a...@gmail.com wrote:
  Hello.
 
  I have a huge question. I need something that rotates classes each 5
 seconds
  for ex
 
  I have a div class=img1 /div. I want each 5 seconds the class to be
  changed from img1 to img2, and so on so at the start an array should be
  placed like
  imgArray = [ img1 , img2, img3,  etc ]
 
  I need css classes changed not a plain image since  the image is a
  background image and i have text on it.
 
  I did look over google but i couldnt find any help regarding this matter.
 
  Thank you
 
  ---
  Alexandru Dinulescu
  Web Developer
  (X)HTML/CSS Specialist
  Expert Guarantee Certified Developer
  XHTML: http://www.expertrating.com/transcript.asp?transcriptid=1879053
  CSS : http://www.expertrating.com/transcript.asp?transcriptid=1870619
  RentACoder Profile:
 
 http://www.rentacoder.com/RentACoder/DotNet/SoftwareCoders/ShowBioInfo.aspx?lngAuthorId=6995323
 
  MainWebsite: http://alexd.adore.ro
 
 



[jQuery] Re: jQuery/Cycle: Binding Secondary Nav

2009-03-20 Thread Mike Alsup

 Hi, I'm working on a banner display, using Cycle.  The banner will use
 the out-of-the-box Cycle numbered nav, but the client also wants text
 links in the banner to page from slide to slide as well.

 How can I bind the pager functions to additional anchors?


Cycle doesn't gracefully support two sets of pager controls, but you
can make it work using the technique found here:

http://www.malsup.com/jquery/cycle/goto-two.html

Mike


[jQuery] Re: Preventing A link clicks before document.ready();

2009-03-20 Thread James

That's the default of how web browsers. You can work around it such as
by setting the display of those a to hidden in your CSS, and use
Javascript to show it upon page ready. Depending on how your website
works, this may mean your page would not work properly if users do not
have Javascript enabled.

On Mar 20, 5:48 am, HippieX jlrober...@gmail.com wrote:
 I have a problem I am sure others have encountered.  I have .click()
 events attached to a links in my web page, but the user is clicking
 the links before the document.ready(); fires causing unexpected
 results.  Is there anyway to stop this from happening?

 Thanks,

 Jeff


[jQuery] IE8 BlockUI incompatible

2009-03-20 Thread Josh Kewley

There was a thread about this last month that identified a problem with the
use of setExpression in BlockUI. IE8 throws a not implemented exception in
this case. The author noted that the BlockUI demo page works fine in IE8,
which it does. To be honest, I'm not sure why.

However, the problem does appear to exist, and it is caused by the use of
dynamic properties which have been deprecated in IE8:
http://msdn.microsoft.com/en-us/library/ms537634.aspx

BlockUI uses expressions to set the height, width, and top styles.

The temp solution is to run the pages in IE7 emulation mode, but I think a
longer term solution is needed, possibly a callback on widow resize to a
function that sets the style properties statically.

-Josh



[jQuery] Re: Preventing A link clicks before document.ready();

2009-03-20 Thread Josh Powell

You could also put the .click events inside a document.ready().  Then
they can click away, but no results until the event handler is set
after document.ready.

On Mar 20, 12:30 pm, James james.gp@gmail.com wrote:
 That's the default of how web browsers. You can work around it such as
 by setting the display of those a to hidden in your CSS, and use
 Javascript to show it upon page ready. Depending on how your website
 works, this may mean your page would not work properly if users do not
 have Javascript enabled.

 On Mar 20, 5:48 am, HippieX jlrober...@gmail.com wrote:

  I have a problem I am sure others have encountered.  I have .click()
  events attached to a links in my web page, but the user is clicking
  the links before the document.ready(); fires causing unexpected
  results.  Is there anyway to stop this from happening?

  Thanks,

  Jeff


[jQuery] Re: IE8 BlockUI incompatible

2009-03-20 Thread Mike Alsup

 There was a thread about this last month that identified a problem with the
 use of setExpression in BlockUI. IE8 throws a not implemented exception in
 this case. The author noted that the BlockUI demo page works fine in IE8,
 which it does. To be honest, I'm not sure why.

 However, the problem does appear to exist, and it is caused by the use of
 dynamic properties which have been deprecated in 
 IE8:http://msdn.microsoft.com/en-us/library/ms537634.aspx

 BlockUI uses expressions to set the height, width, and top styles.

 The temp solution is to run the pages in IE7 emulation mode, but I think a
 longer term solution is needed, possibly a callback on widow resize to a
 function that sets the style properties statically.

 -Josh



Can you test v2.16?  It works for me, but then so did the previous
one.

http://www.malsup.com/jquery/block/jquery.blockUI.js?v2.16

Mike


[jQuery] Re: setExpression makes IE8 crash in blockUI plugin

2009-03-20 Thread Mike Alsup

 I'm seeing the same issue with IE8 and setExpression. From 
 MSDN:http://msdn.microsoft.com/en-us/library/ms537634.aspx


Can you try v2.16?

http://www.malsup.com/jquery/block/jquery.blockUI.js?v2.16

Mike


[jQuery] Re: IE8 BlockUI incompatible

2009-03-20 Thread Josh Kewley

Hey Mike,

This eliminates the exception, but the placement of the floating content is
different, and it doesn't appear to adjust on window resize. Thanks for the
update, and let me know if you need assistance in testing/debugging the new
version.

-Josh

-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Mike Alsup
Sent: Friday, March 20, 2009 1:04 PM
To: jQuery (English)
Subject: [jQuery] Re: IE8  BlockUI incompatible


 There was a thread about this last month that identified a problem with
the
 use of setExpression in BlockUI. IE8 throws a not implemented exception in
 this case. The author noted that the BlockUI demo page works fine in IE8,
 which it does. To be honest, I'm not sure why.

 However, the problem does appear to exist, and it is caused by the use of
 dynamic properties which have been deprecated in
IE8:http://msdn.microsoft.com/en-us/library/ms537634.aspx

 BlockUI uses expressions to set the height, width, and top styles.

 The temp solution is to run the pages in IE7 emulation mode, but I think a
 longer term solution is needed, possibly a callback on widow resize to a
 function that sets the style properties statically.

 -Josh



Can you test v2.16?  It works for me, but then so did the previous
one.

http://www.malsup.com/jquery/block/jquery.blockUI.js?v2.16

Mike



[jQuery] Re: Cycle breaks in IE7 when using list box

2009-03-20 Thread christopherious

Thanks!  I'm not sure I'm quite getting it.  Would you mind providing
an example?

On Mar 20, 12:16 pm, Mike Alsup mal...@gmail.com wrote:
  document.write('strongPick a section:\/strongnbsp;selectoption
  id=goto1 value=Section 1Section 1\/optionoption id=goto2
  value=Section 2Section 2\/optionoption id=goto3 value=Section
  3Section 3\/option\/select');
  document.close();
  /script

 You should be binding the 'change' event on the select, not the
 'click' event on the option.


[jQuery] Re: IE8 BlockUI incompatible

2009-03-20 Thread Mike Alsup

 This eliminates the exception, but the placement of the floating content is
 different, and it doesn't appear to adjust on window resize. Thanks for the
 update, and let me know if you need assistance in testing/debugging the new
 version.

How about a test page.  One that is as simple as possible.  Thanks.


[jQuery] [validate] Suggested new feature for validation.

2009-03-20 Thread Millman

I have a case where I'm setting up an ASP.NET MVC View that partially
renders several Partial View Controls.  Each of these controls will be
wrapped by a div/div element within the Form.  This View will be
used as a Wizard and we will be utilizing JavaScript to show and hide
each various div element as they navigate the wizard.

My issue is that there can be only 1 form tag which contains all of
the Partial View Controls to be displayed.  We cannot commit a partial
registration to the database only a complete registration so we want
to save our submit button for the end of the process and this is why
we can have only one form element.  Each control within each Partial
View has many different validation rules specified like required,
email, etc.  Now, we only want the current div being displayed to
validate not the entire form as we are going to base our decision on
whether or not they get to navigate to the next section of the
registration process on if all the values entered into the currently
displayed inputs are acceptable.

I've decided the only real way to get the validation working the way
I'd like it to is to set the $().validate method on the div level
instead of the form level.  Is it possible to make the validation
framework more flexible in the future in this manner or is there a way
currently where we can make our application function in this way?

Thanks in advance!


[jQuery] Re: IE8 BlockUI incompatible

2009-03-20 Thread Mike Alsup

  This eliminates the exception, but the placement of the floating content is
  different, and it doesn't appear to adjust on window resize. Thanks for the
  update, and let me know if you need assistance in testing/debugging the new
  version.

 How about a test page.  One that is as simple as possible.  Thanks.


I can't make it fail in any mode.  Does this page work for you?

http://jquery.malsup.com/block/test.html


[jQuery] checkbox problem

2009-03-20 Thread omertacod...@gmail.com

hi all,

I have a problem, when the checkbox is clicked there is no reaction.
here is the code:

index.html

html
head
titletest/title
script type=text/javascript src=jquery.js/script
script type=text/javascript src=darkTodo.js/script
style type=text/css
#messagewindow {
height: 250px;
border: 1px solid;
padding: 5px;
overflow: auto;
}
#wrapper {
margin: auto;
width: 438px;
}
/style
/head
body
div id=wrapper

form id=chatform
pWat ?/ppinput type=text id=author //p
pTodo/ppinput type=text id=msg size=50//p
input type=submit value=ok /br /
/form

  div id=messagewindow
  /div
/body
/html

and the javascript :

$(document).ready(function(){


$(':checkbox').click(function(){
alert(test);

});


$(form#chatform).submit(function(){
$test = 'input name=test type=checkbox value=1';

$(#messagewindow).prepend($test+b+$(#msg).val()+/bbr /
);
return false;
});

});


[jQuery] Re: IE8 BlockUI incompatible

2009-03-20 Thread Johannes Schill


On 20 Mar, 21:04, Mike Alsup mal...@gmail.com wrote:
  There was a thread about this last month that identified a problem with the
  use of setExpression in BlockUI. IE8 throws a not implemented exception in
  this case. The author noted that the BlockUI demo page works fine in IE8,
  which it does. To be honest, I'm not sure why.

  However, the problem does appear to exist, and it is caused by the use of
  dynamic properties which have been deprecated in 
  IE8:http://msdn.microsoft.com/en-us/library/ms537634.aspx

  BlockUI uses expressions to set the height, width, and top styles.

  The temp solution is to run the pages in IE7 emulation mode, but I think a
  longer term solution is needed, possibly a callback on widow resize to a
  function that sets the style properties statically.

  -Josh

 Can you test v2.16?  It works for me, but then so did the previous
 one.

 http://www.malsup.com/jquery/block/jquery.blockUI.js?v2.16

 Mike

Im having similar trouble with 2.14.
Some times it works and some times it doesn't (depending on markup? or
maybe its because some element is hidden? i havent figured out yet). I
will try 2.16 asap.

Johannes


[jQuery] Re: checkbox problem

2009-03-20 Thread James

Well, it appears you are binding an event to something that doesn't
exist.
Here's what's happening with your code:

== Page loads
- Bind click to checkbox (no checkbox exists so nothing happens)
- Bind submit to form to create a checkbox

== User action
- User clicks submit, a checkbox is created.
- User clicks on checkbox, nothing happens
-- Done

What you want to do is:

== Page loads
- Page loads
- Bind submit to checkbox to create a checkbox AND bind a click event
to the checkbox

== User action
- User clicks submit, a checkbox is created and a click event is bind
to the checkbox
- User clicks on checkbox, 'test' is alerted

On Mar 20, 11:00 am, omertacod...@gmail.com omertacod...@gmail.com
wrote:
 hi all,

 I have a problem, when the checkbox is clicked there is no reaction.
 here is the code:

 index.html

 html
 head
         titletest/title
         script type=text/javascript src=jquery.js/script
         script type=text/javascript src=darkTodo.js/script
         style type=text/css
                 #messagewindow {
                         height: 250px;
                         border: 1px solid;
                         padding: 5px;
                         overflow: auto;
                 }
                 #wrapper {
                         margin: auto;
                         width: 438px;
                 }
         /style
 /head
 body
         div id=wrapper

         form id=chatform
         pWat ?/ppinput type=text id=author //p
         pTodo/ppinput type=text id=msg size=50//p
         input type=submit value=ok /br /
         /form

   div id=messagewindow
   /div
 /body
 /html

 and the javascript :

 $(document).ready(function(){

         $(':checkbox').click(function(){
     alert(test);

         });

         $(form#chatform).submit(function(){
                 $test = 'input name=test type=checkbox value=1';
                 
 $(#messagewindow).prepend($test+b+$(#msg).val()+/bbr /);

                 return false;
         });

 });




[jQuery] Re: checkbox problem

2009-03-20 Thread James

Sorry, I meant bind submit to form, not checkbox.

Your code would be more something like:

$(document).ready(function(){

 $(form#chatform).submit(function(){
  $test = 'input name=test type=checkbox value=1';
  $(#messagewindow).prepend($test+b+$(#msg).val()+/
bbr /
);
  $test.click(function() {
   alert('test');
  });
  return false;
 });

});

On Mar 20, 11:30 am, James james.gp@gmail.com wrote:
 Well, it appears you are binding an event to something that doesn't
 exist.
 Here's what's happening with your code:

 == Page loads
 - Bind click to checkbox (no checkbox exists so nothing happens)
 - Bind submit to form to create a checkbox

 == User action
 - User clicks submit, a checkbox is created.
 - User clicks on checkbox, nothing happens
 -- Done

 What you want to do is:

 == Page loads
 - Page loads
 - Bind submit to checkbox to create a checkbox AND bind a click event
 to the checkbox

 == User action
 - User clicks submit, a checkbox is created and a click event is bind
 to the checkbox
 - User clicks on checkbox, 'test' is alerted

 On Mar 20, 11:00 am, omertacod...@gmail.com omertacod...@gmail.com
 wrote:

  hi all,

  I have a problem, when the checkbox is clicked there is no reaction.
  here is the code:

  index.html

  html
  head
          titletest/title
          script type=text/javascript src=jquery.js/script
          script type=text/javascript src=darkTodo.js/script
          style type=text/css
                  #messagewindow {
                          height: 250px;
                          border: 1px solid;
                          padding: 5px;
                          overflow: auto;
                  }
                  #wrapper {
                          margin: auto;
                          width: 438px;
                  }
          /style
  /head
  body
          div id=wrapper

          form id=chatform
          pWat ?/ppinput type=text id=author //p
          pTodo/ppinput type=text id=msg size=50//p
          input type=submit value=ok /br /
          /form

    div id=messagewindow
    /div
  /body
  /html

  and the javascript :

  $(document).ready(function(){

          $(':checkbox').click(function(){
      alert(test);

          });

          $(form#chatform).submit(function(){
                  $test = 'input name=test type=checkbox value=1';
                  
  $(#messagewindow).prepend($test+b+$(#msg).val()+/bbr /);

                  return false;
          });

  });




[jQuery] Re: checkbox problem

2009-03-20 Thread omertacod...@gmail.com

Hey james, thanks for the help but using your code when i submit the
checkbox and text appears and immediatly dissapears again ...

On 20 mrt, 22:32, James james.gp@gmail.com wrote:
 Sorry, I meant bind submit to form, not checkbox.

 Your code would be more something like:

 $(document).ready(function(){

      $(form#chatform).submit(function(){
           $test = 'input name=test type=checkbox value=1';
           $(#messagewindow).prepend($test+b+$(#msg).val()+/
 bbr /);

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

 });



[jQuery] Re: IE8 BlockUI incompatible

2009-03-20 Thread Josh Kewley

Mike,

Click Page - Compatibility View Settings
Uncheck the option include updated websites from Microsoft
Try this page, where I first noticed it:
http://corp.americanexpress.com/gcs/travel/service/personalservice.aspx
Click on the globe to trigger the popup. It bombs. Now go into IE7
compatibility mode and try again.
Your test page works. I'm not sure why, but one difference I see is that
Amex uses Xhmtl 1.0 strict.

-J

-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Mike Alsup
Sent: Friday, March 20, 2009 2:11 PM
To: jQuery (English)
Subject: [jQuery] Re: IE8  BlockUI incompatible


  This eliminates the exception, but the placement of the floating content
is
  different, and it doesn't appear to adjust on window resize. Thanks for
the
  update, and let me know if you need assistance in testing/debugging the
new
  version.

 How about a test page.  One that is as simple as possible.  Thanks.


I can't make it fail in any mode.  Does this page work for you?

http://jquery.malsup.com/block/test.html



[jQuery] Re: IE8 BlockUI incompatible

2009-03-20 Thread Mike Alsup

 Click Page - Compatibility View Settings
 Uncheck the option include updated websites from Microsoft
 Try this page, where I first noticed 
 it:http://corp.americanexpress.com/gcs/travel/service/personalservice.aspx
 Click on the globe to trigger the popup. It bombs. Now go into IE7
 compatibility mode and try again.
 Your test page works. I'm not sure why, but one difference I see is that
 Amex uses Xhmtl 1.0 strict.


That page isn't using the update I just posted so it doesn't help me.
My test page is using blockUI v2.16 which I *think* should work fine
with IE8.


  1   2   >