[jQuery] $.getScript Must Take .js File?

2009-03-26 Thread Code Daemon

I am using codeigniter and it forms urls like this:

http://mydomain/index.php/system/edit_js

I'm trying to call $.getScript by going:

$.getScript(http://mydomain/index.php/system/edit_js;) but I get a
404 not found error. I pasted the url in my webbrowser and it works
just fine.

Is there any way to make this work?


[jQuery] Re: Intelisense in VS2008

2009-03-26 Thread simonxy

I have the following code:

html
  head
titleHover example/title
link rel=stylesheet type=text/css href=hover.css
script type=text/javascript
src=../scriptsNew/jquery-1.3.2.js/script
script type=text/javascript
function report(event) {
$('#console').append('div' + event.type + '/
div').stop;
event.stopPropagation();
//alert( event.isPropagationStopped());
  }

  $(function() {
  $('#outer1')
 .bind('mouseover', report)
 .bind('mouseout', report);
  $('#outer2').hover(report, report);
  });
/script
  /head

  body
div class=outer id=outer1
  Outer 1
  div class=inner id=inner1Inner 1/div
/div
div class=outer id=outer2
  Outer 2
  div class=inner id=inner2Inner 2/div
/div
div id=console/div
  /body
/html


When an event handler is fired, an instance of a class named Event is
passed to the handler as its first parameter.
Where should I declare it? Do you have any idea? This eample is from
the book.

thank you,
Simon

On Mar 25, 3:38 pm, MorningZ morni...@gmail.com wrote:
 Without more code it's hard to help, but I could venture a guess that
 where you are in your code that Intellisense has no idea what the type
 of variable/object event is

 to help understand that, take this sample:

 var s;

 if you went to do something with s, the compiler has no idea what
 kind of object s is... so typing s. results in no Intellisense

 now, if you said:

 var s = '';

 then typing s. results in all the things you can do to a string

 saying:

 var s = 0;

 results in Intellisense for numeric objects

 So if Studio has no idea what event is (and this is your code that
 needs to specify it!!), then it can't provide help

 On Mar 25, 5:38 am, simonxy enki...@gmail.com wrote:



  Hi, I copiedjquery-1.3.2.js andjquery-1.3.2-vsdoc.js files into the
  same directory and intelisense works, but not in complete. For
  example, I don't have almost any properties and methods of event
  object, like event.stopPropagation() or event.isPropagationStopped()
  and similar.
  Why intelisense of event object doesn't work?

  Thank you for your answer,
  Simon- Hide quoted text -

 - Show quoted text -


[jQuery] Re: Jquery Tabs shown Horizontally in Firefox but shown Vertically in IE...?

2009-03-26 Thread Martin

Hello Acamar,

You were correct it was a CSS issue, some css defining another a
link was getting mixed up with the tab links.  Once I specified the
separate a link more precisely using a class qualifier (i.e. was a
now a class=banner, the problem was resolved.

Thanks for your help...

Martin

On Mar 26, 3:46 am, acamar websi...@bcs.ru wrote:
 Hi! It's not jQuery related question but CSS. Can you show your CSS
 rules for the tabs?

 On 25 мар, 19:59, Martin martin.ikedia...@gmail.com wrote:



  Hello,

  I am using Jquery Tabs in a webpage and the problem I am having is
  that the tabs are shown correctly in Firefox (Horizontally), but
  incorrectly in IE (Vertically).  Does anyone know a simple solution to
  this problem?

  My html is very vanilla (see below)

  div id=tabs
  ul class=holder
  lia class=tabOne href=#tabs-1Tab 1 Title/a/li
  lia class=tabTwo href=#tabs-2Tab 2 Title/a/li
  /ul

  div id=tabs-1
  p Tab 1 /p
  /div !-- End of Tab 1 --

  div id=tabs-2
  p Tab 2 /p
  /div !-- End of Tab 2 --

  /div!-- End of Tabs --

  How can I get the tabs in IE to be shown vertically.  I assumed it was
  a width issue, associated with the a links, but that didnt make much
  difference...

  Regards

  Martin Ikediashi- Hide quoted text -

 - Show quoted text -


[jQuery] Re: [autocomplete] jquery + dwr

2009-03-26 Thread Jörn Zaefferer

Thanks for the ticket!

Jörn

On Wed, Mar 25, 2009 at 11:32 PM, Diego Plentz diego.pi...@gmail.com wrote:
 I suspected :-)

 Well, I archived the results that I want doing a modification to the
 autocomplete source code. I've added a async option, so if someone want's
 to use asyncs requests as a source of data it can now be done. The result is
 pretty simple:

 $(#city).autocomplete({
    async: dwrHandler
 });

 function dwrHandler(term, handler){
  CityAutoComplete.find(term, handler);
 }

 Hope that It can be added to the source :-)

 I created a ticket for this http://dev.jqueryui.com/ticket/4402

 Thanks again


 On Wed, Mar 25, 2009 at 11:12 AM, Jörn Zaefferer
 joern.zaeffe...@googlemail.com wrote:

 Ah, sorry. source expects a synchronous return as well, doesn't help
 at all in this case.

 Jörn

 On Wed, Mar 25, 2009 at 2:24 PM, Diego Plentz diego.pi...@gmail.com
 wrote:
  Thanks Jörn. Btw, the problem still here, because even if I do something
  like that:
 
  $(#city).autocomplete({
      source: handleDWR
  });
 
  function handleDWR(term){
    TestAutoComplete.findAutoComplete(term, function(data) {return data});
  }
 
  data never goes back to autocomplete to be properly rendered (because
  it
  is a asynchronous call). What am I missing here?
 
  Thanks again!
 
  On Tue, Mar 24, 2009 at 7:36 PM, Jörn Zaefferer
  joern.zaeffe...@googlemail.com wrote:
 
  The jQuery UI branch of the autocomplete plugin supports a
  source-option as an alternative to the url- und data-options. Give it
  a try and let us know if it works for you:
  http://jquery-ui.googlecode.com/svn/branches/dev/autocomplete/
  http://jqueryui.pbwiki.com/SelectComboboxAutocomplete
 
  Jörn
 
  On Tue, Mar 24, 2009 at 10:39 PM, Diego Plentz diego.pi...@gmail.com
  wrote:
   Hey guys,
  
   I'm using jquery + autocomplete plugin (by Jörn) and I trying to make
   it
   work with DWR(http://directwebremoting.org/). My problem is that
   jquery
   autocomplete takes a url or data directly, but to make DWR works
   properly, I
   must use their javascript functions and handle the callback. Here is
   a
   example:
  
   TestAutoComplete.findAutoComplete(token, function(data) { /* do
   something
   with data*/ });
  
   How to make it work with autocomplete, that works like this:
  
   $(#city).autocomplete(cities);
  
   Thanks in advance
  
   --
   http://plentz.org
  
 
 
 
  --
  http://plentz.org
 



 --
 http://plentz.org



[jQuery] getJSON

2009-03-26 Thread iceangel89

i am trying to load json. but it seems like its not working. nothing
is alerted. supposed to be the case?

script type=text/javascript
$(function() {
$.getJSON(data.js, function (json) {
alert(json);
});
});
/script

data.js
[ {Value: 1, Item: Physics}, {Value: 2, Item: Chemistry}, {Value: 3,
Item: Biology} ];


[jQuery] Re: getJSON

2009-03-26 Thread jakenoble

Shouldn't your JSON return values be double quoted?

[ {Value: 1, Item: Physics}, {Value: 2, Item: Chemistry},
{Value: 3, Item: Biology} ];

On Mar 26, 9:16 am, iceangel89 iceange...@gmail.com wrote:
 i am trying to load json. but it seems like its not working. nothing
 is alerted. supposed to be the case?

 script type=text/javascript
 $(function() {
         $.getJSON(data.js, function (json) {
                 alert(json);
         });});

 /script

 data.js
 [ {Value: 1, Item: Physics}, {Value: 2, Item: Chemistry}, {Value: 3,
 Item: Biology} ];


[jQuery] Re: aborting a $.getScript() request

2009-03-26 Thread Mauricio (Maujor) Samy Silva



You're right. A quick look in the bug tracker turns up this ticket:
 http://dev.jquery.com/ticket/1768
Karl Rudd


Tks Karl,
So, there are two questions I made to myself and I am unable to answer:
1-) Does $.getScript()  is a reliable function to use? Is it a useless one?

2-) What does documentation at: 
http://docs.jquery.com/Ajax/jQuery.getScript#urlcallback means when says:
* If you load functions via getScript, make sure to call them after a 
delay.* ?


Any thoughts?
Maurício.



[jQuery] Re: attr(href) giving full path instead of relative in IE

2009-03-26 Thread Rostislav Hristov

I experienced the same problem while developing a plugin that does
some tricks with the page content during the ready event. I noticed
that attr('href') works fine if I don't manipulate the body tag
content. IE won't return the correct href attribute if I do so.

The code I used to workaround the problem looks like this:

$('a').attr('xref', function() {
return $(this).attr('href');
});

...
document.body.innerHTML = someContent + document.body.innerHTML;
...

$('a').attr('href', function() {
   return $(this).attr('xref');
}).removeAttr('xref');


Hope this helps.



On Mar 25, 9:47 pm, Shane Riley shanerileydoti...@gmail.com wrote:
 Right, it's not hard, it was just unexpected is all. I guess I've
 gotten used to JQuery working the same in all browsers.

 I've got it working now with some old-fashioned Javascript. Thanks!

 On Mar 25, 3:20 pm, Shane Riley shanerileydoti...@gmail.com wrote:

  Alright, so your example shows the actual strings for all three values
  in Safari, and in IE7(Vista) it shows the absolute path for #3. After
  looking back at my code, I'm actually loading in the links via Ajax
  when the page is loaded, so they're not in the original document. So
  I'm guessing that means having to do string manipulation since there's
  no way to grab the actual href string in IE in this case.

  Thanks for putting up an example.

  On Mar 25, 3:11 pm, Karl Swedberg k...@englishrules.com wrote:

   Hi Shane,

   Yes, I believe you're reading me right. Strange, though. I'm not able  
   to reproduce the problem you're having. Take a look here:

  http://test.learningjquery.com/href.html

   In IE 7 for #1 and #2 $(this).attr('href') is reporting the actual  
   text string of the href attribute while this.href is reporting the  
   fully qualified URL. For #3, in which I injected the link with  
   javascript, they're both reporting the fully qualified URL.

   Which version of IE are you testing in?

   --Karl

   
   Karl Swedbergwww.englishrules.comwww.learningjquery.com

   On Mar 25, 2009, at 2:21 PM, Shane Riley wrote:

Karl, I'm pretty sure I'm reading you right, but are you saying that
by all accounts JQuery should account for this and return the string-
literal value of href and not IE's absolute path? If so, it's not
working properly. I wish I could show you the live code, because it's
probably easier to visualize, but here's the process involved in these
specific anchors appearing before manipulation:
1. User visits page
2. User makes selection from a drop-down
3. Ajax call initialized sending the href attribute as the variables
using a POST request

So in this case, the anchors in the drop-down list are present on page
load and part of the initial DOM structure. That means that if JQuery
is supposed to sort this out for me, it's not. If you meant that I'd
absolutely have to use Javascript's getAttribute(), then I'll try that
and see if it works.

On Mar 25, 1:17 pm, Karl Swedberg k...@englishrules.com wrote:
Hi Shane,

IE has a second flag argument for getAttribute that, when set to 2,
is supposed to get the literal value of the attribute rather than
their special-sauce value.

So, this.getAttribute('href', 2) *should* get the relative href.
(note: no need to do $(this)[0] ; this works just fine)

jQuery uses that flag internally, so .attr('href') should do the same
thing:

                       var attr = !jQuery.support.hrefNormalized   
notxml  special
                                       // Some attributes require a  
special call on IE
                                       ? elem.getAttribute( name, 2 )
                                       : elem.getAttribute( name );

I believe that this works in every case except when the href is set
via JavaScript. In that case, I'm not sure anything can be done.

--Karl


Karl Swedbergwww.englishrules.comwww.learningjquery.com

On Mar 25, 2009, at 12:21 PM, Shane Riley wrote:

Ha! I looked at your post too fast, and didn't notice that it was  
pure
Javascript. Sorry. I'll try it and see.

The way I currently have it will not work with javascript turned off
either. I'm doing it this way only because the client is requiring  
the
user to have Javascript enabled to use the site (it's a backend  
system
for very specific clients). They want to add all sorts of animations
and effects like everyone wants to do once they see JQuery  
animations
in action.

On Mar 25, 12:14 pm, Martijn Houtman martijn.hout...@gmail.com
wrote:
On Mar 25, 2009, at 5:04 PM, Shane Riley wrote:

Thanks for the article link, but your proposed change isn't valid
JQuery, is it? My exact jQuery code to read in the value looks  
like
this:
pageID = $(this).attr(href);
Adding what you suggested to make it 

[jQuery] Re: aborting a $.getScript() request

2009-03-26 Thread Karl Rudd

Here's my thoughts:

1) It is reliable when dealing with scripts that exist.
2) No idea.

Karl Rudd

On Thu, Mar 26, 2009 at 9:12 PM, Mauricio (Maujor) Samy Silva
css.mau...@gmail.com wrote:

 You're right. A quick look in the bug tracker turns up this ticket:
  http://dev.jquery.com/ticket/1768
 Karl Rudd

 
 Tks Karl,
 So, there are two questions I made to myself and I am unable to answer:
 1-) Does $.getScript()  is a reliable function to use? Is it a useless one?

 2-) What does documentation at:
 http://docs.jquery.com/Ajax/jQuery.getScript#urlcallback means when says:
 * If you load functions via getScript, make sure to call them after a
 delay.* ?

 Any thoughts?
 Maurício.




[jQuery] highlight navbar

2009-03-26 Thread new to jquery

I'm trying to make a navigation bar with highlighted tabs.  It works
when I specifically click the tab, but if I come to the page from an
outside link, I can't get the tab to highlight.  How could I say
something like:

$(#navbar a).each(function(){
 if(this.href *like* window.location)
(this).addClass(selected)
}

What do I put in place of *like*?

Or if you know another good way to do it, that would be helpful.
Thanks in advance.


[jQuery] Looking for talk submissions for Open Web Vancouver 2009

2009-03-26 Thread JeffG

I'm helping organize this year's conference; the dates are June 11th
and 12th at the Vancouver Convention Centre. I'd love to see some talk
submissions jQuery (  jQuery UI ):

http://www.openwebvancouver.ca/node/add/talk

So far we have a few interesting confirmed speakers including Chris
Messina and Rickard Falkvinge ( leader of the Swedish Pirate party ):

http://www.openwebvancouver.ca/node/25

Any questions, let me know.

Jeff


[jQuery] Jquery with Rails application

2009-03-26 Thread haritha syamala
Hi all..


I am new to JQuery,
I am trying to implement  Jquery with Rails apllication.
I installed JRails and implement some effects.
 But i couldn't able to find exact result..
can anybody tell the usage of Jquery with Rails


[jQuery] Re: Pointless but fun jQuery experiment

2009-03-26 Thread kanna

Nice effects, Kelvin!!
JQuery Rocks!!!

On Mar 26, 8:49 am, Nikola nik.cod...@gmail.com wrote:
 That was really neat... jQuery physics!

 On Mar 25, 11:40 pm, brian bally.z...@gmail.com wrote:

  I'll second that!

  On Wed, Mar 25, 2009 at 9:26 PM, Rick Faircloth

  r...@whitestonemedia.com wrote:

   Pretty cool, Kelvin!

   Rick

   -Original Message-
   From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
   Behalf Of Kelvin Luck
   Sent: Wednesday, March 25, 2009 9:22 PM
   To: jquery-en
   Subject: [jQuery] Pointless but fun jQuery experiment

   Inspired by google's chrome experiments I recently put together a
   pointless but fun experiment with the help of jQuery and I thought
   that people on the list might like to check it out:

  http://www.kelvinluck.com/assets/jquery/boingPic/index.html

   As I said, completely pointless but makes a nice change from serious
   progressive enhancement!

   Hope you like it,

   Kelvin :)


[jQuery] Re: Trying to get CrossSlide plugin to work

2009-03-26 Thread Dave.BV

you have a drupal module for insert blocks with pictures using the
Cross-slide jquery plugin:
http://drupal.org/project/slideshowcs

Hope this helps

On Feb 2, 6:39 am, Wonder95 killsho...@gmail.com wrote:
 I'm trying to implement the CrossSlide plugin with Drupal and I'm not
 having any luck.  Based on some help I got from this group, I have
 this code that sets a different banner depending on the URL in
 script.js (atwww.oregonpatrolservice.com):

 Drupal.behaviors.setBanner = function (context) {
     var img = {
         '/content/about-us': 'images/OPS-Banner-02.jpg',
                 '/content/services': 'images/OPS-Banner-03.jpg',
         '/content/ops-armory': 'images/OPS-Banner-04.jpg',
                 '/content/careers': 'images/OPS-Banner-07.jpg',
                 '/contact': 'images/OPS-Banner-08.jpg',
                 '/user': 'images/OPS-Banner-05.jpg'

     }[location.pathname] || 'OPS-Banner-01.jpg';

     $(td#header).css(background,url(/sites/all/themes/theme060/
 images/ + img + ) no-repeat);

 };

 So I have the jquery.cross-slide.js file included in the header, and
 this code in script.js:

 Drupal.behaviors.crossSlideBanner = function (context) {
   $('td#header').crossSlide({
     sleep: 5, //in sec
     fade: 2    //in sec
   }, [
     { src: 'images/OPS-Banner-01.jpg'},
     { src: 'images/OPS-Banner-02.jpg'},
     { src: 'images/OPS-Banner-03.jpg'},
     { src: 'images/OPS-Banner-04.jpg'},
     { src: 'images/OPS-Banner-05.jpg'},
     { src: 'images/OPS-Banner-06.jpg'},
     { src: 'images/OPS-Banner-07.jpg'},
     { src: 'images/OPS-Banner-08.jpg'},
     { src: 'images/OPS-Banner-09.jpg'},
     { src: 'images/OPS-Banner-10.jpg'}
   ]);

 };

 But I get nothing displayed.  The only thing I can think of is that my
 original script sets the background property of td#header, where
 CrossSlide replaces the content of td#header.  Even so, it seems that
 I should see something at least.

 Can anyone tell me what I'm missing?

 Thanks.

 Steve


[jQuery] Ignoring mouse events?

2009-03-26 Thread Carlos A. Carnero Delgado

Hello,

I have a table of items, and each one of them is manageable somehow.
That is, for each one of them I can provide links to modify,
enable/disable, delete, etc. Basically a simple CRUD application.

Now, instead of using ever-present links for each row, I'd like to
show a little div with the options on top of the row under the mouse
cursor. Just as a test, I managed to hot-track the current row with a
.hover() and I also positioned the div (a global div, BTW) on the
tracked row.

My problem is that when the mouse pointer goes over that div the
underlying tr's mouseout triggers. and what comes next is a
flickering of said div. Essentially triggering/retriggering of
onmouseover  onmouseout events. So, finally, my question. Is there a
way to have a div (front layer in this case) to ignore, or pass
below mouse events?

I'm jQuery noob, BTW.

Thanks a lot,
Carlos.


[jQuery] Jquery with Rails application

2009-03-26 Thread shs

Hi all..


I am new to JQuery,
I am trying to implement  Jquery with Rails apllication.
I installed JRails and implement some effects.
 But i couldn't able to find exact result..
can anybody tell the usage of Jquery with Rails


[jQuery] Jquery with Rails application

2009-03-26 Thread shs

Hi all..


I am new to JQuery,
I am trying to implement  Jquery with Rails apllication.
I installed JRails and implement some effects.
 But i couldn't able to find exact result..
can anybody tell the usage of Jquery with Rails


[jQuery] Jquery with Rails application

2009-03-26 Thread shs

Hi all..


I am new to JQuery,
I am trying to implement  Jquery with Rails apllication.
I installed JRails and implement some effects.
 But i couldn't able to find exact result..
can anybody tell the usage of Jquery with Rails


[jQuery] [form] Handling re-ajax'ing a form after a submission attempt

2009-03-26 Thread kevin

Hello,

I am having a problem re-binding a form with ajaxForm() and Zend
Framework.

I got the ajax form submit working, but on form validation failure I
am passing back the form html within a json object and I re-stuff the
div container with the form html in order to render out form errors.

This works fine.

My problem is re-intializing the form that has been passed back with
the ajaxForm() function. When I try re-submit the form, nothing
happens.

When the form is passed back via JSON object, I still use the same
element ID I used for the initial form prior to submitting. I tried
changing the element ID in the form to be passed back but still does
not work..

I am not sure what I am doing wrong...

Does anyone have any suggestions?

Thanks


Below is my showResponse() function

function showResponse(responseText, statusText)  {
if (1 == responseText.statusCode) {

// Form Error
alert('Story Errors!');
$('#header-submit-container').html(responseText.html);
$('#myForm1').ajaxForm(responseText.formOptions);

} else if (2 == responseText.statusCode) {
// Form Success
alert('Story Submitted!');
}
}


[jQuery] Re: must show an element if exists

2009-03-26 Thread Alexandre Plennevaux

you don't have to do that check. If the element does not exist, the
show() code will not be run.



On Thu, Mar 26, 2009 at 4:40 AM, shobhitsoftskills
shobhitsing...@gmail.com wrote:

 hi,

 i am learning jQuery and confused about one thing.below is simple code
 using jQuery.

 !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01//EN
  http://www.w3.org/TR/html4/strict.dtd;
 html

 head

 script type=text/javascript src=jquery.js/script

 script type=text/javascript
 $(document).ready(function() {
 if ( $('#myDiv').length )
  $('#myDiv').show();

 });
 /script

 /head

 body
  div id=myDivSearch Engines/div
 /body

 /html





 i am trying below lines.

 if ( $('#myDiv').length )
  $('#myDiv').show();

 according to this code if element exists then element should be show
 but i did not look any thing.

 kindly post your thoughts.



[jQuery] Re: Pointless but fun jQuery experiment

2009-03-26 Thread Alexandre Plennevaux

kelvin, that's wicked !

On Thu, Mar 26, 2009 at 11:37 AM, kanna mail4ka...@gmail.com wrote:

 Nice effects, Kelvin!!
 JQuery Rocks!!!

 On Mar 26, 8:49 am, Nikola nik.cod...@gmail.com wrote:
 That was really neat... jQuery physics!

 On Mar 25, 11:40 pm, brian bally.z...@gmail.com wrote:

  I'll second that!

  On Wed, Mar 25, 2009 at 9:26 PM, Rick Faircloth

  r...@whitestonemedia.com wrote:

   Pretty cool, Kelvin!

   Rick

   -Original Message-
   From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
   Behalf Of Kelvin Luck
   Sent: Wednesday, March 25, 2009 9:22 PM
   To: jquery-en
   Subject: [jQuery] Pointless but fun jQuery experiment

   Inspired by google's chrome experiments I recently put together a
   pointless but fun experiment with the help of jQuery and I thought
   that people on the list might like to check it out:

  http://www.kelvinluck.com/assets/jquery/boingPic/index.html

   As I said, completely pointless but makes a nice change from serious
   progressive enhancement!

   Hope you like it,

   Kelvin :)



[jQuery] Re: Intelisense in VS2008

2009-03-26 Thread MorningZ

There's nothing you can do there

function report(event)

gives Intellisense no clue what type of object event is

suggestion: move on past this issue

or post here
http://forums.asp.net/1112.aspx

but you're going to get the same answer

On Mar 26, 4:30 am, simonxy enki...@gmail.com wrote:
 I have the following code:

 html
   head
     titleHover example/title
     link rel=stylesheet type=text/css href=hover.css
     script type=text/javascript
             src=../scriptsNew/jquery-1.3.2.js/script
     script type=text/javascript
         function report(event) {
             $('#console').append('div' + event.type + '/
 div').stop;
             event.stopPropagation();
             //alert( event.isPropagationStopped());
       }

       $(function() {
           $('#outer1')
          .bind('mouseover', report)
          .bind('mouseout', report);
           $('#outer2').hover(report, report);
       });
     /script
   /head

   body
     div class=outer id=outer1
       Outer 1
       div class=inner id=inner1Inner 1/div
     /div
     div class=outer id=outer2
       Outer 2
       div class=inner id=inner2Inner 2/div
     /div
     div id=console/div
   /body
 /html

 When an event handler is fired, an instance of a class named Event is
 passed to the handler as its first parameter.
 Where should I declare it? Do you have any idea? This eample is from
 the book.

 thank you,
 Simon

 On Mar 25, 3:38 pm, MorningZ morni...@gmail.com wrote:

  Without more code it's hard to help, but I could venture a guess that
  where you are in your code that Intellisense has no idea what the type
  of variable/object event is

  to help understand that, take this sample:

  var s;

  if you went to do something with s, the compiler has no idea what
  kind of object s is... so typing s. results in no Intellisense

  now, if you said:

  var s = '';

  then typing s. results in all the things you can do to a string

  saying:

  var s = 0;

  results in Intellisense for numeric objects

  So if Studio has no idea what event is (and this is your code that
  needs to specify it!!), then it can't provide help

  On Mar 25, 5:38 am, simonxy enki...@gmail.com wrote:

   Hi, I copiedjquery-1.3.2.js andjquery-1.3.2-vsdoc.js files into the
   same directory and intelisense works, but not in complete. For
   example, I don't have almost any properties and methods of event
   object, like event.stopPropagation() or event.isPropagationStopped()
   and similar.
   Why intelisense of event object doesn't work?

   Thank you for your answer,
   Simon- Hide quoted text -

  - Show quoted text -


[jQuery] Re: question about getJSON and surrounding JavaScript comments in JSON

2009-03-26 Thread MorningZ

That doesn't make any sense

getJSON, makes an AJAX call and expects, well, it expects JSON

if what your calling has comments surrounding it, then it isn't JSON,
so that function won't work

You'll have to use the generic .ajax method, strip off the comments,
and then, ugggh, eval() to turn the uncommented string into JSON


On Mar 25, 11:02 pm, jt j...@arclocal.com wrote:
 I'd like to use the getJSON function but my data source has
 surrounding javascript comments on it. Is there a way I can use
 getJSON and pass it a parameter to strip this off. If not is there a
 different function that would be more appropriate?

 I am able to remove the Javascript comment characters and getJSON
 works fine but the feed is this way.

 thanks for any help.

 jt


[jQuery] Jquery Tabs, want to remove white line under selected tab

2009-03-26 Thread Martin

Hello,

My Jquery Tags are working perfectly.  But the only problem I am now
experiencing is the selected tabs have a 1px white line underneath
them.   I have matched the colour of the tab and pane, but the 1px
line underneath makes the tabs look separate from the pane. Has anyone
encountered this issue and know of a quick fix?

Martin


[jQuery] Re: Cross-browser inline style injection in DOM

2009-03-26 Thread xPheRe

Hello all,
I found no solution yet to the CSS insertion.
Has anybody faced the same problem?
Is there a better/simpler approach?
Thanks in advance

On 24 mar, 16:16, xPheRe xpher...@gmail.com wrote:
 Hello all jQuery people.
 This is my first post in this list but I hope I can make sense with my
 question.

 Currently I'm developing some web applications for internal use,
 porting some old ones.
 I'd love the jQuery-way to do asynchronous requests, so I developed a
 plugin similar to Pimentech jFrame. Basicly, it automagically
 catches all clicks on links, sends an AJAH request and loads the
 response  inside a container.

 The problem came when the response contains STYLE or LINK tags. Using
 Firefox and Opera all was perfect, but no style was applied with IE6,
 IE7, Chrome or Safari. I was thinking that was my plugin's fault, but
 when I test the use case without it, the problem remains. No style
 applied.

 Check this simplified case without even jQuery:

 body
         p id=testThis is a test and should have a border around and 1ex
 padding!/p
         script type=text/javascript
                 var div = document.createElement('div');
                 // br/ added to avoid a bug in IE
                 div.innerHTML = 'br /style#test { border:2px solid #000; 
 padding:
 1ex; }/style';
                 var span = div.getElementsByTagName('span')[0];
                 document.body.appendChild(div);
         /script
 /body

 I thought that jQuery have workarounds to this, but I found none, so I
 created a plugin to do the work.
 In case I missed some jQuery functionality, please tell me. I prefer
 the jQuery way.

 This plugin relies on detecting whether inlined styles are processed
 or not. If not, modify $.fn.html to move all style's and link's to
 document.head, mark them with a 'data-style-loader' attribute and
 adding a dummy link to the target. When te dummy link is removed (with
 the same $.fn.html function), it removes all related style's and
 link's from head.

 Well, that's the code:

 $(function($) {

         // Checks for some supported features
         (function() {
                 var div = document.createElement('div');
                 div.id = 'jquery-support-styled';
                 document.body.appendChild(div);

                 // Checks whether inlined styles applies automaticly (Firefox 
 and
 Opera returns true)
                 div.innerHTML = 'style#'+div.id+' span { display:block; 
 width:
 3px; }/stylespan /';
                 var span = div.getElementsByTagName('span')[0];
                 $.support.inlineStyleApplies = $(span).width() == 3;

                 // Checks whether inlined styles applies if they are inside 
 'br'
 context (for IE)
                 $.support.mustPrependBrToInlineStyles = !
 $.support.inlineStyleApplies  (function(){
                         div.innerHTML = 'br /style#'+div.id+' span { 
 display:block;
 width:5px; }/stylespan /';
                         var span = div.getElementsByTagName('span')[0];
                         return ($.support.inlineStyleApplies = 
 $(span).width() == 5);
                 })();
                 document.body.removeChild(div);
         })();

         // Saves old $().html function
         var old_html = $.fn.html;

         if($.support.mustPrependBrToInlineStyles) {
                 // Modify old $().html to add br before styles and links
                 $.fn.html = function(_value) {
                         if(typeof _value !== 'string') {
                                 _value = _value.replace(/style|link/gi, 
 function(_text) {
                                         return 'br 
 style=display:none/'+_text
                                 })
                         }
                         return old_html.call(this, _value);
                 }

         } else if(!$.support.inlineStyleApplies) {
                 // Change old $().html to move link´s and style´s to the head
                 $.fn.html = function(_text) {
                         // Remove css-pointers and their pointees
                         var $styles = this.find('link[data-style-loader]');
                         if($styles.length) { clean_css($styles); }
                         // Calls old $().html
                         old_html.call(this, _text);
                         // Promote new links and styles to document.head
                         $styles = this.find('style,link[rel*=stylesheet]');
                         if($styles.length) { add_styles.call(this, $styles) }
                         return this;
                 }

                 // Remove css-pointers and their pointees
                 function        clean_css(_$styles) {
                         // Get pointees id
                         var st = [];
                         for(var i = 0; i  _$styles.length; ++i) {
                                 st[st.length] = 
 '[data-style-loader='+$(_$styles[i]).attr('data-
 style-loader')+']'
               

[jQuery] Re: aborting a $.getScript() request

2009-03-26 Thread Mauricio (Maujor) Samy Silva


1-) For remote calls, even script exists,  in case server is down the issue 
arises.

2-) It will be great some advise from a member of jQuery team.

Maurício.
-
De: Karl Rudd karl.r...@gmail.com

Here's my thoughts:

1) It is reliable when dealing with scripts that exist.
2) No idea.

Karl Rudd

.stripped


Tks Karl,
So, there are two questions I made to myself and I am unable to answer:
1-) Does $.getScript() is a reliable function to use? Is it a useless one?

2-) What does documentation at:
http://docs.jquery.com/Ajax/jQuery.getScript#urlcallback means when says:
* If you load functions via getScript, make sure to call them after a
delay.* ?




[jQuery] Re: Executing javascript that comes inside an AJAX response

2009-03-26 Thread Amit Shah

you didn't get it.
i mean the function written in response text. which has be evaluated.
can be called only from the main script. not from inside the responsed
html data.


On Mar 24, 8:07 pm, mkmanning michaell...@gmail.com wrote:
 If you're going to use jQuery, you have to be careful about writing
 code that then doesn't use jQuery. In this case, you're ajax call
 would have worked fine, if you had stuck with injecting the response
 into the DOM with jQuery, as it automatically evals scripts in a
 response with dataType of 'html'.

 Change:
 contentDiv.innerHTML = data

 to (with the appropriate selector for your div):
  $('div').html(data);

 On Mar 24, 3:44 am, Amit Shah amitsh...@gmail.com wrote:

  it's not working.

  well eval(responseText); don't works.

  cells = divResult.getElementsByTagName(script);
                          alert(cells.length);
                          for (var i = 0; i  cells.length; i++)
                          {
                                  alert(cells[i].innerHTML);
                              eval(cells[i].innerHTML);
                      }
                      sometesting(5);

  is working.
  but when the function sometesting() being called somewhere from
  ajaxresponse text, browser gives error. both ie and firefox.

  On Mar 15, 7:47 am, NightWatchman rushi...@gmail.com wrote:

   To execute javascript code returned by the server you need to use the
   javascript eval function on the string of script returned from the
   server. As far as I know changing the content of a div to a javascript
   block won't cause that javascript code to execute.

   I think you need to change:

   contentDiv.innerHTML = data;

   to

   eval(data);

   On Mar 14, 3:12 pm, Foreigner foreigne...@gmail.com wrote:

Hi,
I'm trying to use jQuery to get some HTML with Javascript using AJAX.
My response gets inserted into the contentDiv element but my
javascript inside the response doesn't get executed as the
documentation says (http://docs.jquery.com/
Specifying_the_Data_Type_for_AJAX_Requests).

Here goes my function with AJAX call:

function loadHtml(obj)
{
        if(obj.className == menuItem)
        {
                $.ajax({
                                 type:GET,
                                 url:content/ + obj.id + .html,
                                 dataType: html,
                                 success:
                                         function(data, status)
                                         {
                                                  contentDiv.innerHTML 
= data;
                                         }
                                });
        }

}

My response looks like:

h3Some heading/h3
script type=text/javascript

//Some javascript code

/script


[jQuery] How to bring focus to a window in jquery?

2009-03-26 Thread Mike

I am trying to bring focus to window using jquery. The window is popup
initiated through a button click on the parent page. I have some ajax
calls going on in the child window, so data is being updated. My issue
is that if the user clicks on the parent window and hides the child
behind it, i would like to bring that child window back to the
forefront if there is a data update.

inside $(document).ready I wire up these events:

  $(window).blur(function(){
WindowHasFocus =false;
}).focus(function(){
WindowHasFocus =true;
});

Then, if data is updated, I call this function:

function FocusInput(){
 if(!WindowHasFocus){
  $(window).focus(); }
}

This works as expected in IE8, but in FireFox(and all other browsers)
the $(window).focus(); doesnt seem to do anything. Any suggestions/
ideas on how achieve this?


[jQuery] Re: Attribute selector

2009-03-26 Thread Lay András

Hello!

On Wed, Mar 25, 2009 at 6:00 PM, Karl Swedberg k...@englishrules.com wrote:

 Hi Lay,
 You could do it like this:
 $('table').filter(function() {
    return this.style.tableLayout == 'fixed';
 });
 Not sure what happens when you try it in a browser that doesn't support the
 tableLayout property, though.

Yes, this way works:

$('table').filter(function() {
return this.style.tableLayout=='fixed';
}).css('background-color','#DD');

Thank you!

Bye!

Lay


[jQuery] Re: Jquery Tabs, want to remove white line under selected tab

2009-03-26 Thread acamar

Hello again Martin

It's CSS question as well :). It would be helpful if you reveal your
code. But as I suppose the margin-bottom: -1px on tabs may help
resolve the problem.

On 26 мар, 14:56, Martin martin.ikedia...@gmail.com wrote:
 Hello,

 My Jquery Tags are working perfectly.  But the only problem I am now
 experiencing is the selected tabs have a 1px white line underneath
 them.   I have matched the colour of the tab and pane, but the 1px
 line underneath makes the tabs look separate from the pane. Has anyone
 encountered this issue and know of a quick fix?

 Martin


[jQuery] tablesorter plugin

2009-03-26 Thread David

Hi all,

I found this very handy tablesorter plugin (http://tablesorter.com/
docs/#Demo).

But i have a problem when i want to put an image in it, the image is
trashed and/or does not display properly.

Is there a special way to do it with tablesorter ?

my code:

echo 'td';
echo 'a id='.$row['userId'].' href=#img src=images/
recycle.png/a';
echo '/td';


[jQuery] Re: Jquery with Rails application

2009-03-26 Thread nick hensgen
Since yesterday, I have gotten about 80 of these emails from you and others at 
this email address.  I think somehow I accidently got put on a distribution 
list of what appear to be internal Google emails.  Please remove my email 
address. 
 
Thanks.

--- On Thu, 3/26/09, shs harithasyam...@gmail.com wrote:


From: shs harithasyam...@gmail.com
Subject: [jQuery] Jquery with Rails application
To: jQuery (English) jquery-en@googlegroups.com
Date: Thursday, March 26, 2009, 5:19 AM



Hi all..


I am new to JQuery,
I am trying to implement  Jquery with Rails apllication.
I installed JRails and implement some effects.
But i couldn't able to find exact result..
can anybody tell the usage of Jquery with Rails



  

[jQuery] Trouble styling submenus of Superfish

2009-03-26 Thread Kath

Hi there,

I'm having a problem styling the submenus of Superfish.  The text on
hover jumps a few px to the left.  I have played around with it, but I
can't figure it out.  If I add in padding-left: 5px to this in the css

.sf-menu li:hover, .sf-menu li.sfHover,
.sf-menu a:focus, .sf-menu a:hover, .sf-menu a:active {
background: #CFDEFF;
outline:0;

}

it then puts the parent item out of whack.

http://www.rugbygoldcoast.com.au/rugby/index.php

I would appreciate any guidance :)

Thanks
Kathy


[jQuery] .load() problems in ie

2009-03-26 Thread derrickkwa

hi...

i'm trying to code a site, you can see it at 
http://derrickkwa.com/6amb/index.html

so far, i've only implemented the first link in the navigation menu
(work - equipment), and clicking on the logo brings it back to the
home page.

here's my question, though. it works perfectly fine in firefox, the
remote div content is loaded perfectly, and the content container
animates accordingly. in ie 7, however, it seems as if the div content
for the equipment page is not being loaded, and it's only showing
the background image for that page.

any thoughts on why that is - and how i can fix it?

the code i'm using for the navigation menu is this:
$(.sub-nav).children(li).children(a).click(
function(event){

//set current block
currentblock = $(this).parent(li).parent(ul).parent(li).attr
('id');

//set current link and bold it
if (currentlink != '') {
currentlink = this;
}
else {
$(currentlink).css('color','#66').css('font-weight', 'normal'); //
set old link back to normal
currentlink = this;
$(currentlink).css('color','#00').css('font-weight', 'bold'); //
set current link  to hold
}

var toLoad = $(this).attr('href')+' #content-wrapper';
$('#content-wrapper').slideUp('Normal',loadContent);
$('#load').remove();
$('#page-container').append('span id=loadLOADING.../span');
$('#load').fadeIn('normal');
var pagename=$(this).attr('href').substr(0,$(this).attr
('href').length-5);
window.location.hash = pagename;

function loadContent() {
alert(toLoad);
$('#content-wrapper').load(toLoad,'',showNewContent());
}

function showNewContent() {
backgroundurl = 'url(images/backgrounds/'+pagename+'.jpg)';
$('#content-wrapper').slideDown('normal',hideLoader());
$('#content-wrapper').css('background-image',backgroundurl);
}

function hideLoader() {
$('#load').fadeOut('normal');
}
return false;

});

thanks,
derrick


[jQuery] Timers and jQuery problem

2009-03-26 Thread John Leidegren

What is wrong with this code?

$(document).ready(function() {
var a = $(#job-banner-content div);
if (a.length  0) {
var i = 0;
var f = function() {
i += Math.max(1, Math.floor(Math.random() * (a.length -
1)));
var b = a.eq(i % a.length).css(top, -200px).animate
({ top: 0px }, 2000);
setTimeout(function() { b.animate({ top: 200px },
2000); }, 7000);
}
f();
setInterval(f, 1);
}
});

What happens is that the animation only occurs occasionaly every 10
sec not every time with 10 sec intervals. I can't wrap my head around
this, but then, I'm new to jQuery am I doing something wrong here?


[jQuery] Re: question about getJSON and surrounding JavaScript comments in JSON

2009-03-26 Thread nick hensgen
Since yesterday, I have gotten about 80 of these emails from you and others at 
this email address.  I think somehow I accidently got put on a distribution 
list of what appear to be internal Google emails.  Please remove my email 
address. 
 
Thanks.

--- On Thu, 3/26/09, MorningZ morni...@gmail.com wrote:


From: MorningZ morni...@gmail.com
Subject: [jQuery] Re: question about getJSON and surrounding JavaScript 
comments in JSON
To: jQuery (English) jquery-en@googlegroups.com
Date: Thursday, March 26, 2009, 7:49 AM



That doesn't make any sense

getJSON, makes an AJAX call and expects, well, it expects JSON

if what your calling has comments surrounding it, then it isn't JSON,
so that function won't work

You'll have to use the generic .ajax method, strip off the comments,
and then, ugggh, eval() to turn the uncommented string into JSON


On Mar 25, 11:02 pm, jt j...@arclocal.com wrote:
 I'd like to use the getJSON function but my data source has
 surrounding javascript comments on it. Is there a way I can use
 getJSON and pass it a parameter to strip this off. If not is there a
 different function that would be more appropriate?

 I am able to remove the Javascript comment characters and getJSON
 works fine but the feed is this way.

 thanks for any help.

 jt



  

[jQuery] Re: tablesorter plugin

2009-03-26 Thread nick hensgen
Since yesterday, I have gotten about 80 of these emails from you and others at 
this email address.  I think somehow I accidently got put on a distribution 
list of what appear to be internal Google emails.  Please remove my email 
address. 
 
Thanks.

--- On Thu, 3/26/09, David omertacod...@gmail.com wrote:


From: David omertacod...@gmail.com
Subject: [jQuery] tablesorter plugin
To: jQuery (English) jquery-en@googlegroups.com
Date: Thursday, March 26, 2009, 8:42 AM



Hi all,

I found this very handy tablesorter plugin (http://tablesorter.com/
docs/#Demo).

But i have a problem when i want to put an image in it, the image is
trashed and/or does not display properly.

Is there a special way to do it with tablesorter ?

my code:

echo 'td';
echo 'a id='.$row['userId'].' href=#img src=images/
recycle.png/a';
echo '/td';



  

[jQuery] Re: tablesorter plugin

2009-03-26 Thread David



On 26 mrt, 13:45, nick hensgen lacey...@yahoo.com wrote:
 Since yesterday, I have gotten about 80 of these emails from you and others 
 at this email address.  I think somehow I accidently got put on a 
 distribution list of what appear to be internal Google emails.  Please remove 
 my email address.
  
 Thanks.


This is done standaard, has nothing to with me or other users, you can
easyly change that yourself in the settings ...


[jQuery] Timing of 1.3.3 release

2009-03-26 Thread dberthia

Anybody have any insight into when 1.3.3 might be released? There are
a couple of bugs that are wreaking havoc on our application, but have
apparently been fixed in 1.3.3 (#3993 and #4017). Thanks,
- Dave


[jQuery] Re: Pointless but fun jQuery experiment

2009-03-26 Thread Andy Matthews

That's stinkin' awesome! Very cool. I'm not even ask how you did it (I'll
just view source).

:) 

-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Kelvin Luck
Sent: Wednesday, March 25, 2009 8:22 PM
To: jquery-en
Subject: [jQuery] Pointless but fun jQuery experiment


Inspired by google's chrome experiments I recently put together a pointless
but fun experiment with the help of jQuery and I thought that people on the
list might like to check it out:

http://www.kelvinluck.com/assets/jquery/boingPic/index.html

As I said, completely pointless but makes a nice change from serious
progressive enhancement!

Hope you like it,

Kelvin :)




[jQuery] Re: Need to get value of table cell

2009-03-26 Thread Webspeeder

I have the table ID as well as the row ID.

On Mar 25, 6:32 pm, Josh Powell seas...@gmail.com wrote:
 What unique identifier do these cells have?

 Do the cells have id's? $('#theid').  Do the rows have ids? $('#theid 
 td').get(1) will get you the second cell of the row with an id of

 'theid', does the table have an id? $('#tableid  tbody  tr'  td)
 will return all of the tds in that table inside of trs that are inside
 of the tbody.  Then, by saying value I think that you mean the text
 inside of that cell since cells do not have a 'value' attribute, and
 that would be obtained using

 $('#tableid  tbody  tr'  td).each(
     function () {
         alert($(this).text()); // to get just the text
         alert($(this).html());  // to get the full html inside instead
     }
 );

 Find more on selectors at:http://docs.jquery.com/Selectors

 and more on the .text()  .html() at:http://docs.jquery.com/Manipulation

 and more on the .get(1) at:http://docs.jquery.com/Core

 Cheers,
 Josh Powell

 On Mar 25, 1:27 pm, webspee...@gmail.com webspee...@gmail.com
 wrote:

  Hey all.

  I have a table and I need to access the value of a particular cell in
  the selected row.  I've seen this type of code before but can't
  remember what to search on.

  Any clues?


[jQuery] Re: Timing of 1.3.3 release

2009-03-26 Thread John Resig

Why not just use a nightly build? No need to wait for a full release.
http://code.jquery.com/nightlies/jquery-2009-03-26.js

--John



On Thu, Mar 26, 2009 at 9:03 AM, dberthia dave.berthia...@gmail.com wrote:

 Anybody have any insight into when 1.3.3 might be released? There are
 a couple of bugs that are wreaking havoc on our application, but have
 apparently been fixed in 1.3.3 (#3993 and #4017). Thanks,
 - Dave


[jQuery] Re: why does load cost so much time?

2009-03-26 Thread Samuel
Hope get your helps.

On Thu, Mar 26, 2009 at 1:14 AM, Samuel samuel.yh...@gmail.com wrote:

 supplement more information on the issue.

 $('.words') have html data, ie, this node is not empty, so it must cost
 some time to remove the children.

 I made tens of tests, and the average of data() function time is around
 500ms, which must be too high.

 It's possible for me to use a iframe to process this if load() usually
 consume so much time. the iframe costs around 120ms, which time for
 ajax(get) in jquery is around 100ms. so only another 20ms used for redering
 css in iframe without js codes added, which might cost a little more loading
 and examining time.

 I need to treat  the time as a very critical factor, so there is no
 negotiation on the time.

 Any suggestion on how to improve the speed is hugely expected, but your
 suggestions are iframe are also strikingly hoped.

 Thanks again.



 On Thu, Mar 26, 2009 at 12:42 AM, Samuel samuel.yh...@gmail.com wrote:

 Hi,

 recently I changed my ajax returned content format to html pieces, using a
 load() function with an expect of time decreasing used for dom manipulation.

 On the contract, it could be even longer than the previous xml processing
 time.

 After a debugging with firebug, I found the function data() consumes most
 of time, 90% of the total one. Here's a quick illustration:

 data()16585.59%457.185ms457.185ms 2.771ms0.007ms11.215msjquery.js (line
 658)ajax() 12.86%15.267ms17.361ms17.361ms17.361ms17.361msjquery.js (line
 2583) fix()11.89%10.122ms10.122ms10.122ms10.122ms 10.122msjquery.js (line
 2092)merge() 291.6%8.554ms8.554ms0.295ms0.003ms6.079msjquery.js (line
 1155) classFilter()61.5%8.008ms8.008ms1.335ms 0.012ms4.04msjquery.js
 (line 1657)remove() 30.85%4.524ms451.542ms150.514ms7.582ms332.348msjquery.js
 (line 1310) remove()710.8%4.268ms428.967ms6.042ms 6.166ms7.32msjquery.js
 (line 1908)(?)() 20.68%3.633ms4.378ms2.189ms0.116ms4.262msjquery.js (line
 947) find()140.52%2.751ms19.985ms1.428ms0.14ms 10.527msjquery.js (line
 1464)append() 50.35%1.843ms1.843ms0.369ms0.04ms1.186msjquery.js (line
 237) removeData()1060.34%1.793ms1.793ms0.017ms 0.011ms0.318msjquery.js
 (line 684)init() 580.32%1.711ms24.058ms0.415ms0ms10.864ms
 data() function consumed as much as 85% of time, strikingly beyond of my
 expectation which should be less than 100ms.

 some code:


 renderLearning=function(nextUrl,node) {

 $('.words').load(nextUrl,function () {

 var word=$('#words h1').text();
 $('#next_word').click(function () {
 renderLearning($('#next_word').attr('href'));
 return false;
 })
 $('#prev_word').click(function () {
 renderLearning($('#prev_word').attr('href'));
 return false;
 })
  })
 }

 your helps are highly appreciated. Thanks very much.

 Regards,
 --
 Samuel(吴焱红)
 Blog:http://wuyanhong.blogspot.com




 --
 Samuel(吴焱红)
 Blog:http://wuyanhong.blogspot.com




-- 
Samuel(吴焱红)
Blog:http://wuyanhong.blogspot.com


[jQuery] Re: slide/scroller to top

2009-03-26 Thread Ariel Flesler

The browser scrollbar ?

If so:

With the ScrollTo plugin [1]:

$.scrollTo( 0 );

You can add a duration as second argument (f.e: 1000).

[1] http://flesler.blogspot.com/2007/10/jqueryscrollto.html

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

On Mar 25, 12:41 pm, introvert aljaz.faj...@gmail.com wrote:
 Hello

 How is it possible to slide scrollbar to the top with jquery?

 Thanks a lot for help!


[jQuery] Re: scrollto and jumping

2009-03-26 Thread Ariel Flesler

In case James comment doesn't do for you, please provide a demo.

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

On Mar 24, 11:27 pm, kevinm sonicd...@gmail.com wrote:
 I have a vertical scrolliing area and inside the first area I have an
 a link that when clicked calls scrollto to scroll the main vertical
 area.

 What is happening is that the link is jumping to the link, then it
 scrolls.

 Any thoughts

 Thanks
 Kevin


[jQuery] Re: getJSON

2009-03-26 Thread iceangel89

i still cant out put anything even with a simple alert(json);

in firebug i see that ... below ... is returned

[
{Value: 1, Item: Physics},
{Value: 2, Item: Chemistry},
{Value: 3, Item: Biology}
];

On Mar 26, 5:34 pm, jakenoble j...@jakenoblewebs.co.uk wrote:
 Shouldn't your JSON return values be double quoted?

 [ {Value: 1, Item: Physics}, {Value: 2, Item: Chemistry},
 {Value: 3, Item: Biology} ];

 On Mar 26, 9:16 am, iceangel89 iceange...@gmail.com wrote:

  i am trying to load json. but it seems like its not working. nothing
  is alerted. supposed to be the case?

  script type=text/javascript
  $(function() {
          $.getJSON(data.js, function (json) {
                  alert(json);
          });});

  /script

  data.js
  [ {Value: 1, Item: Physics}, {Value: 2, Item: Chemistry}, {Value: 3,
  Item: Biology} ];


[jQuery] no :ge : le filters?

2009-03-26 Thread donb

If I could 'or' :eq and :gt somehow then there's the answer - but I
haven't seen that talked about.  Is it possible?

I'd like to accomplish: $(div.foo:ge(2)).remove()


[jQuery] Re: getJSON

2009-03-26 Thread iceangel89

ok i solved it, it shld be something like

{ departments: { department: {ID: 1, Name: Physics},
department: {ID: 2, Name: Chemistry
}, department: {ID: 3, Name: Biology},}}

instead, use of {} and
departments: d: {xxx}, d: {yyy}, d: {zzz}

am i right to say all these are required? {} and departments and
department naming for the objects?

On Mar 26, 9:59 pm, iceangel89 iceange...@gmail.com wrote:
 i still cant out put anything even with a simple alert(json);

 in firebug i see that ... below ... is returned

 [
 {Value: 1, Item: Physics},
 {Value: 2, Item: Chemistry},
 {Value: 3, Item: Biology}
 ];

 On Mar 26, 5:34 pm, jakenoble j...@jakenoblewebs.co.uk wrote:

  Shouldn't your JSON return values be double quoted?

  [ {Value: 1, Item: Physics}, {Value: 2, Item: Chemistry},
  {Value: 3, Item: Biology} ];

  On Mar 26, 9:16 am, iceangel89 iceange...@gmail.com wrote:

   i am trying to load json. but it seems like its not working. nothing
   is alerted. supposed to be the case?

   script type=text/javascript
   $(function() {
           $.getJSON(data.js, function (json) {
                   alert(json);
           });});

   /script

   data.js
   [ {Value: 1, Item: Physics}, {Value: 2, Item: Chemistry}, {Value: 3,
   Item: Biology} ];


[jQuery] looping through json

2009-03-26 Thread iceangel89

how can i loop through json like:

{ departments: {
   department: {ID: 1, Name: Physics},
   department: {ID: 2, Name: Chemistry},
   department: {ID: 3, Name: Biology}
}}

i tried

$.each(json.departments.department, function(i, n) {
alert(i +   + n);
});

and got

ID: 3
Name: Biology

but i wanted something like

1: Physics
2: Chemistry
3: Biology


[jQuery] Re: looping through json

2009-03-26 Thread MorningZ

$.each(json.departments, function(department, dictionary) {
   alert(ID:  + dictionary.ID + \nName:  + dictionary.Name);
});


iceangel89 wrote:
 how can i loop through json like:

 { departments: {
department: {ID: 1, Name: Physics},
department: {ID: 2, Name: Chemistry},
department: {ID: 3, Name: Biology}
 }}

 i tried

 $.each(json.departments.department, function(i, n) {
   alert(i +   + n);
 });

 and got

 ID: 3
 Name: Biology

 but i wanted something like

 1: Physics
 2: Chemistry
 3: Biology


[jQuery] ui.tabs : callback show doesn't work

2009-03-26 Thread Minus


Hello.

I meet a strange problem with ui.tabs that I can't understand.
I have 2 tabs which work fine. There are few links in the first tab and when
I click one of these links, the second tab is selected... this part works
fine.
But I want the second tab scroll down the description, and I've a problem
with this part. 


link rel=stylesheet type=text/css
href=/design/css/jquery-theme/jquery-ui-1.7.custom.css /
script language=javascript type=text/javascript
src=/js/jquery.js/script
script language=javascript type=text/javascript
src=/js/jquery-ui-1.7.core.min.js/script
script language=javascript type=text/javascript
src=/js/ui.tabs.js/script
script language=javascript type=text/javascript
src=/js/jquery.scrollTo-1.3.3-min.js/script
script
replaceRegexp = function (reg, chaineDeRemplacement, string) {
return string.replace(reg, chaineDeRemplacement);
};

$(document).ready(function(){
//affiche les onglets
$(#conteneurTab).tabs({ fx: { opacity: 'toggle' } }); //WORK FINE

$(.link2Esc).click(function(){
escale = replaceRegexp('iti', 'escale', $(this).attr('id'));
console.log(escale); //OK IN FIREBUG
$('#conteneurTab').tabs('select', 1);  //WORKS
$('#conteneurTab').tabs({
show: function() {
console.log('link2Esc') //NEVER APPEAR IN 
FIREBUG
$.scrollTo($('#'+escale), 800); //NEVER SCROLL 
DOWN
}
});
});
});
/script

any help will be appreciate...
-- 
View this message in context: 
http://www.nabble.com/ui.tabs-%3A-callback-show-doesn%27t-work-tp22723281s27240p22723281.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: why does load cost so much time?

2009-03-26 Thread Leonardo K
Maybe this question about performance should be ask in jQuery Dev Group. :D

On Thu, Mar 26, 2009 at 10:36, Samuel samuel.yh...@gmail.com wrote:

 Hope get your helps.

 On Thu, Mar 26, 2009 at 1:14 AM, Samuel samuel.yh...@gmail.com wrote:

 supplement more information on the issue.

 $('.words') have html data, ie, this node is not empty, so it must cost
 some time to remove the children.

 I made tens of tests, and the average of data() function time is around
 500ms, which must be too high.

 It's possible for me to use a iframe to process this if load() usually
 consume so much time. the iframe costs around 120ms, which time for
 ajax(get) in jquery is around 100ms. so only another 20ms used for redering
 css in iframe without js codes added, which might cost a little more loading
 and examining time.

 I need to treat  the time as a very critical factor, so there is no
 negotiation on the time.

 Any suggestion on how to improve the speed is hugely expected, but your
 suggestions are iframe are also strikingly hoped.

 Thanks again.



 On Thu, Mar 26, 2009 at 12:42 AM, Samuel samuel.yh...@gmail.com wrote:

 Hi,

 recently I changed my ajax returned content format to html pieces, using
 a load() function with an expect of time decreasing used for dom
 manipulation.
 On the contract, it could be even longer than the previous xml processing
 time.

 After a debugging with firebug, I found the function data() consumes most
 of time, 90% of the total one. Here's a quick illustration:

 data()16585.59%457.185ms457.185ms 2.771ms0.007ms11.215msjquery.js (line
 658)ajax() 12.86%15.267ms17.361ms17.361ms17.361ms17.361msjquery.js (line
 2583) fix()11.89%10.122ms10.122ms10.122ms10.122ms 10.122msjquery.js
 (line 2092)merge() 291.6%8.554ms8.554ms0.295ms0.003ms6.079msjquery.js
 (line 1155) classFilter()61.5%8.008ms8.008ms1.335ms 0.012ms4.04msjquery.js
 (line 1657)remove() 30.85%4.524ms451.542ms150.514ms7.582ms332.348msjquery.js
 (line 1310) remove()710.8%4.268ms428.967ms6.042ms 6.166ms7.32msjquery.js
 (line 1908)(?)() 20.68%3.633ms4.378ms2.189ms0.116ms4.262msjquery.js
 (line 947) find()140.52%2.751ms19.985ms1.428ms0.14ms 10.527msjquery.js
 (line 1464)append() 50.35%1.843ms1.843ms0.369ms0.04ms1.186msjquery.js
 (line 237) removeData()1060.34%1.793ms1.793ms0.017ms 0.011ms0.318msjquery.js
 (line 684)init() 580.32%1.711ms24.058ms0.415ms0ms10.864ms
 data() function consumed as much as 85% of time, strikingly beyond of my
 expectation which should be less than 100ms.

 some code:


 renderLearning=function(nextUrl,node) {

 $('.words').load(nextUrl,function () {

 var word=$('#words h1').text();
 $('#next_word').click(function () {
 renderLearning($('#next_word').attr('href'));
 return false;
 })
 $('#prev_word').click(function () {
 renderLearning($('#prev_word').attr('href'));
 return false;
 })
  })
 }

 your helps are highly appreciated. Thanks very much.

 Regards,
 --
 Samuel(吴焱红)
 Blog:http://wuyanhong.blogspot.com




 --
 Samuel(吴焱红)
 Blog:http://wuyanhong.blogspot.com




 --
 Samuel(吴焱红)
 Blog:http://wuyanhong.blogspot.com



[jQuery] Re: Cycle Plugin : [cycle] terminating; too few slides: 1

2009-03-26 Thread Asinox

Well my foreach is fine, all tags are closed fine, firebug report my
request fine but for this case, now im using something that i
found using mootools

Thanks u

On Mar 24, 11:59 pm, pedalpete p...@hearwhere.com wrote:
 Yeah, but I've seen the same thing in my code, and it turned out I
 wasn't calling the 'foreach' properly.

 Look at the response you are getting from the server (I'm assuming
 ajax) or look for a tag not closed properly or something.
 Posting code or link is the only way we can help here.

 On Mar 24, 5:18 pm, Asinox asi...@gmail.com wrote:

  Hi, but im doing... i have a foreach  with php for load the images, in
  the home pages i got the message, but in the another part to the
  website is fine...

  On Mar 24, 7:16 pm, pedalpete p...@hearwhere.com wrote:

   The message means that there isn't enough data in thecyclefor it to
  cyclethrough.
   Likely you are only loading yourcyclewrapper once, but you didn't
   include any code or a url, so it's tough to tell.


[jQuery] Jquery Tabs, want to remove white line under selected tab, without removing line under unselected tab

2009-03-26 Thread Martin

Hello,

My Jquery Tags are working perfectly.  But the only problem I am now
experiencing is the selected tabs have a 1px white line underneath
them.   I have matched the colour of the tab and pane, but the 1px
line underneath makes the tabs look separate from the pane. Has
anyone
encountered this issue and know of a quick fix?

Please bear in mind that I would like to keep the line under the
unselected tab...

Here is my CSS

ui-tabs .ui-tabs-hide {
 display: none;



}


#tabs ul li a {
background:#ECEDFC none repeat scroll 0 0;  /* first tab is
blue like
the panel */
/* background: none; */
text-indent:0;
font-size:100.01%;
line-height:1.4;
padding:0.5em 1em;


}


#tabs ul li a.tabTwo {
background:#FFCCFF none repeat scroll 0 0;  /* second tab is
pink
like the second panel */


}


.ui-widget-header {
background: none;
border: none;


}

/* interaction states */

.ui-state-default, .ui-widget-content .ui-state-default { border: 1px
solid #d3d3d3; background: #e6e6e6 url(images/ui-
bg_glass_75_e6e6e6_1x400.png) 50% 50% repeat-x; font-weight: normal;
color: #55; outline: none; }

.ui-state-default a, .ui-state-default a:link, .ui-state-default
a:visited { color: #55; text-decoration: none; outline: none; }

.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-state-
focus, .ui-widget-content .ui-state-focus { border: 1px solid #99;
background: #dadada url(images/ui-bg_glass_75_dadada_1x400.png) 50%
50% repeat-x; font-weight: normal; color: #212121; outline: none; }

.ui-state-hover a, .ui-state-hover a:hover { color: #212121; text-
decoration: none; outline: none; }

.ui-state-active, .ui-widget-content .ui-state-active { border: 1px
solid #aa; background: #ff url(images/ui-
bg_glass_65_ff_1x400.png) 50% 50% repeat-x; font-weight: normal;
color: #212121; outline: none; }

.ui-state-active a, .ui-state-active a:link, .ui-state-active
a:visited { color: #212121; outline: none; text-decoration: none; }



Martin



[jQuery] html to text

2009-03-26 Thread bart

I'm pulling html from each td tag which resides in the tablerow of a
table like so;

$('table tr td').each(function()
{
$('div').text($(this).html()).appendTo('#jaheur');
});

For each match it creates a div which holds the HTML in text format. I
noticed that it transformed a line break br / to br (without the
slash) what causes this behavior? Does this only happen with self
closing tags? Can I prevent it all together?


[jQuery] Re: html to text

2009-03-26 Thread Martijn Houtman


On Mar 26, 2009, at 4:19 PM, bart wrote:


For each match it creates a div which holds the HTML in text format. I
noticed that it transformed a line break br / to br (without the
slash) what causes this behavior? Does this only happen with self
closing tags? Can I prevent it all together?


I believe XHTML is the only version that enforces a break element to  
be self-closed. The rest accept (or even define) br, rather than  
br /. Browsers (luckily?) are very forgiving, so they rewrite br / 
 to br internally. That is probably why you get them back like that.


Exactly why would you want to prevent the browser from rewriting it?

Regards,
--
Martijn.

[jQuery] Inserting rows of DIVs to create a list

2009-03-26 Thread nmiddleweek

Hello,

I'm trying to create a dynamic list of data using jQuery... Each row
will have an INPUT and a BUTTON element.

I'm thinking of holding a hidden 'template' for each row and then
duplicating the 'template' row for each row needed and then edit the
ID and innerHTML of the DOM elements for that row...

Is this possible?


Thanks,
Nick


[jQuery] Re: Inserting rows of DIVs to create a list

2009-03-26 Thread MorningZ

of course it's possible.

you'd use:
- a variable that contains the string that is the template
- JavaScript's .replace method to fill in the ID and HTML

also, there's plenty of template plugins out there (chain.js,
jTemplate)

On Mar 26, 11:34 am, nmiddleweek nmiddlew...@googlemail.com wrote:
 Hello,

 I'm trying to create a dynamic list of data using jQuery... Each row
 will have an INPUT and a BUTTON element.

 I'm thinking of holding a hidden 'template' for each row and then
 duplicating the 'template' row for each row needed and then edit the
 ID and innerHTML of the DOM elements for that row...

 Is this possible?

 Thanks,
 Nick


[jQuery] Re: Convert js to jquery

2009-03-26 Thread mdjamal

Hi,

Thanks again, that solves my problem :-)

Ciao.


[jQuery] Re: no :ge : le filters?

2009-03-26 Thread Karl Swedberg


On Mar 26, 2009, at 10:14 AM, donb wrote:



If I could 'or' :eq and :gt somehow then there's the answer - but I
haven't seen that talked about.  Is it possible?

I'd like to accomplish: $(div.foo:ge(2)).remove()


well, you could do $(div.foo:gt(2), div.foo:eq(2)).remove() or $ 
(div.foo:gt(2)).add(div.foo:eq(2)).remove(), but why not just $ 
(div.foo:gt(1)).remove() ?





--Karl


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



[jQuery] selecting children

2009-03-26 Thread david.garc...@barcelonamedia.org

Hi,

my question is, why next line doesn't work:

$(#conditions-+get_sufix(type)+ 
div,tr,span,label,select,input).each(function(){...});

nor next line:

$(#conditions-+get_sufix(type)+
div,tr,span,label,select,input).each(function(){...});

nor next line:

$(#conditions-+get_sufix(type)).children
(div,tr,span,label,select,input).each(function(){...});

and next line does work:

$(#conditions-+get_sufix(type)).find
(div,tr,span,label,select,input).each(function(){...});

for searching child nodes from a given node at any depth?

find is implemented for working at any level and children and  only
for the first level?

Thanks


[jQuery] Re: Inserting rows of DIVs to create a list

2009-03-26 Thread nmiddlew...@gmail.com

Hi, thanks for your reply...

I was thinking of storing the template in the DOM so it's visible by
our web designer to tweat. How would I read that template (DIV block)
into a javascript variable?


Thanks for your help!




On Mar 26, 3:44 pm, MorningZ morni...@gmail.com wrote:
 of course it's possible.

 you'd use:
 - a variable that contains the string that is the template
 - JavaScript's .replace method to fill in the ID and HTML

 also, there's plenty of template plugins out there (chain.js,
 jTemplate)

 On Mar 26, 11:34 am, nmiddleweek nmiddlew...@googlemail.com wrote:

  Hello,

  I'm trying to create a dynamic list of data using jQuery... Each row
  will have an INPUT and a BUTTON element.

  I'm thinking of holding a hidden 'template' for each row and then
  duplicating the 'template' row for each row needed and then edit the
  ID and innerHTML of the DOM elements for that row...

  Is this possible?

  Thanks,
  Nick


[jQuery] Re: html to text

2009-03-26 Thread bart

I have a HTML document with some hardcoded content in it. This content
needs to be moved to a database so I have jQuery helping me with some
html manipulation left and right to batch some queries. As I want to
insert valid xhtml into the database br won't do. But I understand
that how these self closing tags are handled in browser specific? It
would make more sense to me if the browser would just handle HTML
syntax according to the specified doctype...

On Mar 26, 4:33 pm, Martijn Houtman martijn.hout...@gmail.com wrote:
 On Mar 26, 2009, at 4:19 PM, bart wrote:

  For each match it creates a div which holds the HTML in text format. I
  noticed that it transformed a line break br / to br (without the
  slash) what causes this behavior? Does this only happen with self
  closing tags? Can I prevent it all together?

 I believe XHTML is the only version that enforces a break element to  
 be self-closed. The rest accept (or even define) br, rather than  
 br /. Browsers (luckily?) are very forgiving, so they rewrite br /
   to br internally. That is probably why you get them back like that.

 Exactly why would you want to prevent the browser from rewriting it?

 Regards,
 --
 Martijn.


[jQuery] PNG Fix option that doesn't resize background PNGs?

2009-03-26 Thread D A

I am using Andreas Eberhard's PngFix plugin:
http://plugins.jquery.com/project/pngFix

Unfortunately, there's a known issue with it resizing background
images to fit the container.

I am using a PNG sprite so create a rollover effect for some buttons.
As such, I don't want the background resized, but cropped. I don't
care if the rollovers are missing in IE6, but I obviously can't have 3
squished buttons showing up.

Is there a jQuery based fix for Transparent PNGs in IE that will not
resize the background PNGs, or is this merely a side effect of how one
needs to fix IE to begin (in which case, I'll have to add conditional
tags and have IE6 use some GIF images instead).

-DA


[jQuery] cluetip ajaxcache:false does not work in IE7

2009-03-26 Thread Geert Baven
How can l have IE 7 respect the ajaxcache set to false?
you can see an example at
http://www.strikingconcepts.nl/development/kittiwake
the first tooltip is an experiment provides an examplein the cluetip.js
file I have  set the option like this:

ajaxCache:false,


any help appreciated

Geert
-- 


 strikingconcepts


www.strikingconcepts.nl
  webdesign
06 450 860 83
amsterdam - groningen


[jQuery] Re: one check box to select entire group

2009-03-26 Thread Andy H

Here's the html for you.


table
tr
th/th
thTitle/th
thinput type=checkbox name=chk_cat1 id=chk_cat1 //
th
thinput type=checkbox name=chk_cat2 id=chk_cat2 //
th
/tr
tr
tdinput type=checkbox name=chk_row1 id=chk_row1 //
td
tdDescription 1/td
tdinput type=checkbox name=chk_cat1_row1
id=chk_cat1_row1 //td
tdinput type=checkbox name=chk_cat2_row1
id=chk_cat2_row1 //td
/tr
tr
tdinput type=checkbox name=chk_row2 id=chk_row2 //
td
tdDescription 2/td
tdinput type=checkbox name=chk_cat1_row2
id=chk_cat1_row2 //td
tdinput type=checkbox name=chk_cat2_row2
id=chk_cat2_row2 //td
/tr
/table




I think what I'm going to do is change the attributes for the
checkboxes, so it will make it easier to find the header related
checkboxes and row related items.  So, I'll be formatting the check
boxes like this:

input type=checkbox name=chk_cat1_row1 id=chk_cat1_row1
headerid=chk_cat1 rowid=row1 /

Now I don't have to parse any id's out and jQuery seems to work with
this.



Thanks!







On Mar 25, 5:41 pm, MorningZ morni...@gmail.com wrote:
 How about just showing the HTML instead of hard to follow
 explainations

 It's still not clear what the header column is  is it text? is
 there a checkbox?  what has the id cat1?

 On Mar 25, 5:22 pm, Andy H adharb...@gmail.com wrote:



  That is close, the item section will be different for each check box.
  The table will have three columns that will be populated with check
  boxes only.  The header section in the table will have a global select
  for each column.   So  if there is a row that has the following

  chk_categoryID_itemID   each row will share the same
  itemID and each column will share the same category id.

  header1 = cat1... header2 = cat2.
  row1 = item1 row2 = item2

  so we have two rows with two columns.  We'll have four checkboxes that
  will look like this.

  ckb_cat1_item1        ckb_cat2_item1
  ckb_cat1_item2        ckb_cat2_item2

  So, if I select the header for category 1, I need to be able to select
  ckb_cat1_item1  ckb_cat1_item2.

  Hopefully that makes more sense.

  Thanks!

  On Mar 25, 11:37 am, MorningZ morni...@gmail.com wrote:

   Your description of your HTML isn't very clear, but none the less this
   could work:

   $(selector for header checkboxes).click(function() {
         var chk = this;
         $(input[id^=' + chk.id + _item']).each(function()
   { this.checked = chk.checked; });

   })

   On Mar 25, 12:12 pm, Andy adharb...@gmail.com wrote:

Hey guys,

I have a table where the header has check boxes so if you click on
that, it will select all of the other checkboxes in that row.   The
issue I have, it's not a select all checkboxes, but ones that have a
specific naming convention.   Example.  If my header is named
ckb_category1 I need to be able to find all checkboxes that are in
that column that have naming like ckb_category1_item1.  Then each row
following would have a different item id, but keep the category1 the
same.   Is there a pattern I can use that would work for this?

Thanks!- Hide quoted text -

   - Show quoted text -- Hide quoted text -

 - Show quoted text -


[jQuery] Re: Inserting rows of DIVs to create a list

2009-03-26 Thread mkmanning

a dynamic list implies something more semantic than a row of divs,
say a UL or DL...but if you want divs, here's a quick example:

div id=template style=display:none;!-- everything inside this
div will be cloned --
divinput type=text id=tmp_input /button/button/div
/div

$(document).ready(function(){
$('#template div').clone().find('input').attr
('tmp_input','your_new_id').end().find('button').text('Hello').end
().appendTo('body');
});

What attributes to change and where you inject the cloned html into
the DOM is up to you (as is chaining or not). You'll probably want to
wrap the code above in a function and pass the IDs and HTML into it;
just replace the hard-coded values with those arguments.

Since you're working with DOM elements, you can use jQuery's methods
for modifying attributes and html/text (check out the docs for the
many ways to do that).


On Mar 26, 9:11 am, nmiddlew...@gmail.com
nmiddlew...@googlemail.com wrote:
 Hi, thanks for your reply...

 I was thinking of storing the template in the DOM so it's visible by
 our web designer to tweat. How would I read that template (DIV block)
 into a javascript variable?

 Thanks for your help!

 On Mar 26, 3:44 pm, MorningZ morni...@gmail.com wrote:

  of course it's possible.

  you'd use:
  - a variable that contains the string that is the template
  - JavaScript's .replace method to fill in the ID and HTML

  also, there's plenty of template plugins out there (chain.js,
  jTemplate)

  On Mar 26, 11:34 am, nmiddleweek nmiddlew...@googlemail.com wrote:

   Hello,

   I'm trying to create a dynamic list of data using jQuery... Each row
   will have an INPUT and a BUTTON element.

   I'm thinking of holding a hidden 'template' for each row and then
   duplicating the 'template' row for each row needed and then edit the
   ID and innerHTML of the DOM elements for that row...

   Is this possible?

   Thanks,
   Nick


[jQuery] Get element position relative to the body

2009-03-26 Thread Shedokan

Is it possible to get the position of an object relative to the
dcument if it's a floating object inside elements?

thanks.


[jQuery] Re: [form] Handling re-ajax'ing a form after a submission attempt

2009-03-26 Thread berbercarpet

ignore that, better:

function initSigninForm() {
var options = {
target: '#mainContent',
dataType: 'json',
beforeSubmit: showRequest,
success: showSignInResponse
}
$('#mainContent form').ajaxForm(options);
}
function showSignInResponse(xhr) {
if (xhr.error_msg != 'No error') {
$('#mainContent').html(xhr.content_html,
showNewContent(xhr.message, xhr.response_filepath, xhr.key));
xhrErrorDisplay(xhr);
} else {
xhrResponseDisplay(xhr);
$('#mainContent').html(xhr.content_html,
showNewContent(xhr.message, xhr.response_filepath, xhr.key));
initSigninForm();
}
}


[jQuery] Slow jQuery Event Cleanup in Firefox

2009-03-26 Thread J K

Let me start by saying that I am doing something rather unorthodox
with jQuery, and I realize that this is probably outside the realm of
what is reasonable.

I have a 65x65 HTML table, giving me 4225 TD cells.

I am making each of them clickable with the following code:

$('td').click(function () {
  // do something
});

It works wonderfully in all browsers (well, IE is a little slow, but
it's IE).

When I go to close this page, Safari and Opera close almost instantly,
IE pauses for a moment and then closes, but Firefox takes sometimes 10
seconds or more to close the tab, causing the browser to lock for that
time.

I traced the lock into the jQuery cleanup code for event handling.
Does anyone know why this is so slow on Firefox?


[jQuery] Jquery validation plugin question

2009-03-26 Thread markstegg...@googlemail.com

Hello,

Thanks for building this validation plugin, I like it. I have a
question:

The error class automatically gets added to the label with the same
for= name, but for a certain error I need to change the element that
gains the error class.

For instance, I added this line to the error placement so that a
certain element receives the error class but then realised the error
class would not be removed when the error is corrected by the user:

code
else if (element.attr(name) == aupairLanguageList) {
 error.insertAfter(#multiSelect-aupairLanguageList-content);
 $(#multiSelect-aupairLanguageList-title).addClass(error);
 }
/code

Any Ideas?

Thanks


[jQuery] Re: [form] Handling re-ajax'ing a form after a submission attempt

2009-03-26 Thread berbercarpet

On Thu, Mar 26, 2009 at 12:45 AM, kevin young.ke...@gmail.com wrote:

 I got the ajax form submit working, but on form validation failure I
 am passing back the form html within a json object and I re-stuff the
 div container with the form html in order to render out form errors.

 My problem is re-intializing the form that has been passed back with
 the ajaxForm() function. When I try re-submit the form, nothing
 happens.

i had a similar problem, but this seems to be working for me:

function initSigninForm() {
var options = {
target: '#mainContent',
dataType: 'json',
beforeSubmit: showRequest,
success: showSignInResponse $('#mainContent form').ajaxForm(options);
}
}
function showSignInResponse(xhr) {
if (xhr.error_msg != 'No error') {
$('#mainContent').html(xhr.content_html,
showNewContent(xhr.message, xhr.response_filepath, xhr.key));
xhrErrorDisplay(xhr);
} else {
xhrResponseDisplay(xhr);
$('#mainContent').html(xhr.content_html,
showNewContent(xhr.message, xhr.response_filepath, xhr.key));
initSigninForm();
}
}


[jQuery] Superfish join code clarity patch

2009-03-26 Thread Virtual Machine

These join statements seemingly behave the same as simple string
concatenation, the latter being much more readable.

Index: superfish.js
===
--- superfish.js(revision 36485)
+++ superfish.js(working copy)
@@ -15,7 +15,7 @@

var sf = $.fn.superfish,
c = sf.c,
-   $arrow = $(['span class=',c.arrowClass,'
#187;/span'].join('')),
+   $arrow = $('span class='+c.arrowClass+'
#187;/span'),
over = function(){
var $$ = $(this), menu = getMenu($$);
clearTimeout(menu.sfTimer);
@@ -27,11 +27,11 @@
menu.sfTimer=setTimeout(function(){
 o.retainPath=($.inArray($$[0],o.$path)
-1);
 $$.hideSuperfishUl();
-if (o.$path.length  $$.parents
(['li.',o.hoverClass].join('')).length1){over.call(o.$path);}
+if (o.$path.length  $$.parents
('li.'+o.hoverClass).length1){over.call(o.$path);}
},o.delay);
},
getMenu = function($menu){
-   var menu = $menu.parents
(['ul.',c.menuClass,':first'].join(''))[0];
+   var menu = $menu.parents
('ul.'+c.menuClass+':first')[0];
sf.op = sf.o[menu.serial];
return menu;
},
@@ -41,7 +41,7 @@
var s = this.serial = sf.o.length;
var o = $.extend({},sf.defaults,op);
o.$path = $('li.'+o.pathClass,this).slice
(0,o.pathLevels).each(function(){
-   $(this).addClass
([o.hoverClass,c.bcClass].join(' '))
+   $(this).addClass(o.hoverClass+'
'+c.bcClass)
 .filter('li:has(ul)').removeClass
(o.pathClass);
});
sf.o[s] = sf.op = o;
@@ -101,7 +101,7 @@
var o = sf.op,
not = (o.retainPath===true) ? o.
$path : '';
o.retainPath = false;
-   var $ul = $(['li.',o.hoverClass].join
(''),this).add(this).not(not).removeClass(o.hoverClass)
+   var $ul = $('li.'+o.hoverClass,this).add
(this).not(not).removeClass(o.hoverClass)
 .find('ul').hide().css
('visibility','hidden');
o.onHide.call($ul);
return this;


[jQuery] change onmouseover function call

2009-03-26 Thread Air YT

hi there, have a puzzling one.

i have a fairly simple function call that we use to display tooltips
over certain image elements. we put the function call in the
onmouseover attribute of the image element.
looks like this:

script
function CreateTip( strTipMessage ) {
// GENERATE TOOLTIP
}
/script
img id=img src=/images/image.jpg onmouseover=CreateTip( 'this is
the tooltip' ); onmouseout=ClearTip(); /


what i would like to do is to change the tooltip that is displayed
when the image is clicked. So the code becomes:
script
function CreateTip( strTipMessage ) {
// GENERATE TOOLTIP
}
function ChangeTip( ) {
$( #img).attr( onmouseover, CreateTip( 'New ToolTip' ) );
}
/script
img id=img src=/images/image.jpg onmouseover=CreateTip( 'this is
the tooltip' ); onmouseout=ClearTip(); onclick=ChangeTip( ); /

this works when i click on the element - ie. the 'New tooltip' text is
displayed properly - but only if i keep my mouse pointer over the
image. my problem is that when i move the mouse off the image and
return it to the image, the OLD tooltip is displayed.

any help here would be really, well, helpful.

thanks a bunch... airyt



[jQuery] Re: jQuery contextmenu problems

2009-03-26 Thread aramgt

Do you have a demo?

On 15 feb, 07:03, micho mich...@gmail.com wrote:
 Okay, so searching and searching I found that the problem is really in
 this block:

     $.each(cur.bindings, function(id, func) {
       $('#'+id, menu).bind('click', function(e) {
         hide();
         func(trigger, currentTarget);
       });
     });

 This is for some reason not working for firefox. When I remove menu
 then it works, but then it starts iterating through all values in the
 nested tree. Nobody seems to be looking for the same feature?

 On 14 Feb, 03:37, micho mich...@gmail.com wrote:



  Okay, so I have now located the problem. Why does this row only work
  in IE, but not in Firefox?

                 .bind('click', function(e) {
                  e.stopPropagation();

  Anyone out there???

  On 13 Feb, 22:27, micho mich...@gmail.com wrote:

   Note that the contextmenu as such appears in both IE and Firefox, but
   the problem is when I try to left click a menu item in the context
   menu. Then the binding only works in IE but not in Firefox. Anyone??

   On 10 Feb, 02:21, micho mich...@gmail.com wrote:

I'm using the jQuery contextmenu plugin combined with jQuery
treeview async plugin. This means that I load in all data into the
treeview from the database. Next step is that I want to be able to
right click these dynamically loaded elements and alert the id of each
element. I get it working in IE, but not in firefox. Any ideas why it
would not work in firefox??

jQuery(document).ready(function(){

        jQuery(#black).treeview({
                        animated: 1,
                        url: source.php,
                        persist: cookie,
                        cookieid: mtree
                });

                jQuery('ul li').livequery(function() {
                jQuery('span.folder, 
span.file').contextMenu('theContextMenu', {

                bindings: {

        'edit': function(t) {

                  editItem(t.id);

        },

        'email': function(t) {

          alert('Trigger was '+t.id+'\nAction was Email');

        },

        'save': function(t) {

          alert('Trigger was '+t.id+'\nAction was Save');

        },

        'delete': function(t) {

          alert('Trigger was '+t.id+'\nAction was Delete');

        }

      }

});
});
});- Dölj citerad text -

- Visa citerad text -- Dölj citerad text -

   - Visa citerad text -- Dölj citerad text -

  - Visa citerad text -- Ocultar texto de la cita -

 - Mostrar texto de la cita -


[jQuery] SlideDown() nested div?

2009-03-26 Thread Erika

I have a flv video nested inside of a div that slides down using
slideDown(). Is there any way to get the flv video to slide down along
with the parent div? Currently, the video pops up after the slide down
motion has completed.


[jQuery] refresh a DIV

2009-03-26 Thread Progressed

I have a DIV  with a php query in it. i'd like to get pointers to
maybe 2 solutions.

Ideal situation:
I have a other jquery script that launches an onComplete like:

'onComplete': { }

basicly i want to let it do a refresh on div id='records' #My sql
query# /div

other situation

I want to refresh this DIV every 5 seconds.

Can someone help me plese!

D.


[jQuery] Help with jquery functions

2009-03-26 Thread Progressed

dear members,

new on the whole jquery thingie, and need help on for the follwing:

I want to refresh a dive that contains a php query. It has to refresh
every 3 seconds. What i see is that the follwing code isnt correct. it
also starts $(document).ready... twice... it has to be wrong, but what
do i have to make it. please help :'(

script type=text/javascript
$(document).ready(function() {
$(#fileUpload3).fileUpload({
'uploader': '/CMS/scripts/uploader.swf',
'cancelImg': '/CMS/images/cancel.png',
'folder': '/CMS/gallery/?php echo $_POST[gallerijnaam] ?',
'script': 'actie.php',
'buttonImg': '/CMS/images/selecteerfotos.gif',
'height': '30',
'width':  '340',
'fileDesc': 'Image Files',
'fileExt': '*.jpg;*.jpeg;*.gif;*.png',
'multi': true,
'auto': true
});

$(a.group).fancybox({
'zoomSpeedIn':  300,
'zoomSpeedOut': 300,
'overlayShow':  false
});
});

function refreshRecordsDiv()
{
   $(records).fadeOut(slow);
   $(records).fadeIn(slow);
   setTimeout(refreshRecordsDiv();, 3000);

}

$(document).ready(function() {
   setTimeout(refreshRecordsDiv();, 3000);
}


[jQuery] listnav plugin

2009-03-26 Thread kristy...@gmail.com

I'm having trouble installing this. Not quite sure why it isn't
working. Does anyone have a tutorial online on how to implement this
or could look over mine and see what i'm doing wrong? I imagine it's
something simple. thanks!

Kristy lee

http://www.klcreativedesign.com/suasion/glossary


[jQuery] How to get the inline value for 'Display' style property via jquery/js??

2009-03-26 Thread KansasCoder


I have an inline css attribute which is set in the codebehind but changes
dynamically in the browser via jquery. The display of a textbox and a couple
of dropdowns are altered formblock to none based on some rules.

When I view the source of the page the dropdown that is visible still has
the original, server-side set display values in its source. So the jquery
method $(dropdown).css(display) doesn't yield the value I'm looking for. 

Is it possible to retrieve the actual value of an inline style element that
has been previously modified by javascript/jquery? 
Thank you,
:confused:
-- 
View this message in context: 
http://www.nabble.com/How-to-get-the-inline-value-for-%27Display%27-style-property-via-jquery-js---tp22723582s27240p22723582.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: Thickbox half-works.

2009-03-26 Thread Bert

Thickbox gives this error with the latest JQuery version. use version
1.2.6, worked for me that way.

greetz
www.twitter.com/Be_Bert

On 25 mrt, 15:46, Devin devin.corm...@gmail.com wrote:
 This is my code.   The problem I'm having is that when I click the
 thumbnail all I see the loading bar.  It just hangs there animated.
 Interestingly if I take the rel tag out of the images it works, but it
 doesn't show the previous and next options in the thickbox.

 Suggestions?

 !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN
 html
   head
   script type=text/javascript src=thickbox/js/jquery-latest.js/
 script
 script type=text/javascript src=thickbox/js/thickbox-
 compressed.js/script
 link rel=stylesheet href=styles/thickbox.css type=text/css
 media=screen /
   meta http-equiv=content-type content=text/html;
 charset=windows-1250

   titleLab6b - jquery/title
   /head

   body
 a href=images/plant1.jpg title=add a caption to title attribute /
 or leave blank class=thickbox rel=gallery-plantsimg src=images/
 plant1_t.jpg alt=Plant 1 //a
 a href=images/plant2.jpg title=add a caption to title attribute /
 or leave blank class=thickbox rel=gallery-plantsimg src=images/
 plant2_t.jpg alt=Plant 2 //a
 a href=images/plant3.jpg title=add a caption to title attribute /
 or leave blank class=thickbox rel=gallery-plantsimg src=images/
 plant3_t.jpg alt=Plant 3 //a
 a href=images/plant4.jpg title=add a caption to title attribute /
 or leave blank class=thickbox rel=gallery-plantsimg src=images/
 plant4_t.jpg alt=Plant 4 //a
   /body
 /html


[jQuery] Sort tables with hidden (.accordian collapsed) rows

2009-03-26 Thread Colin.Houghton

I have a table where every other row is collapsed (using .toggle).  I
want to sort on the visible rows, but the sort, of course, sorts the
hidden rows as well...the result is that the hidden rows may not
longer be associated with the same parent row.

Here is a snippet:

table id=aSortableTable
thead
  thtortable column 1/ththsortable column 2/th
/thead

tbody
tr id=toggle1tdmain row 1tdmain row 1 column 2/td/tr
trtd colspan = 2desc. for main row 1/td/tr


tr id=toggle2tdmain row 2tdmain row 2 column 2/td/tr
trtd colspan = 2desc. for main row 2/td/tr
/tbody
/table.



  Is there any way to tell the table sorter how to manage this?  I
need the table to sort on the main rows, but keep the description rows
paired with their respective parent row.


[jQuery] Temporarily disable inline onclick

2009-03-26 Thread Adam Walters

Hello,

I was wondering if there was a way to temporarily disable an inline
onclick event, which i can reattach later.  Here's the scenario:

My page has an edit mode which makes the text of certain elements
editable.
Edit mode is enabled - text that is editable gets a click event bound
to it by jquery
Clicking the element allows you to inplace edit and save the info
Disabling edit mode removes the click event to activate an editable
element

Everything works great unless there is an onclick attribute specifed
inline on the element (ie- rails generates an onclick confirm
message).  So the inline confirm is raised first, then my subsequent
bound click events.

Is there a means i can temporarily disable (or remove/reattach) these
inline javascript events?

I'm using jQuery 1.3.1

Thanks in advance,
Adam Walters


[jQuery] Problems using JRC corner or curvycorner

2009-03-26 Thread banacan

I'm creating a page with many divs that I would like to have rounded
corners, and several problems keep coming up.

When using JRC for rounding, not all elements will round even though
they have the correct class.  Reloading the page will, after several
attempts, create the rounded corners, though sometimes some elements
will never round.  This is even more problematic when the div has a
border; I can see the rounded bg but the border is still square.
Again, after repeated reloadings (3 or 4 times) it will usually work,
though in some browsers it might not.  Also, when using a gradient
background on the parent div, the corner does not pick up the
underlying color.

When using curvycorner, the underlying color does come through, but
again the div is not always rounded on the first load.  It too needs
refreshing multiple times before displaying correctly.  Also, with
curvycorners IE (6 anyway) does not produce rounded corners at all.

So my questions are:

Is this a common failing of these scripts?
Is having the CSS in an external file the problem?
Could these problems be caused by my local testing server?
 MAC OSX10.4.9, Apache 1.3.1, PHP 5.2, MySQL 5.0
Is a traditional CSS approach more reliable - though not easier?

I don't want to spend much more time on this and I was hoping to hear
from others whether or not they have experienced similar problems.  If
this is just not reliable, I need to take a different approach.

TIA


[jQuery] Event Cleanup Slowness in Firefox

2009-03-26 Thread J K

I have a 65x65 HTML table, giving me 4225 table cells.  I am using
jQuery to make each cell clickable with the following code:

$('td').click(function () {
// do stuff
});

I realize this is a lot of events and that this is likely well outside
the realm of what's considered reasonable.

The good news is that this code works great in all browsers (well, IE
is a little slow, but that's IE for you) until I try to close the
tab.  Most of the browsers close very quickly, but Firefox can take up
to 20-30 seconds to close the tab.  I've traced the issue to the
jQuery event cleanup code.

Does anyone know why the event cleanup code is so slow on Firefox, but
not other browsers?


[jQuery] Beginner Question

2009-03-26 Thread Flavouski

In JQuery I saw you can get attributes by saying

foo.attr(value), super handy.

Is there anyway to get the element of the thing that contains the
attribute?
Reasoning: I've got a few hidden inputs that have

name=firstName value=Bob
name=lastName value=Bobble

So I would want to say get the element whose attr name equals
firstName.  So then I can go back into the element and retrieve the
value associated with it: Bob

Thanks


[jQuery] Re: Jquery validation plugin question

2009-03-26 Thread Jörn Zaefferer

Use the highlight and unhighlight options for that.

Jörn

On Thu, Mar 26, 2009 at 3:21 PM, markstegg...@googlemail.com
markstegg...@googlemail.com wrote:

 Hello,

 Thanks for building this validation plugin, I like it. I have a
 question:

 The error class automatically gets added to the label with the same
 for= name, but for a certain error I need to change the element that
 gains the error class.

 For instance, I added this line to the error placement so that a
 certain element receives the error class but then realised the error
 class would not be removed when the error is corrected by the user:

 code
 else if (element.attr(name) == aupairLanguageList) {
         error.insertAfter(#multiSelect-aupairLanguageList-content);
         $(#multiSelect-aupairLanguageList-title).addClass(error);
         }
 /code

 Any Ideas?

 Thanks



[jQuery] Re: Inserting rows of DIVs to create a list

2009-03-26 Thread nmiddlew...@gmail.com

Thank you!

This is exactly what I'm after

Cheers, Nick




On Mar 26, 4:34 pm, mkmanning michaell...@gmail.com wrote:
 a dynamic list implies something more semantic than a row of divs,
 say a UL or DL...but if you want divs, here's a quick example:

 div id=template style=display:none;!-- everything inside this
 div will be cloned --
         divinput type=text id=tmp_input /button/button/div
 /div

 $(document).ready(function(){
 $('#template div').clone().find('input').attr
 ('tmp_input','your_new_id').end().find('button').text('Hello').end
 ().appendTo('body');

 });

 What attributes to change and where you inject the cloned html into
 the DOM is up to you (as is chaining or not). You'll probably want to
 wrap the code above in a function and pass the IDs and HTML into it;
 just replace the hard-coded values with those arguments.

 Since you're working with DOM elements, you can use jQuery's methods
 for modifying attributes and html/text (check out the docs for the
 many ways to do that).

 On Mar 26, 9:11 am, nmiddlew...@gmail.com

 nmiddlew...@googlemail.com wrote:
  Hi, thanks for your reply...

  I was thinking of storing the template in the DOM so it's visible by
  our web designer to tweat. How would I read that template (DIV block)
  into a javascript variable?

  Thanks for your help!

  On Mar 26, 3:44 pm, MorningZ morni...@gmail.com wrote:

   of course it's possible.

   you'd use:
   - a variable that contains the string that is the template
   - JavaScript's .replace method to fill in the ID and HTML

   also, there's plenty of template plugins out there (chain.js,
   jTemplate)

   On Mar 26, 11:34 am, nmiddleweek nmiddlew...@googlemail.com wrote:

Hello,

I'm trying to create a dynamic list of data using jQuery... Each row
will have an INPUT and a BUTTON element.

I'm thinking of holding a hidden 'template' for each row and then
duplicating the 'template' row for each row needed and then edit the
ID and innerHTML of the DOM elements for that row...

Is this possible?

Thanks,
Nick


[jQuery] Re: Slow jQuery Event Cleanup in Firefox

2009-03-26 Thread Matt W.

You might want to try adding one click to the table and checking if
the target was a td.

On Mar 26, 7:13 am, J K artlo...@gmail.com wrote:
 Let me start by saying that I am doing something rather unorthodox
 with jQuery, and I realize that this is probably outside the realm of
 what is reasonable.

 I have a 65x65 HTML table, giving me 4225 TD cells.

 I am making each of them clickable with the following code:

 $('td').click(function () {
   // do something

 });

 It works wonderfully in all browsers (well, IE is a little slow, but
 it's IE).

 When I go to close this page, Safari and Opera close almost instantly,
 IE pauses for a moment and then closes, but Firefox takes sometimes 10
 seconds or more to close the tab, causing the browser to lock for that
 time.

 I traced the lock into the jQuery cleanup code for event handling.
 Does anyone know why this is so slow on Firefox?


[jQuery] Re: Problems using JRC corner or curvycorner

2009-03-26 Thread Nikola

I've found JRC and the Bullet Proof CornerZ PlugIns to be foolproof...
except in IE8 thus far.

On Mar 26, 11:44 am, banacan banaca...@gmail.com wrote:
 I'm creating a page with many divs that I would like to have rounded
 corners, and several problems keep coming up.

 When using JRC for rounding, not all elements will round even though
 they have the correct class.  Reloading the page will, after several
 attempts, create the rounded corners, though sometimes some elements
 will never round.  This is even more problematic when the div has a
 border; I can see the rounded bg but the border is still square.
 Again, after repeated reloadings (3 or 4 times) it will usually work,
 though in some browsers it might not.  Also, when using a gradient
 background on the parent div, the corner does not pick up the
 underlying color.

 When using curvycorner, the underlying color does come through, but
 again the div is not always rounded on the first load.  It too needs
 refreshing multiple times before displaying correctly.  Also, with
 curvycorners IE (6 anyway) does not produce rounded corners at all.

 So my questions are:

 Is this a common failing of these scripts?
 Is having the CSS in an external file the problem?
 Could these problems be caused by my local testing server?
  MAC OSX10.4.9, Apache 1.3.1, PHP 5.2, MySQL 5.0
 Is a traditional CSS approach more reliable - though not easier?

 I don't want to spend much more time on this and I was hoping to hear
 from others whether or not they have experienced similar problems.  If
 this is just not reliable, I need to take a different approach.

 TIA


[jQuery] Re: Slow jQuery Event Cleanup in Firefox

2009-03-26 Thread MorningZ

These articles will really help clean up your events

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




On Mar 26, 1:20 pm, Matt W. propel...@gmail.com wrote:
 You might want to try adding one click to the table and checking if
 the target was a td.

 On Mar 26, 7:13 am, J K artlo...@gmail.com wrote:

  Let me start by saying that I am doing something rather unorthodox
  with jQuery, and I realize that this is probably outside the realm of
  what is reasonable.

  I have a 65x65 HTML table, giving me 4225 TD cells.

  I am making each of them clickable with the following code:

  $('td').click(function () {
    // do something

  });

  It works wonderfully in all browsers (well, IE is a little slow, but
  it's IE).

  When I go to close this page, Safari and Opera close almost instantly,
  IE pauses for a moment and then closes, but Firefox takes sometimes 10
  seconds or more to close the tab, causing the browser to lock for that
  time.

  I traced the lock into the jQuery cleanup code for event handling.
  Does anyone know why this is so slow on Firefox?


[jQuery] Superfish over a Cycle element in IE 7

2009-03-26 Thread thejon

I spent hours looking for an answer to this and here is the solution:

When you want your Superfish menu to appear over a Cycle slideshow,
make your .sf-menu, .sf-menu * look like this:
.sf-menu, .sf-menu * {

}


[jQuery] Ajax call with XML Response

2009-03-26 Thread moocher

Hi,
I'm very new to JQuery and am having a problem with an Ajax call that
returns xml. The error event is being fired, but the textStatus value
is 'parserror' and the errorThrown value is 'undefined'. The xml
response is valid so i'm not sure what could be wrong.

$.ajax({
beforeSend: function() {

 },
type: GET,
url: ajaxttest.asp,
dataType: xml,
timeout: 1000,
contentType: text/xml,
success: function(xml) {
alert(in);

complete: function(XMLHttpRequest, textStatus) {
alert(comp);
},
 error: function(XMLHttpRequest, textStatus, errorThrown) {
alert(textStatus);
 }
});

Xml:

addressesaddressnumber6/number/address/addresses

Any help would be great.


[jQuery] Re: Jquery.media fails with querystring

2009-03-26 Thread Nico

Hi,

today I tried to upgrade from jQuery Media 0.8 to 0.87, and I met the
same problem.

With version 0.8, jQuery.media was able to handle links like this :
a href=mms://path/to/my/video.wmv?arg=valuelink/a
The media type was correct (Windows media player).

With version 0.87, jQuery.media doesn't handle anymore this kind of
link.

Any way to correct this ?

thanks,

Nico

On 27 fév, 16:11, James Tindall james.tind...@gmail.com wrote:
 Hi,

 If there's any kind of query string on the end of an flv file name in
 the href of the element that is to be overwritten the media plugin
 fails to overwrite the element with the embed code? Anyone know how to
 fix/work-round this??

 cheers,

 James


[jQuery] Re: listnav plugin

2009-03-26 Thread Jack Killpatrick


Something is causing your glossary-nav span to be hidden in the HTML 
(and also not found by the listnav plugin). Try running the HTML through 
a validator. I tried seeing what was causing the span to be hidden, 
using Firebug, but didn't immediately see the cause.


- Jack


kristy...@gmail.com wrote:

I'm having trouble installing this. Not quite sure why it isn't
working. Does anyone have a tutorial online on how to implement this
or could look over mine and see what i'm doing wrong? I imagine it's
something simple. thanks!

Kristy lee

http://www.klcreativedesign.com/suasion/glossary

  





[jQuery] Re: Beginner Question

2009-03-26 Thread Karl Swedberg

Just use an attribute selector. For example:

$('input[name=firstName]')

http://docs.jquery.com/Selectors/attributeEquals#attributevalue

--Karl


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




On Mar 26, 2009, at 10:04 AM, Flavouski wrote:



In JQuery I saw you can get attributes by saying

foo.attr(value), super handy.

Is there anyway to get the element of the thing that contains the
attribute?
Reasoning: I've got a few hidden inputs that have

name=firstName value=Bob
name=lastName value=Bobble

So I would want to say get the element whose attr name equals
firstName.  So then I can go back into the element and retrieve the
value associated with it: Bob

Thanks




[jQuery] Re: Temporarily disable inline onclick

2009-03-26 Thread James

I think you should probably unbind that inline onclick attribute on
page ready and re-assign your own onclick function with jQuery (even
if it's the same thing). Save your custom onclick callback function to
a variable (as in, separate it from the onclick assignment so it's a
standalone function that can be called elsewhere). Then use unbind()
to unbind the click.
http://docs.jquery.com/Events/unbind#typefn
Then when you're ready, re-bind the click with the saved callback
function again.

On Mar 26, 5:46 am, Adam Walters ajwalt...@gmail.com wrote:
 Hello,

 I was wondering if there was a way to temporarily disable an inline
 onclick event, which i can reattach later.  Here's the scenario:

 My page has an edit mode which makes the text of certain elements
 editable.
 Edit mode is enabled - text that is editable gets a click event bound
 to it by jquery
 Clicking the element allows you to inplace edit and save the info
 Disabling edit mode removes the click event to activate an editable
 element

 Everything works great unless there is an onclick attribute specifed
 inline on the element (ie- rails generates an onclick confirm
 message).  So the inline confirm is raised first, then my subsequent
 bound click events.

 Is there a means i can temporarily disable (or remove/reattach) these
 inline javascript events?

 I'm using jQuery 1.3.1

 Thanks in advance,
 Adam Walters


[jQuery] Re: Event Cleanup Slowness in Firefox

2009-03-26 Thread Karl Swedberg
don't know why it's so much slower in Firefox, but if you're dealing  
with that many elements, you ought to consider using event delegation  
instead. You can use the .live() method ...


$('td').live('click', function() {
// do stuff
});

... or roll your own

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

--Karl


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




On Mar 26, 2009, at 11:45 AM, J K wrote:



I have a 65x65 HTML table, giving me 4225 table cells.  I am using
jQuery to make each cell clickable with the following code:

   $('td').click(function () {
   // do stuff
   });

I realize this is a lot of events and that this is likely well outside
the realm of what's considered reasonable.

The good news is that this code works great in all browsers (well, IE
is a little slow, but that's IE for you) until I try to close the
tab.  Most of the browsers close very quickly, but Firefox can take up
to 20-30 seconds to close the tab.  I've traced the issue to the
jQuery event cleanup code.

Does anyone know why the event cleanup code is so slow on Firefox, but
not other browsers?




[jQuery] Re: refresh a DIV

2009-03-26 Thread James

What does refresh mean? Re-insert data into the element? If so, you
only need:
$(#records).html('put whatever you want here');

To refresh every 5 seconds, you can use Javascript's setInterval()
function.

function doRefresh() {
 $(#records).html('put whatever you want here');
}

setInterval(doRefresh, 5000);

On Mar 26, 6:06 am, Progressed da...@progressive-projects.nl wrote:
 I have a DIV  with a php query in it. i'd like to get pointers to
 maybe 2 solutions.

 Ideal situation:
 I have a other jquery script that launches an onComplete like:

 'onComplete': { }

 basicly i want to let it do a refresh on div id='records' #My sql
 query# /div

 other situation

 I want to refresh this DIV every 5 seconds.

 Can someone help me plese!

 D.


[jQuery] data-URLs for IE workaround

2009-03-26 Thread sleepwalker

Hi,
Does anyone have a work around the lack of support for data-URLs in
IE. I've seen some crazy php scripts using mhtml + vml but php isn't
supported in the environment I'm working in.

Thanks for your Help.
Daniel


  1   2   >