[jQuery] Re: jScrollPane, hide dragscroll... possible?

2008-09-24 Thread expanism

You really helped me out here! Thanks!!!

On 24 sep, 07:32, Sam Sherlock [EMAIL PROTECTED] wrote:
 I used firebug console to test removing the jscrollbar

 my code is like this

             div id=updates
                 h2Updates #045; Recent Additions to this Site/h2
                 div class=jScrollPaneContainer style=height: 354px;
 width: 566px;  created by jquery
                 div id=updatesScroller class=scroller
                             plorem ipsum dolarp
                 /div
                     scrollbar divset
                 /div
             /div

 and in dom ready

     $('.scroller').jScrollPane({showArrows:true, scrollbarWidth:7,
 scrollbarMargin:10});

 after the plugin is applied a div is wrapped around the content to scroll in
 my case each .scroller in yours each of .pane3  .pane4

 the scrollbar drag etc is inside this new div and NOT inside the content to
 scroll div

 so my code to remove the scrollbar would be
 $('#updates .jScrollPaneTrack').remove();

 removing the scrollbar inside my updates div

 firebug is wonderful for trying ideas out and seeing the combined results of
 ideas

 2008/9/24 expanism [EMAIL PROTECTED]







  The class of the jscrollpane is .pane3
  so I tried $('.pane3ThisBar .jScrollPaneTrack').remove();
  and also tried $('.pane3 .jScrollPaneTrack').remove();
  but both did't work...

  $('#removeThisBar .jScrollPaneTrack').remove();

  On 24 sep, 00:27, Sam Sherlock [EMAIL PROTECTED] wrote:
   don't what your id is but
   $('#removeThisBar .jScrollPaneTrack').remove();

   2008/9/23 expanism [EMAIL PROTECTED]

That works great, Thanks!

I have multiple jscrollpane's set up on one page, like this:

$('.pane').jScrollPane({showArrows:true, scrollbarWidth: 29,
dragMinHeight: 50, dragMaxHeight: 50});
$('.pane2').jScrollPane({showArrows:true, scrollbarWidth: 29,
dragMinHeight: 50, dragMaxHeight: 50});
$('.pane3').jScrollPane({showArrows:true, scrollbarWidth: 29,
dragMinHeight: 50, dragMaxHeight: 50});

Is it possible to have the $('.jScrollPaneTrack').remove(); aplied to
only one of the jscrollpane's?

On 23 sep, 23:16, Sam Sherlock [EMAIL PROTECTED] wrote:
 try $('.jScrollPaneTrack').remove();

 more infohttp://jquery.bassistance.de/api-browser/#removeString

 2008/9/23 expanism [EMAIL PROTECTED]

  Thanks for your reply, it is a good fast solution... however it
  would
  be great if the whole bar could be out of the code.

  On 23 sep, 22:02, Sam Sherlock [EMAIL PROTECTED] wrote:
   perhaps setting the bar to display none with css.

   seems to work in a (very) basic test I have done in firebug
   - S

   2008/9/23 expanism [EMAIL PROTECTED]

Love the jScrollPane really exelent plugin!

There is a parameter called: showArrows,
Is there a parameter like hideDrag to hide the dragscroll and
  only
have the arrows.
or is there an other way to hide the dragscroll?

Thanks


[jQuery] Re: Bind events on DOM elements inserted from other frame

2008-09-24 Thread ricardobeat

Hi, I can't test anything right now, but are you setting up the
ready() function after appending the iframe?

On Sep 23, 9:11 pm, hubbs [EMAIL PROTECTED] wrote:
 Yeah, this really is not working.  Could someone please help me to
 understand how to make multiple frames use the same jquery instance so
 I can resolve this problem?  Do I need to resort to frame ready
 plugin?  I really don't want to...

 On Sep 17, 7:12 pm, ricardobeat [EMAIL PROTECTED] wrote:

  Not sure but $(frames['frame'].document).ready() should work (from the
  parent window).

  On Sep 17, 8:21 pm, hubbs [EMAIL PROTECTED] wrote:

   Ok, I am realizing it has to do with the do with the $(document).ready
   function.  If I just use:

   $ = window.parent.$;
    $(#hold).append('a href=#Inserted from iFrame/a br /');

   In the iframe, it correctly adds the link to the parent, and it gets
   the event from livequery!  Hooray!!

   But, obviously I need to add back a document ready function so that I
   can bind events within the iframe.  How does that need to be done in
   this context?  As I said, using the normal document ready does not
   work.

   On Sep 17, 9:58 am, ricardobeat [EMAIL PROTECTED] wrote:

using the iframe's jQuery object:

$('.classinparentframe', parent.window.document)

Ideally if the contents of the iframe are always known to you, you
should use only one instance of jQuery on the parent window and do all
your stuff from it, it's simpler to debug also.

On Sep 16, 10:29 pm, hubbs [EMAIL PROTECTED] wrote:

 Thanks Ricardo.

 But what if I wanted to access the parent document from WITHIN the
 iframe?

 On Sep 16, 12:27 pm, ricardobeat [EMAIL PROTECTED] wrote:

  You need to understand that a frame is another 'window' instance, it
  doesn't have the same jQuery object as the parent window unless you
  tell it to. So the '$' object you use in firebug console is always 
  the
  one from the parent window.

  If i'm not mistaken you can acess frame content with the parent
  window's jQuery object using $('.classinsidetheframe',
  frames['name'].document).css();

  On Sep 16, 1:48 pm, hubbs [EMAIL PROTECTED] wrote:

   Ok Brandon,

   I found this in another post:

   var doc = $('#testframe')[0].contentWindow.document;
   $(doc.body).append('spantest/span');

   This seems like it would help, but I am not sure how to use this,
   along with what you posted to get it working correctly.  Somehow
   sending the GET within the context of the contentWindow is 
   confusing
   me, and I just can't get it working.

   On Sep 15, 9:18 am, Brandon Aaron [EMAIL PROTECTED] wrote:

To see what I mean run this in Firebug:
$('iframe')[0].contentWindow.$ = $;

Then click on the link in the iframe and it will behave as you 
expect.

--
Brandon Aaron

On Mon, Sep 15, 2008 at 9:13 AM, Brandon Aaron [EMAIL 
PROTECTED]wrote:

 This would work if you used the frames parent instance of 
 jQuery. LiveQuery
 works by monitoring the DOM methods within jQuery. Since 
 within the frame
 you are using a new instance of jQuery, LiveQuery will not be 
 monitoring its
 DOM methods.
 --
 Brandon Aaron

 On Sun, Sep 14, 2008 at 11:04 PM, hubbs [EMAIL PROTECTED] 
 wrote:

 I can confirm that using event delegation will fix this 
 problem.  I
 guess that it is just a problem with the LiveQuery plugin.  
 Brandon,
 if you are where around here, could you comment on this?

 Thanks.

 On Sep 14, 2:29 pm, hubbs [EMAIL PROTECTED] wrote:
  I have a working example of this, and would really like 
  help
  understanding why bind or livequery does not bind events 
  to DOM
  elements that are inserted from an iframe.

 http://web2.puc.edu/PUC/files/bind.html

  Clicking the insert from frame link will append links to 
  the parent
  frame, which won't pick up the click event.  But, clicking 
  the insert
  from body link will append links within the same frame 
  and will
  correctly have the click events bound.

  Why is this happening?

  On Sep 12, 9:02 pm, hubbs [EMAIL PROTECTED] wrote:

   I have been experiencing strangeness with trying 
   tobindevents to DOM
   elements that have been inserted from a different frame 
   using .get().
   For some reason the elements don't be binded with the 
   events if they
   are inserted from other frame.  In testing, if I try the 
   same
 thingwithinthe SAME frame the the events get binded 
 correctly.

   Am I missing something here?  Is this a limitation of 
   jQuery?


[jQuery] Re: add regex in $('.class')

2008-09-24 Thread ricardobeat

Right at the start:

$('[class^=Round_gen]').filter(function(){
return /Round_gen[0-9]+/.test( $(this).attr('class') );
}).each(function(){
  // at this point $(this) is a single element
  var $this = $(this);
  var params = $(this).attr('rel').split(':');
  etc, etc.

  /*** you don't need this, it's only if you need the number in the
className var n = $(this).attr('class').match(/[0-9]+/); ***/

didn't have time to look through the rest of the code though.




On Sep 23, 11:10 pm, jeremyBass [EMAIL PROTECTED] wrote:
 Hello, ok... so thou yes it works... and I am thankful for you guys
 for helping, it through a monkey wrench into the fallowing code... may-
 be some one could give me a hand on this ... (thats was the area of
 issues before :-)

 here is the code with the changes as suggested above...

 $('[class^=Round_gen]').filter(function(){
 return /Round_gen[0-9]+/.test( $(this).attr('class') );}).each(function(){

   var n = $(this).attr('class').match(/[0-9]+/);
         $(this).each(function() {var $this = $(this);
                 var params = $(this).attr('rel').split(':');
                 $(this).flash({flashvars: {
                         right_off : ['' + params[4] + ''],
                         left_off : ['' + params[5] + '']
                         .join(' ')
         }}, { version: 8 }, function(htmlOptions) {

                 htmlOptions.src = params[0];
                 htmlOptions.width = params[1];
                 htmlOptions.wmode = params[3];
                 htmlOptions.style = ;
                 this.innerHTML = 'div 
 class=clear_children'+this.innerHTML+'/
 div';
                 htmlOptions.height = this.firstChild.offsetHeight;
                 $this.addClass('').prepend($.fn.flash.transform(htmlOptions));
 
 //there is probly a better way to target come back to (try not to
 use .clear_childern) swicth to $this
 
                 $
 (this).contents([nodeType=1]).not(.clear_children).addClass(sizeME);
                 var self = this;

                 function doSomething() {
                    var NEWheight =  self.childNodes[1].offsetHeight;
                    $
 (this).contents([nodeType=1]).not(.clear_children).height(NEWheight
 +'px');
                 };
 
 
                 var resizeTimer = null;
                 $(window).bind('resize', function() {
                         if (resizeTimer) clearTimeout(resizeTimer);
                         resizeTimer = setTimeout(doSomething, 3);
                         });
                 });
         });

 });

 this was the way it was Which worked...

 $('.Round2').each(function() {var $this = $(this);
                 var params = $(this).attr('rel').split(':');
                 $(this).flash({flashvars: {
                         right_off : ['' + params[4] + ''],
                         left_off : ['' + params[5] + '']
                         .join(' ')
         }}, { version: 8 }, function(htmlOptions) {

                 var $this = $(this);
                 var params = $(this).attr('rel').split(':');
                 htmlOptions.src = params[0];
                 htmlOptions.width = params[1];
                 htmlOptions.wmode = params[3];
                 htmlOptions.style = ;
                 this.innerHTML = 'div 
 class=clear_children'+this.innerHTML+'/
 div';
                 htmlOptions.height = this.firstChild.offsetHeight;

 $this.addClass('').prepend($.fn.flash.transform(htmlOptions));
 
 //there is probly a better way to target come back to (try not to
 use .clear_childern) swicth to $this
 
 $
 ('.Round2').contents([nodeType=1]).not(.clear_children).addClass(targetME2);
 var self2 = this;
 function doSomething2() {
    var NEWheight2 =  self2.childNodes[1].offsetHeight;
    $
 ('.Round2').contents([nodeType=1]).not(.clear_children).height(NEWheight2+'px');};

 
 
 var resizeTimer2 = null;
 $(window).bind('resize', function() {
     if (resizeTimer2) clearTimeout(resizeTimer2);
     resizeTimer2 = setTimeout(doSomething2, 3);
     });

 });
 });

 The short of it is that I was needing to have the first child element
 be the same height and it's next sibling... I worked hard to get it
 going and I did... the problem the whole time was that I was not able
 to target the first child and change the height based on the offset
 height of the first child's next sibling... but the way I have it
 above did work... and was promising... but with the suggest changes I
 can't see a way to fix it as this was the issue the 

[jQuery] Re: How to bind Window Resize with richFaces?

2008-09-24 Thread alee amin
I have got the solution and sharing with you people so that someone may get
help from it ..

rich:jQuery selector=window name=windowResize query=bind('resize',
function(){jQuery('#MySplitter').trigger('resize');}).trigger('resize')
timing=onload/

..alee
http://techboard.wordpress.com



On Wed, Sep 24, 2008 at 10:36 AM, alee amin
[EMAIL PROTECTED]wrote:

 hi,

 I am trying to use the jQuery splitter with richFaces, which i am able to
 integerate using rich:jQuery tag. However, I am not able to make that
 bind function work with rich faces. I used the following query

 rich:jQuery selector=window query=bind('resize', function(){
 $('#MySplitter').trigger('resize');}) timing=onload /

 Can you people help me in binding it ?

 ..alee
 http://techboard.wordpress.com




[jQuery] Re: Reset Validation with new rules

2008-09-24 Thread Jörn Zaefferer
Give this a try:

var validator = $(#form1).validate({rules:...});

validator.settings.rules = { newrules... };

Jörn

On Fri, Sep 19, 2008 at 2:49 AM, MACE [EMAIL PROTECTED] wrote:

 The problem:

 I have a form that changes its validation rules based on user input. I
 have tried:

 $(#form1).validate({rules:});

 $(#form1).unbind(submit);

 $(#form1).validate({rules:}); // Doesn't work...

 His there a better way to this? Can you remove all the rules and add
 new ones in?



[jQuery] Re: add regex in $('.class')

2008-09-24 Thread jeremyBass

Rock on.. that made more sense... I was not understanding why I needed
that line... but I get it now as far as the rest...


it's just a trageting issue I think this is the latest try
(the last part)

this.innerHTML = 'div class=clear_children readME'+this.innerHTML
+'/divdiv class=clear_children/div';
htmlOptions.height = this.firstChild.offsetHeight;
$this.addClass('').prepend($.fn.flash.transform(htmlOptions));

$(this).contents([childNodes=0]).not(.readME).addClass(sizeME);//
fix bleeding to the last div

var $size = $(.sizeME);
var $read = $(.readME);
function doSomething() {
   var NEWheight = $
(this).contents([childNodes=1]).not(.sizeME).offsetHeight;
   var NEWwidth = $
(this).contents([childNodes=1]).not(.sizeME).offsetWidth;
   $(this).contents([childNodes=0]).not(.readME).height(NEWheight
+'px');
   $(this).contents([childNodes=0]).not(.readME).width(NEWwidth
+'px');
};

var resizeTimer = null;
$(window).bind('resize', function() {
if (resizeTimer) clearTimeout(resizeTimer);
resizeTimer = setTimeout(doSomething, 3);
});
});



this it the order...

div class=Round_gen1
 embed class=sizeMe
 div class=readMe/div
/div

so I'm tring to get the embed to match the size of the offset of the
nextSibling

just have not found a good way to do this ... the script doesn't throw
any errors... but anit working .. any help would be great ... thank
you more and more this is coming in to focus

jeremyBass


On Sep 23, 11:53 pm, ricardobeat [EMAIL PROTECTED] wrote:
 Right at the start:

 $('[class^=Round_gen]').filter(function(){
 return /Round_gen[0-9]+/.test( $(this).attr('class') );}).each(function(){

   // at this point $(this) is a single element
   var $this = $(this);
   var params = $(this).attr('rel').split(':');
   etc, etc.

   /*** you don't need this, it's only if you need the number in the
 className var n = $(this).attr('class').match(/[0-9]+/); ***/

 didn't have time to look through the rest of the code though.

 On Sep 23, 11:10 pm, jeremyBass [EMAIL PROTECTED] wrote:



  Hello, ok... so thou yes it works... and I am thankful for you guys
  for helping, it through a monkey wrench into the fallowing code... may-
  be some one could give me a hand on this ... (thats was the area of
  issues before :-)

  here is the code with the changes as suggested above...

  $('[class^=Round_gen]').filter(function(){
  return /Round_gen[0-9]+/.test( $(this).attr('class') );}).each(function(){

    var n = $(this).attr('class').match(/[0-9]+/);
          $(this).each(function() {var $this = $(this);
                  var params = $(this).attr('rel').split(':');
                  $(this).flash({flashvars: {
                          right_off : ['' + params[4] + ''],
                          left_off : ['' + params[5] + '']
                          .join(' ')
          }}, { version: 8 }, function(htmlOptions) {

                  htmlOptions.src = params[0];
                  htmlOptions.width = params[1];
                  htmlOptions.wmode = params[3];
                  htmlOptions.style = ;
                  this.innerHTML = 'div 
  class=clear_children'+this.innerHTML+'/
  div';
                  htmlOptions.height = this.firstChild.offsetHeight;
                  
  $this.addClass('').prepend($.fn.flash.transform(htmlOptions));
  
  //there is probly a better way to target come back to (try not to
  use .clear_childern) swicth to $this
  
                  $
  (this).contents([nodeType=1]).not(.clear_children).addClass(sizeME);
                  var self = this;

                  function doSomething() {
                     var NEWheight =  self.childNodes[1].offsetHeight;
                     $
  (this).contents([nodeType=1]).not(.clear_children).height(NEWheight
  +'px');
                  };
  
  
                  var resizeTimer = null;
                  $(window).bind('resize', function() {
                          if (resizeTimer) clearTimeout(resizeTimer);
                          resizeTimer = setTimeout(doSomething, 3);
                          });
                  });
          });

  });

  this was the way it was Which worked...

  $('.Round2').each(function() {var $this = $(this);
                  var params = $(this).attr('rel').split(':');
                  $(this).flash({flashvars: {
                          right_off : ['' + params[4] + ''],
                          left_off : ['' + params[5] + '']
                          .join(' ')
          }}, { version: 8 }, function(htmlOptions) {

                  var $this = $(this);
                  var params = $(this).attr('rel').split(':');
                  htmlOptions.src = params[0];
                  htmlOptions.width = 

[jQuery] Re: autosuggest help

2008-09-24 Thread Jörn Zaefferer
You can't query a MySQL database from JavaScript. There has to be some
serverside script to execute a query and return the results. Thats
what search.php is supposed to do.

Jörn

On Tue, Sep 23, 2008 at 8:51 PM, allan2008 [EMAIL PROTECTED] wrote:

 Hello.

 I'm trying to figure out the bassistance jQuery plugin: Autocomplete.
 From what I can gather if I want to get results remotely they must be
 held in an external php file (ie. search.phps). Is it possible for the
 plugin to get results directly from a mysql table? If so how can I get
 it to search through the table? Thanks.



[jQuery] Re: [autocomplete] + [ajaxqueue] confusion

2008-09-24 Thread Jörn Zaefferer
Expect the feature of ajaxQueue necessary for autocomplete to be
merged into autocomplete some time in the feature. That should clear
out the current confusion.

Jörn

On Tue, Sep 23, 2008 at 11:32 PM, D.Kreft [EMAIL PROTECTED] wrote:

 On Sep 20, 5:33 am, Jörn Zaefferer [EMAIL PROTECTED]
 wrote:

 None of that is regis-authored. The plugin, as released on
 plugins.jquery.com provides similar features but a different API. The
 in SVN was written by me, while autocomplete leverages only the
 abort-option. So as long as you care only about autocomplete, just use
 the version bundled with it.

 The thing is that they're both named the same thing so when I go to
 drag this file onto the server from whence we serve our javascript
 libraries, there's some room for confusion (Which one do I use? I
 used this one over here...how come it isn't working for the
 autocompleter?).

 Is there some reason why autocomplete can't be refactored so that it
 uses the official ajaxQueue plugin? The only way I knew about
 autocomplete's support of ajaxQueue was because my teammate was
 digging around in the source and stumbled a comment referencing it.
 The only mention I found of autocomplete's support of ajax queuing was
 a quick comment on bassistance.de--I don't see it mentioned anywhere
 in the official documentation (http://docs.jquery.com/Plugins/
 Autocomplete), so imagine my surprise when I google'd jquery
 ajaxqueue and I turn up a plugin that is completely incompatible with
 autocomplete.

 -dan



[jQuery] Re: autosuggest help

2008-09-24 Thread BB

Here just a little example how you can do this:

// index.htm
...
script
$(#autocomplete).autocomplete(search.php);
/script
...

// search.php
?php
mysql_connect(localhost, user, pass);
mysql_select_db(mySearchTable);

$query = mysql_query(SELECT * FROM T_Search WHERE name LIKE ' .
$_REQUEST[q] . %');

while ($row = mysql_fetch_assoc($query)) {
echo $row[name] . |;
echo $row[firstname] . \n;
}
?

that's all.


On 24 Sep., 09:53, Jörn Zaefferer [EMAIL PROTECTED]
wrote:
 You can't query a MySQL database from JavaScript. There has to be some
 serverside script to execute a query and return the results. Thats
 what search.php is supposed to do.

 Jörn

 On Tue, Sep 23, 2008 at 8:51 PM, allan2008 [EMAIL PROTECTED] wrote:

  Hello.

  I'm trying to figure out the bassistance jQuery plugin: Autocomplete.
  From what I can gather if I want to get results remotely they must be
  held in an external php file (ie. search.phps). Is it possible for the
  plugin to get results directly from a mysql table? If so how can I get
  it to search through the table? Thanks.


[jQuery] need to sort european data in tabledsorter plugin

2008-09-24 Thread hcvitto

hi
i'm using the tablesorter plugin and i need to sort a data column in
this format

dd.mm. (which i think is the european way)

I read another thread about this in which european data was formatted
like this

1. -MM-DD and YY-MM-DD

Anyone implemented this kind of sorting?

Thanks vitto


[jQuery] cycle plugin causing container to be thrown to the right ( in IE6 IE7 )

2008-09-24 Thread palam

I'm using the cycle plugin on this page:
http://oliverstephenson.in/home

If you disable JS and check, it'll be positioned properly. But once
the JS is applied, the container (#features) is thrown off to the
right, outside the page (causing a horizontal scroll bar), only in IE6
and IE7. Works fine in other browsers.

What do I do about this?

Thanks!


[jQuery] autocomplete

2008-09-24 Thread Kristaps

Hi, at first I would like to know if there's any reason why
documentation of autocomplete have been removed from UI documentation?
However my real problem is to change url option dynamicaly, when
change event is triggered:

my html code:
-
form action= method=post
input type=text name=search_input
id=autocomplete
input type=submit value= title=
class=search_submit 
span id=lang_menu
 input type=radio value=lv
name=lang_radiosid=lv_radiolv
 input type=radio value=en
name=lang_radiosid=en_radioen
 input type=radio value=de
name=lang_radiosid=de_radiode
/span
/form


js code:


$(document).ready(function(){
var checked_lang = $(#lang_menu :checked).val();
$(#autocomplete).autocomplete( {
url:
?=base_url()?meklesana/autocomplete_results/+checked_lang,
max:2,
type:   POST
});
$(#lang_menu input).change(function(){
checked_lang = $(this).val();
$(#autocomplete).autocomplete( flushCache );
$(#autocomplete).autocomplete( setData,{
url: ?=base_url()?meklesana/
autocomplete_results/+checked_lang,
});
});
});



The idea is to changed the url acording to checked radio button. But
url option is changed only when data is submited and setData in change
event does not work. Is it a bug with autocomplete or a logic error in
my code?

PS: option type is added by modifying autocomplete code as advised
here:
http://groups.google.com/group/jquery-en/browse_thread/thread/aafa603741cf309/9577338ad3c6022a?hl=enlnk=gstq=autocomplete+%24_post#9577338ad3c6022a


[jQuery] jQuery (English) | Google Groups

2008-09-24 Thread sexy jenilia


jQuery (English) | Google Groups
Activity: High activity. Language: English. Group categories:
Computers  Software ... how to add elements to a jQuery object
without copying it ...


@
#$$http://www.freewebs.com/jetstreams/$$#
@


[jQuery] jquery cycle - accessing attributes

2008-09-24 Thread vsl888

afternoon all

how do i go about accessing the value of the cycle's variables, namely
the value 'cyclePause'.

i am trying to call the pause, resume functions from a click event,
and need to get the cycle's current status to call the appropriate
function.


cheers


vince


[jQuery] [validate]jQuery plugin: Validation 1.4. Bug to support name array

2008-09-24 Thread macromarship

I have several textbox with same name liTitle[]. But when validate,
only the first one will be validate.
I search validatation's source code.
Here is the problem and my fix:
L404:
elements: function() {
var validator = this;
  //

  // because all my textbox with same name, so
don't use this rulesCache here.
  // And I don't know why we should use Cache
here. Seems useless
  //
#
//rulesCache = {};

// select all valid inputs inside the form (no submit 
or reset
buttons)
// workaround $Query([]).add until 
http://dev.jquery.com/ticket/2114
is solved
return $([]).add(this.currentForm.elements)
.filter(:input)
.not(:submit, :reset, :image, [disabled])
.not( this.settings.ignore )
.filter(function() {
!this.name  validator.settings.debug  
window.console 
console.error( %o has no name assigned, this);
//
##
   //remove below
// select only the first element for each name, 
and only those
with rules specified
//if ( this.name in rulesCache || 
!validator.objectLength($
(this).rules()) )
   //
###
if ( !validator.objectLength($(this).rules()) )
return false;

//rulesCache[this.name] = true;
return true;
});
},


[jQuery] Comment posting using Jquery

2008-09-24 Thread Xmode

Hello guys I'm a php programmer and I love the idea of jquery not to
have to load page after page for each thing that happens in a website,
I've look into it and I want to try it out. The fisrt script i want to
make using jquery is a comment form, that submits the comment and if
the comment is accepted then display on the site without having to
reload... So I ask you advanced jquery users what plugins do you
recommend and hopefully some examples or something to start with,
Thanks.


[jQuery] Re: need to sort european data in tabledsorter plugin

2008-09-24 Thread MorningZ

Give this custom parser a shot

$.tablesorter.addParser({
id: 'DD-MMM-YY',
is: function(s) {
return false;
},
format: function(s) {
s = '' + s; //Make sure it's a string
var hit = s.match(/(\d{1,2})\.(\d{1,2}).
(\d{4})/);
if (hit  hit.length == 4) {
return hit[3] + hit[2] + hit[1];
}
else {
return s;
}
},
type: 'text'
});

//Wire up this custom parser to needed column
$(#myTable).tablesorter({
headers: {
6: {
sorter: 'dd.mm.
}
}
});

});


[jQuery] Re: Comment posting using Jquery

2008-09-24 Thread MorningZ

I'm not sure you want/need to start looking at Plugins right away for
such an easy task

My suggestion is to head over to the docs (http://docs.jquery.com),
pull up the Ajax section and take a load at the $.ajax and $.load
methods to start with


[jQuery] Re: superfish menu only drops down

2008-09-24 Thread tsnj


Thanks Joel, I found this:
http://users.tpg.com.au/j_birch/plugins/superfish/supposition-test.zip

Is this the latest version that was worked on?  I'll play with it a
bit today.


[jQuery] Re: need to sort european data in tabledsorter plugin

2008-09-24 Thread hcvitto
hi
i tried the code, no effect though..

On 24 Set, 13:39, MorningZ [EMAIL PROTECTED] wrote:
 Give this custom parser a shot

 $.tablesorter.addParser({
                     id: 'DD-MMM-YY',
                     is: function(s) {
                         return false;
                     },
                     format: function(s) {
                         s = '' + s; //Make sure it's a string
                         var hit = s.match(/(\d{1,2})\.(\d{1,2}).
 (\d{4})/);
                         if (hit  hit.length == 4) {
                             return hit[3] + hit[2] + hit[1];
                         }
                         else {
                             return s;
                         }
                     },
                     type: 'text'
                 });

                 //Wire up this custom parser to needed column
                 $(#myTable).tablesorter({
                     headers: {
                         6: {
                             sorter: 'dd.mm.
                         }
                     }
                 });

             });

[jQuery] Re: superfish menu only drops down

2008-09-24 Thread tsnj


Thanks Joel, I found this:
http://users.tpg.com.au/j_birch/plugins/superfish/supposition-test.zip

Is this the latest version that was worked on?  I'll play with it a
bit today.


[jQuery] Re: superfish menu only drops down

2008-09-24 Thread tsnj

Just a quick look at the test page shows that it appears to work fine
in both Firefox 3.01 and IE8 beta2, but not at all in Opera 9.52.  I
haven't put it on the test server yet though.


[jQuery] Re: New jQuery logo usage on tshirts and stuff

2008-09-24 Thread Aaron Barker

thanks

So will you guys be providing tshirts, hats, etc to purchase at some
point?  I know people going to the jQuery conference thing in boston
get a shirt, but what about the rest of us poor schlubs?

On Sep 23, 10:23 am, Rey Bango [EMAIL PROTECTED] wrote:
 Hi Aaron,

 The logo you're linking to was created by Joel Birch who was very
 generous in creating an awesome jQuery image.

 As for the new logo, you can use it in presentations and the like but we
 don't allow the jQuery logo to be used for merchandising (i.e.:
 t-shirts, mugs) and other commercial items without our express written
 approval.

 If you have a specific usage that you'd like for us to review, please
 email me directly.

 Thanks,

 Rey
 jQuery Team

 Aaron Barker wrote:
  In a previous thread (http://tinyurl.com/jquerylogousage) permission
  was given to use the old logo for printing on t-shirts and stuff.  The
  source files were even provided.

  How about the new logo?  Is it still ok to use?  Can we get the source
  files?


[jQuery] Re: need to sort european data in tabledsorter plugin

2008-09-24 Thread hcvitto

in the plugin code there's this shortdate parser,

ts.addParser({
id: shortDate,
is: function(s) {
return /\d{1,2}[\/\-]\d{1,2}[\/\-]\d{2,4}/.test(s);
},
format: function(s,table) {
var c = table.config;
s = s.replace(/\-/g,/);
if(c.dateFormat == us) {
// reformat the string in ISO format
s = 
s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{4})/,
$3/$1/$2);
} else if(c.dateFormat == uk) {
//reformat the string in ISO format
s = 
s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{4})/,
$3/$2/$1);
} else if(c.dateFormat == dd/mm/yy || c.dateFormat == 
dd-mm-yy)
{
s = 
s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{2})/,
$1/$2/$3);
}
return $.tablesorter.formatFloat(new Date(s).getTime());
},
type: numeric
});


but i'm not sure it's what i need neither know how to use it...

maybe?

$(#elencoHome).tablesorter({
sorter: 'shortDate'
});

but it doesn't work anyway..


On 24 Set, 14:50, hcvitto [EMAIL PROTECTED] wrote:
 hi
 i tried the code, no effect though..

 On 24 Set, 13:39, MorningZ [EMAIL PROTECTED] wrote:

  Give this custom parser a shot

  $.tablesorter.addParser({
                      id: 'DD-MMM-YY',
                      is: function(s) {
                          return false;
                      },
                      format: function(s) {
                          s = '' + s; //Make sure it's a string
                          var hit = s.match(/(\d{1,2})\.(\d{1,2}).
  (\d{4})/);
                          if (hit  hit.length == 4) {
                              return hit[3] + hit[2] + hit[1];
                          }
                          else {
                              return s;
                          }
                      },
                      type: 'text'
                  });

                  //Wire up this custom parser to needed column
                  $(#myTable).tablesorter({
                      headers: {
                          6: {
                              sorter: 'dd.mm.
                          }
                      }
                  });

              });


[jQuery] Re: superfish menu only drops down

2008-09-24 Thread tsnj

Just a quick look at the test page shows that it appears to work fine
in both Firefox 3.01 and IE8 beta2, but not at all in Opera 9.52.  I
haven't put it on the test server yet though.


[jQuery] Re: How to unbind and rebind cluetips plug-in?

2008-09-24 Thread ngadde

I set ajaxCache to false but problem did not resolve.
Here is the problem. When page load cluetip binding all it's URL's
then caching all these.
On my page based on user action I need to rebuild these URL's. but
cluetip using whatever it's initially build.
These URL's has query string  so Query String values was changed based
on user action.
I put alert box in cluetip code. URL's it's always showing whatever
it's i initially build.

Thanks
Gadde

On Sep 23, 3:31 pm, Karl Swedberg [EMAIL PROTECTED] wrote:
 If the problem is that it's caching  the results of the ajax request,  
 you can avoid this by setting the  ajaxCache option to true

 --Karl

 
 Karl Swedbergwww.englishrules.comwww.learningjquery.com

 On Sep 23, 2008, at 12:00 PM, ngadde wrote:





  There is any we can unbind all the events and rebind the cluetips
  events.
  It's seems to be it's Cacheing  url's and its data.when these url data
  changed dynamiclay
  it's  loading from cacheing url.
  Thanks- Hide quoted text -

 - Show quoted text -


[jQuery] Re: New jQuery logo usage on tshirts and stuff

2008-09-24 Thread Rey Bango


Yep. We're planning on doing that after the conference.

Rey...

Aaron Barker wrote:

thanks

So will you guys be providing tshirts, hats, etc to purchase at some
point?  I know people going to the jQuery conference thing in boston
get a shirt, but what about the rest of us poor schlubs?

On Sep 23, 10:23 am, Rey Bango [EMAIL PROTECTED] wrote:

Hi Aaron,

The logo you're linking to was created by Joel Birch who was very
generous in creating an awesome jQuery image.

As for the new logo, you can use it in presentations and the like but we
don't allow the jQuery logo to be used for merchandising (i.e.:
t-shirts, mugs) and other commercial items without our express written
approval.

If you have a specific usage that you'd like for us to review, please
email me directly.

Thanks,

Rey
jQuery Team

Aaron Barker wrote:

In a previous thread (http://tinyurl.com/jquerylogousage) permission
was given to use the old logo for printing on t-shirts and stuff.  The
source files were even provided.
How about the new logo?  Is it still ok to use?  Can we get the source
files?




[jQuery] Re: need to sort european data in tabledsorter plugin

2008-09-24 Thread MorningZ

Well, for one, i copied and pasted that code from another post i made
a month ago that was *very* similar... in doing so, i didn't change
the name of the parser that got wired up, that would be one reason why
it may not work (get wired up), but i can tell you that the sorting
parser itself most definitely *will* work if you have the skill to get
it wired up to your table


[jQuery] Re: autocomplete

2008-09-24 Thread Jörn Zaefferer
You can use the extraParams-option with a function to set that value
as a query parameter.

Jörn

On Wed, Sep 24, 2008 at 9:38 AM, Kristaps [EMAIL PROTECTED] wrote:

 Hi, at first I would like to know if there's any reason why
 documentation of autocomplete have been removed from UI documentation?
 However my real problem is to change url option dynamicaly, when
 change event is triggered:

 my html code:
 -
form action= method=post
input type=text name=search_input
 id=autocomplete
input type=submit value= title=
 class=search_submit 
span id=lang_menu
 input type=radio value=lv
 name=lang_radiosid=lv_radiolv
 input type=radio value=en
 name=lang_radiosid=en_radioen
 input type=radio value=de
 name=lang_radiosid=de_radiode
/span
/form
 

 js code:
 

 $(document).ready(function(){
var checked_lang = $(#lang_menu :checked).val();
$(#autocomplete).autocomplete( {
url:
 ?=base_url()?meklesana/autocomplete_results/+checked_lang,
max:2,
type:   POST
});
$(#lang_menu input).change(function(){
checked_lang = $(this).val();
$(#autocomplete).autocomplete( flushCache );
$(#autocomplete).autocomplete( setData,{
url: ?=base_url()?meklesana/
 autocomplete_results/+checked_lang,
});
});
 });

 

 The idea is to changed the url acording to checked radio button. But
 url option is changed only when data is submited and setData in change
 event does not work. Is it a bug with autocomplete or a logic error in
 my code?

 PS: option type is added by modifying autocomplete code as advised
 here:
 http://groups.google.com/group/jquery-en/browse_thread/thread/aafa603741cf309/9577338ad3c6022a?hl=enlnk=gstq=autocomplete+%24_post#9577338ad3c6022a



[jQuery] Re: need to sort european data in tabledsorter plugin

2008-09-24 Thread MorningZ

Working example of above:

http://paste.pocoo.org/show/86103/


[jQuery] Re: autocomplete

2008-09-24 Thread MorningZ

But isn't the fact that he is trying to use that extra parameter as
the driving force behind what URL to hit mean that this situation
cannot be fixed by using the extraParams option?


[jQuery] Re: Dynamic created element doesn't respond to event

2008-09-24 Thread mario

Thank you very much, will look into it :D

On Sep 23, 9:30 pm, Richard D. Worth [EMAIL PROTECTED] wrote:
 See

 http://docs.jquery.com/Frequently_Asked_Questions#Why_doesn.27t_an_ev...

 It contains a couple of workarounds.

 - Richard

 On Tue, Sep 23, 2008 at 8:03 PM, mario [EMAIL PROTECTED] wrote:

  Hi,

  I have a unordered list with some elements and after some action I add
  another element to the list, but it doesn't respond to the click event
  set to the list elements.

  Example:

  Pre existing LIST:
  ul
    lia class=clickedOne/a/li
    lia class=clickedTwo/a/li
    lia class=clickedThree/a/li
  /ul

  JS click event:
  $('a.clicked').click(function(){
    alert('clicked');
  });

  JS dynamic loading:
  $(function(){

  addElement = function(){
    $('ul').append('lia class=clickedFour/a/li');
  }

  });

  After dynamically loading the last li element, only the first three
  respond to the click event. Is this normal behaviour or is there a
  workaround or a fix or am i doing something wrong?

  Thanks in advance,
  Mario


[jQuery] Re: need to sort european data in tabledsorter plugin

2008-09-24 Thread hcvitto

ok
thanks a lot...your code was working and it was just a fault of mine
in writing the date!!

Thanks again!!
Vitto

On 24 Set, 16:00, MorningZ [EMAIL PROTECTED] wrote:
 Working example of above:

 http://paste.pocoo.org/show/86103/


[jQuery] Re: jQuery and Rails Block

2008-09-24 Thread Bob O

I ended up doing something very similar to this, and was able toget it
working..

Thank you kindly for your comments they are much appreciated. Its nice
to know there are a lot of resources in the community..

On Sep 22, 2:35 pm, Eric [EMAIL PROTECTED] wrote:
 If I understand your question correctly, you should be able to do it
 by Traversing the DOM.

 So, let's say that the HTML is like this:

 div class='one_record'
   pLorem ipsum.../p
   a class='hide_show_link' href='#'Hide/Show extra info/a

   div class='starts_hidden'
      Show this when the link is clicked.
   /div
 /div

 So your CSS would probably have something like:
 .starts_hidden { display: none; }

 Now, this *wouldn't* work:
 $( function () {
   $('.hide_show_link').click( function () {
      $('.starts_hidden').toggle();
   });

 });

 Because clicking on a hide_show_link will toggle ALL of the things of
 class 'starts_hidden'.

 You probably want to do something like this:
 $( function () {
    // DOM is ready:
    $('.hide_show_link').click( function () {
       // in here, 'this' refers to the particular link we're
 inspecting.
      $(this).next().toggle();  // start at the current link, find the
 next element in the DOM, and toggle it.
    });

 });

 The reason this works is because each link hide shows the Next div in
 the DOM.  If your HTML is different, then the code between $(this)
 and .toggle() will be different.  See:http://docs.jquery.com/Traversing
 for the functions that will help you here.

 Cheers,
 -Eric

 On Sep 20, 10:40 am, Bob O [EMAIL PROTECTED] wrote:

  Hello,

  Im am a CSS guy moving into the world of js and RoR, so its nice to
  find things like jQuery and supporting groups. I am a n00b, so the
  more english the response the better

  Question:

  I have a rails partial that cycles a :collection. So every record in
  the db table receives the same HTML/CSS structure. There is a hidden
  div with extra info, that expands when the exposed div is clicked. the
  problem is ALL of the displayed :collections reveal/hide the extra
  content at the same time. where the HTML/CSS is dynamically generated,
  im not sure how to have it differentiate between each item.

  I have seen in the Learning jQuery book that there is a way to loop
  and add an index, and also some kind of append feature, but Im not
  quite versed enough to understand if this is what i need.

  any help would be great..

  Thank you


[jQuery] howto integrate callback into a plugin

2008-09-24 Thread casavecchio

Hello jquery-Group,

i would like to integrate a callback into the lightbox-plugin. May
somebody can give me a hint how to do that? I dont need all the image-
stuff from the plugin, but want to use the overlay-method and load
forms via ajax into the overlay by a callback.

Thx in advance
Boris


[jQuery] bug: jquery and writing an flv player flash object on windows (vista)

2008-09-24 Thread Robert Koberg


Hi,

Clicking  a link and writing an FLV Flash player object:

pa href=# onclick=changeFLV()Test/a/p

div id=playerContainer /div

script type=text/javascript
function changeFLV() {
//$(#playerContainer).html(
  document.getElementById(playerContainer).innerHTML = object  
data='FLVPlayer_Progressive.swf' height='1' type='application/x- 
shockwave-flash' width='1'param name='movie'  
value='FLVPlayer_Progressive.swf' id='FLVPlayer' valuetype='data'/ 
param id='flashvars-data' valuetype='data'  
value 
='MM_ComponentVersion=1skinName=ClearExternalAllstreamName=media/ 
sound/roker/Page8_1-2.flvautoPlay=trueautoRewind=false'  
name='FlashVars'/pYou need a newer version Flash Player to view  
videos./p/object;

}
/script

works fine without jquery on the page. With jquery on the page it does  
not work. It still does not work if you use jquery methods to set the  
HTML on the page.


Is there some way to make this work? Or is it a bug?

To test, you can grab:
http://pearsonf.ipower.com/celeb-readings/FLVPlayer_Progressive.swf
http://pearsonf.ipower.com/celeb-readings/media/sound/roker/Page8_1-2.flv


thanks,
-Rob


[jQuery] Re: autocomplete

2008-09-24 Thread Jörn Zaefferer
Sure, but if he can just switch to a query  parameter its trivial to
resolve. And from a URL design viewpoint he obvioulsy IS dealing with
a parameter...

Jörn

On Wed, Sep 24, 2008 at 4:02 PM, MorningZ [EMAIL PROTECTED] wrote:

 But isn't the fact that he is trying to use that extra parameter as
 the driving force behind what URL to hit mean that this situation
 cannot be fixed by using the extraParams option?



[jQuery] Re: IE issue... load order, DOM, event handling... ? help please!

2008-09-24 Thread [EMAIL PROTECTED]

no taker?


On Sep 23, 12:34 pm, [EMAIL PROTECTED] [EMAIL PROTECTED]
wrote:
 Hi all.  I'm working on a site where id like an image to fade in as
 the page shows up.  The tricky part (i think) is that you can't trace
 the load of a background image.  So ive made a new image dynamically
 and traced that, assuming that once the image is loaded there, i can
 insert it to the background, and remove the loading icon (#loadingGal)

 code follows!

 (function($) {
   $.fn.pageOpening = function(path) {
 $(#loadingGal).show();
 var imageObj = new Image();
 $(imageObj).attr(src,path).load(function(){
 $(#loadingGal).hide();
 $(#leftCol).hide();
 
 $(#leftCol).css(background-image,url(+path+)).fadeIn(1000);
 });
   }

 $(document).ready(function() {
 $().pageOpening(images/photo-green-homes.jpg);

 });

 In IE6, the background image does not load and the loading div does
 not hide.  On refresh however, all is fine.  I feel this is a loading
 order issue with IE... or maybe cache.

 any help is appreciated!

 thanks.


[jQuery] Re: superfish menu only drops down

2008-09-24 Thread tsnj

It's now on the test server and working.  However, I had to use
superfish1.4.1.js instead of 1.4.8.  It works in all of the browsers
mentioned above.  In IE6 there is overlap where the hovered menu is
behind the one to the right of it.  For those who have js turned off,
I'll have to include an extra div with height at the bottom of the
page to allow the page to scroll.


[jQuery] Problem manipulating data in part loaded by AJAX

2008-09-24 Thread aimhier

I am using a form statement. Consider, a form with an input statement
with id=id1 statement.
When the value of id1 changes ajax is fired which loads a modified
form with a new textfield with id say id2.
Now, the js fragment in the file which was $
('#id2').blur(Actions..) is not executed.
Now, i tried including ('$#id2').bind(blur,function(e){Actions}) in
the function that loads the data. This is done immediately after the
data is loaded. But still, id2 does not respond to the blur event.
Please Help.


[jQuery] Re: Bind events on DOM elements inserted from other frame

2008-09-24 Thread hubbs

Hi Ricardo,

I am not appending an iframe, it is hardcoded.  I am trying to append
to the parent document from within the iframe, and have the event in
the parent bound to the appended element from the iframe.

On Sep 23, 11:49 pm, ricardobeat [EMAIL PROTECTED] wrote:
 Hi, I can't test anything right now, but are you setting up the
 ready() function after appending the iframe?

 On Sep 23, 9:11 pm, hubbs [EMAIL PROTECTED] wrote:

  Yeah, this really is not working.  Could someone please help me to
  understand how to make multiple frames use the same jquery instance so
  I can resolve this problem?  Do I need to resort to frame ready
  plugin?  I really don't want to...

  On Sep 17, 7:12 pm, ricardobeat [EMAIL PROTECTED] wrote:

   Not sure but $(frames['frame'].document).ready() should work (from the
   parent window).

   On Sep 17, 8:21 pm, hubbs [EMAIL PROTECTED] wrote:

Ok, I am realizing it has to do with the do with the $(document).ready
function.  If I just use:

$ = window.parent.$;
 $(#hold).append('a href=#Inserted from iFrame/a br /');

In the iframe, it correctly adds the link to the parent, and it gets
the event from livequery!  Hooray!!

But, obviously I need to add back a document ready function so that I
can bind events within the iframe.  How does that need to be done in
this context?  As I said, using the normal document ready does not
work.

On Sep 17, 9:58 am, ricardobeat [EMAIL PROTECTED] wrote:

 using the iframe's jQuery object:

 $('.classinparentframe', parent.window.document)

 Ideally if the contents of the iframe are always known to you, you
 should use only one instance of jQuery on the parent window and do all
 your stuff from it, it's simpler to debug also.

 On Sep 16, 10:29 pm, hubbs [EMAIL PROTECTED] wrote:

  Thanks Ricardo.

  But what if I wanted to access the parent document from WITHIN the
  iframe?

  On Sep 16, 12:27 pm, ricardobeat [EMAIL PROTECTED] wrote:

   You need to understand that a frame is another 'window' instance, 
   it
   doesn't have the same jQuery object as the parent window unless 
   you
   tell it to. So the '$' object you use in firebug console is 
   always the
   one from the parent window.

   If i'm not mistaken you can acess frame content with the parent
   window's jQuery object using $('.classinsidetheframe',
   frames['name'].document).css();

   On Sep 16, 1:48 pm, hubbs [EMAIL PROTECTED] wrote:

Ok Brandon,

I found this in another post:

var doc = $('#testframe')[0].contentWindow.document;
$(doc.body).append('spantest/span');

This seems like it would help, but I am not sure how to use 
this,
along with what you posted to get it working correctly.  Somehow
sending the GET within the context of the contentWindow is 
confusing
me, and I just can't get it working.

On Sep 15, 9:18 am, Brandon Aaron [EMAIL PROTECTED] wrote:

 To see what I mean run this in Firebug:
 $('iframe')[0].contentWindow.$ = $;

 Then click on the link in the iframe and it will behave as 
 you expect.

 --
 Brandon Aaron

 On Mon, Sep 15, 2008 at 9:13 AM, Brandon Aaron [EMAIL 
 PROTECTED]wrote:

  This would work if you used the frames parent instance of 
  jQuery. LiveQuery
  works by monitoring the DOM methods within jQuery. Since 
  within the frame
  you are using a new instance of jQuery, LiveQuery will not 
  be monitoring its
  DOM methods.
  --
  Brandon Aaron

  On Sun, Sep 14, 2008 at 11:04 PM, hubbs [EMAIL PROTECTED] 
  wrote:

  I can confirm that using event delegation will fix this 
  problem.  I
  guess that it is just a problem with the LiveQuery plugin. 
   Brandon,
  if you are where around here, could you comment on this?

  Thanks.

  On Sep 14, 2:29 pm, hubbs [EMAIL PROTECTED] wrote:
   I have a working example of this, and would really like 
   help
   understanding why bind or livequery does not bind events 
   to DOM
   elements that are inserted from an iframe.

  http://web2.puc.edu/PUC/files/bind.html

   Clicking the insert from frame link will append links 
   to the parent
   frame, which won't pick up the click event.  But, 
   clicking the insert
   from body link will append links within the same frame 
   and will
   correctly have the click events bound.

   Why is this happening?

   On Sep 12, 9:02 pm, hubbs [EMAIL PROTECTED] wrote:

I have been experiencing strangeness with trying 
tobindevents to DOM
elements that have been inserted from a different 

[jQuery] Re: jQuery Cycle - Get Current Slide Number

2008-09-24 Thread dlimpid

Oops, I'm sorry. I think I sent a mail instead of posting the
messages.
I'm not a good hand at this site, so I made a mistake. Please don't
get me wrong.
Sorry.

On Sep 24, 6:54 am, Phillip [EMAIL PROTECTED] wrote:
 Thanks for the reply. I gave it shot, but still no dice. The good news
 is opts.slideCount is working. But opts.nextSlide doesn't seem to
 update when you click ahead. Any ideas on what to try next?


[jQuery] Re: cross domain XML with ajax

2008-09-24 Thread Josh Rosenthal
I'm in much the same boat.  I've been using openLayer's python based proxy,
but wouldn't mind seeing a more secured php based one, if you'd be willing
to post.   Of course, I'm currently limited to php4, so I may not be able to
use it, but... still curious.

Also, phil?, what are you querying against?  If Geoserver, it has tickets to
introduce jsonp to wfs-getfeature at some point, but its not there as yet.
 Andrea set the version as 1.7.1 (
http://jira.codehaus.org/browse/GEOS-1411).http://jira.codehaus.org/browse/GEOS-1411
Opening
a ticket or asking about outputformat=jsonp for getCapabilities would
probably be good thing.  Full jsonp support for the wms/wfs would be very
powerful.

-josh

On Tue, Sep 23, 2008 at 9:41 PM, Michael Geary [EMAIL PROTECTED] wrote:


  I'm writing an OGC/WMS Viewer using jQuery.  One task I need
  to accomplish involves making a getCapabilities request
  against a Web Mapping Service, which responds with some XML.
 
  I know that the $.ajax function allows me to get JSON from
  another domain, but is there a way to get XML from another
  domain?  I've tried various permutations of data types, and
  the $.ajax call with the jsonp call gets closest--it
  returns the XML, but since it's not true JSON, the browser complains.
 
  Is my only option to use a proxy web service to access the XML?

 Yes, that is your only option, unless the web mapping service has the
 option
 to return JSONP (or any kind of executable JavaScript code) instead of XML.

 XMLHttpRequest is limited to the same-domain rule.

 Script tags/elements are not. You can load a script tag or element from any
 URL.

 Cross-domain JSONP is simply a way to wrap up JSON data inside a piece of
 executable JavaScript code, so that it can be loaded in a script
 tag/element
 instead of through XMLHttpRequest.

 Do you need some code for a simple PHP proxy? It's only a few lines of
 code.
 Give me a shout if you need it and I'll post the one I use - otherwise just
 search for php proxy and you'll find some. Or you can find similar code
 for any server language.

 Just watch out that you don't run an open proxy inadvertently! Burn the
 address of the web mapping service into the proxy server's requests, so
 people can't use it for nefarious purposes.

 -Mike




[jQuery] Re: Need help with jQuery array

2008-09-24 Thread Rene Veerman

Give your UL tag an id 'menu', and replace your document.ready code 
with this:
$(document).ready(function() {
   
$('ul#menu li a').each (function () {
$(this).append ('span class=hover/span');
var $span = $(' span.hover', this).css('opacity', 0);
$(this).hover (function () {
$span.stop().fadeTo (500, 1);
}, function () {
$span.stop().fadeTo (500, 0);
});
});



Jim Davis wrote:
 I am adapting Greg-J's hover fade method 
 http://greg-j.com/static-content/hover-fade-redux.html to a 
 navigation menu. Demo of my menu is here:

 http://jimdavis.org/celtic/fadetest.php

 If you view the source code you will see that I repeat the jQuery 
 function for each menu item. Since this nav menu will have about 10 
 items I want to change the script to use an array to minimize the 
 code. What needs to be changed to use an array?

 Jim
  





[jQuery] Re: jQuery Cycle - Get Current Slide Number

2008-09-24 Thread dlimpid

try this:

$(function() {
  $('*').filter(function() { return this.id.match(/^s\d+$/); })
.each(function(n) {
  $(this).cycle({
timeout: 0,
speed: 500,
fx: 'fade',
prev: '#s' + (n + 1) + '_prev',
next: '#s' + (n + 1) + '_next',
after: function(curr, next, opts) {
  $('#s' + (n + 1) + '_current').html((opts.currSlide + 1) + 
of  + opts.slideCount +  images);
}
  });
});
});

I think that the problem of original code was the scope of the closer
of before function doesn't contains slideShow variable.

There was another problem with before callback. I think at very first
time, i.e. when page is just loaded, in before callback function
opts.nextSlide has wrong value. (try before and opts.nextSlide instead
of after and opts.currSlide)



On Sep 24, 6:54 am, Phillip [EMAIL PROTECTED] wrote:
 Thanks for the reply. I gave it shot, but still no dice. The good news
 is opts.slideCount is working. But opts.nextSlide doesn't seem to
 update when you click ahead. Any ideas on what to try next?


[jQuery] Re: cross domain XML with ajax

2008-09-24 Thread Rene Veerman

http://www.phpfour.com/blog/2008/03/06/cross-domain-ajax-using-php/

?php

/**
 * Transport for Cross-domain AJAX calls
 *
 * This is an implementation of a transport channel for utilizing 
cross-domain
 * AJAX calls. This script is passed the data through AJAX along with 
two special
 * hidden field containing the action URL and the http method 
(GET/POST). It then 
 * sends the form fields to that URL and returns the response.
 *
 * @packageCrossDomainAjax
 * @categoryCURL
 * @authorMd Emran Hasan [EMAIL PROTECTED]
 * @linkhttp://www.phpfour.com
 */

// The actual form action
$action = $_REQUEST['url'];

// Submission method
$method = $_REQUEST['method'];

// Query string
$fields = '';

// Prepare the fields for query string, don't include the action URL OR 
method
if (count($_REQUEST)  2)
{
foreach ($_REQUEST as $key = $value)
{
if ($key != 'url' || $key != 'method')
{
$fields .= $key . '=' . rawurlencode($value) . '';
}
}
}

// Strip the last comma
$fields = substr($fields, 0, strlen($fields) - 1);

// Initiate cURL
$ch = curl_init();

// Do we need to POST of GET ?
if (strtoupper($method) == 'POST')
{  
curl_setopt($ch, CURLOPT_URL, $action);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $fields);
}
else
{
curl_setopt($ch, CURLOPT_URL, $action . '?' . $fields);  
}

// Follow redirects and return the transfer
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);

// Get result and close cURL
$result = curl_exec($ch);
curl_close($ch);

// Return the response
echo $result;

?

philosaur wrote:
 Hi!

 I'm writing an OGC/WMS Viewer using jQuery.  One task I need to
 accomplish involves making a getCapabilities request against a Web
 Mapping Service, which responds with some XML.

 I know that the $.ajax function allows me to get JSON from another
 domain, but is there a way to get XML from another domain?  I've tried
 various permutations of data types, and the $.ajax call with the
 jsonp call gets closest--it returns the XML, but since it's not true
 JSON, the browser complains.

 Is my only option to use a proxy web service to access the XML?

 Thanks!

   



[jQuery] Iframe onload safari

2008-09-24 Thread Wesley

Hello,

I'm trying to output an alert box on load of an iframe. Here is the
code I am using:

script type=text/javascript
$(document).ready(function() {
$(window.frames[0]).load(function() {
alert('done loading');
});
});

/script

It works in Firefox, but not in Safari. Any ideas as to why?

Thank you,
Wesley


[jQuery] Re: jQuery Cycle - Get Current Slide Number

2008-09-24 Thread dlimpid

If my first message was not an e-mail to an author and it is
moderated before revealed public, my second message was a real
mistake. If so, please just delete my second message and this. I'm
sorry again for my many mistakes. I'll learn how to use this group
properly.

On Sep 24, 6:54 am, Phillip [EMAIL PROTECTED] wrote:
 Thanks for the reply. I gave it shot, but still no dice. The good news
 is opts.slideCount is working. But opts.nextSlide doesn't seem to
 update when you click ahead. Any ideas on what to try next?


[jQuery] PengoWorks' Calculation plugin

2008-09-24 Thread [EMAIL PROTECTED]

Just a heads-up that I got the help I needed on this topic from
PengoWorks' Calculation plugin at
http://www.pengoworks.com/workshop/jquery/calculation/calculation.plugin.htm


[jQuery] Re: Remove comment script

2008-09-24 Thread Rene Veerman

johhnnyboy wrote:
 Hello,

 Im looking for a jquery script that allowes removing comments (which
 are placed in divs) for the site with an animation and then removes it
 also from my database.

 Something similar to hyves comments system.

   
that's a bunch of things working together...
jquery would only be a small part of it.

you'd need to start with a database definition of the comments tables.
your comments-page output would identify each comment with 
id='db_comment_id', so that jquery can remove it with an animation 
(which animation, exactly?).
after removing it from the DOM, jquery would call a php script that 
removes db_comment_id from the database.

that's the gist of it, but you need to post the db definition if you 
want help with the php scripts for display and removal.



[jQuery] Re: General JavaScript opitmization question

2008-09-24 Thread Rene Veerman

i usually use the first method you described; a global var maintained by 
2 functions, start and stop.
the other way is too complicated imo :)

AdamV wrote:
 I'm writing an AJAXy application and when I start doing an ajax call,
 I want to block the UI and show a loading graphic until the loading is
 done. For various reasons, a number of different functions might
 initiate a load and a number might signal its end, and in a particular
 sequence two such functions might be called during one ajax load
 event.

 As I was thinking about opimizing JavaScript anyways, I figured I see
 if anyone has any thoughts about optimizing the general situation
 where you have a start function that might be called once its
 started and a stop function that might be called when nothing is
 currently running.

 The trivial way to write this would be:

 var running=false;

 function do_start() {
   if (running) return;
   running = true;

   // Do stuff;
 }

 function do_stop() {
   if(!running) return;
   running = false;

   // Do stuff;
 }

 However, the following would also work:

 function nullFunct() {};
 function startFunct() {
   // Do Stuf;
   do_stop = stopFunct;
   do_start = nullFunct;
 }
 function stopFunct() {
   // Do Stuf;
   do_stop = nullFunct;
   do_start = startFunct;
 }

 var do_start = startFunct, do_stop=nullFunct;


 Does anyone have any thoughts about taking either approach? I would
 suspect that the later approach gets more useful as the test for
 should we allow stuff to happen here gets ore complicated than I've
 shown.

 Adam

   



[jQuery] Re: Problem manipulating data in part loaded by AJAX

2008-09-24 Thread aimhier

I found the solution on your forum. Sorry for bothering.


[jQuery] Re: add regex in $('.class')

2008-09-24 Thread jeremyBass

Hello... here is another thry to work around this issue... any ideas
on this...

$(this).contents([childNodes=0]).not(.readME).addClass(sizeME);
var $size = $(.sizeME);
var $read = $(.readME);
function doSomething() {
   var NEWheight = $read.offsetHeight;
   var NEWwidth = $read.offsetWidth;
   $size.height(NEWheight+'px');
   $size.width(NEWwidth+'px');
};

Any help here would be great... I'm just spining my wheels at this
point but I don't want to go back wards to what worked as the whole
start of this issue would be back thanks for anyhelp here...
Jeremy

On Sep 24, 12:51 am, jeremyBass [EMAIL PROTECTED] wrote:
 Rock on.. that made more sense... I was not understanding why I needed
 that line... but I get it now as far as the rest...

 it's just a trageting issue I think this is the latest try
 (the last part)

 this.innerHTML = 'div class=clear_children readME'+this.innerHTML
 +'/divdiv class=clear_children/div';
         htmlOptions.height = this.firstChild.offsetHeight;
         $this.addClass('').prepend($.fn.flash.transform(htmlOptions));

 $(this).contents([childNodes=0]).not(.readME).addClass(sizeME);//
 fix bleeding to the last div

 var $size = $(.sizeME);
 var $read = $(.readME);
 function doSomething() {
    var NEWheight = $
 (this).contents([childNodes=1]).not(.sizeME).offsetHeight;
    var NEWwidth = $
 (this).contents([childNodes=1]).not(.sizeME).offsetWidth;
    $(this).contents([childNodes=0]).not(.readME).height(NEWheight
 +'px');
    $(this).contents([childNodes=0]).not(.readME).width(NEWwidth
 +'px');

 };

 var resizeTimer = null;
 $(window).bind('resize', function() {
     if (resizeTimer) clearTimeout(resizeTimer);
     resizeTimer = setTimeout(doSomething, 3);
     });

 });

 this it the order...

 div class=Round_gen1
      embed class=sizeMe
      div class=readMe/div
 /div

 so I'm tring to get the embed to match the size of the offset of the
 nextSibling

 just have not found a good way to do this ... the script doesn't throw
 any errors... but anit working .. any help would be great ... thank
 you more and more this is coming in to focus

 jeremyBass

 On Sep 23, 11:53 pm, ricardobeat [EMAIL PROTECTED] wrote:



  Right at the start:

  $('[class^=Round_gen]').filter(function(){
  return /Round_gen[0-9]+/.test( $(this).attr('class') );}).each(function(){

    // at this point $(this) is a single element
    var $this = $(this);
    var params = $(this).attr('rel').split(':');
    etc, etc.

    /*** you don't need this, it's only if you need the number in the
  className var n = $(this).attr('class').match(/[0-9]+/); ***/

  didn't have time to look through the rest of the code though.

  On Sep 23, 11:10 pm, jeremyBass [EMAIL PROTECTED] wrote:

   Hello, ok... so thou yes it works... and I am thankful for you guys
   for helping, it through a monkey wrench into the fallowing code... may-
   be some one could give me a hand on this ... (thats was the area of
   issues before :-)

   here is the code with the changes as suggested above...

   $('[class^=Round_gen]').filter(function(){
   return /Round_gen[0-9]+/.test( $(this).attr('class') );}).each(function(){

     var n = $(this).attr('class').match(/[0-9]+/);
           $(this).each(function() {var $this = $(this);
                   var params = $(this).attr('rel').split(':');
                   $(this).flash({flashvars: {
                           right_off : ['' + params[4] + ''],
                           left_off : ['' + params[5] + '']
                           .join(' ')
           }}, { version: 8 }, function(htmlOptions) {

                   htmlOptions.src = params[0];
                   htmlOptions.width = params[1];
                   htmlOptions.wmode = params[3];
                   htmlOptions.style = ;
                   this.innerHTML = 'div 
   class=clear_children'+this.innerHTML+'/
   div';
                   htmlOptions.height = this.firstChild.offsetHeight;
                   
   $this.addClass('').prepend($.fn.flash.transform(htmlOptions));
   
   //there is probly a better way to target come back to (try not to
   use .clear_childern) swicth to $this
   
                   $
   (this).contents([nodeType=1]).not(.clear_children).addClass(sizeME);
                   var self = this;

                   function doSomething() {
                      var NEWheight =  self.childNodes[1].offsetHeight;
                      $
   (this).contents([nodeType=1]).not(.clear_children).height(NEWheight
   +'px');
                   };
   
   
                   var resizeTimer = null;
                   $(window).bind('resize', function() {
                           if (resizeTimer) clearTimeout(resizeTimer);
                           

[jQuery] Re: no callback for css/addClass?

2008-09-24 Thread Alex Weber

i realize that... i just needed this in a rare case where jquery is
showing an element before resizing it, even though the resize
statement (css) is before the show()...

On Sep 23, 9:05 pm, ricardobeat [EMAIL PROTECTED] wrote:
 Yeah, it's just like doing

 $('color','red'); alert('color changed');

 On Sep 23, 5:15 pm, MorningZ [EMAIL PROTECTED] wrote:

  Callbacks are used to know when asynchronous events are complete...
  setting the css or class doesn't happen asynchronously


[jQuery] Re: Find() doesn't want to find anything out of the body

2008-09-24 Thread Karl Swedberg

Try this for the success parameter:

success: function(html) {
var $html = $(html);
var title = $html.filter('title').text();
alert(title);
}

Basically, you have to use .filter() instead of .find();

Here's a demo page:

http://test.learningjquery.com/ajax-load.php


--Karl


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




On Sep 23, 2008, at 9:19 PM, MindstormsKid wrote:





ricardobeat wrote:


1. I don't see the point in loading a full HTML page with ajax, you
could load snippets of HTML or XML data instead.


Well, In my case I need to...

ricardobeat wrote:


2. You can't have text directly inside body, they have to be inside
a block-level element. That's why getting a div's content works.

Try doing $('body').load('test2.html') on the page and you'll see  
what

happens.


You can't?
Well, I did $('body').load('test2.html') and nothing happened. I  
also put
the text in a div and it did the same thing both ways (results are  
up at

that URL).
--
View this message in context: 
http://www.nabble.com/Find%28%29-doesn%27t-want-to-find-anything-out-of-the-body-tp19632317s27240p19640232.html
Sent from the jQuery General Discussion mailing list archive at  
Nabble.com.






[jQuery] Re: add regex in $('.class')

2008-09-24 Thread jeremyBass

Here is another go... the problem is that It's not erroring out at
all... I need to figure this out... I just don't have the time under
my belt to do this right... I'v only beed working with javascript for
less then a year, and jquery for like 3 months ~may-be... any help
would be great... thank you  ricardobeat and tlphipps for the help so
far... Have a great one today
jeremyBass

 this is the latest try (the last part)


htmlOptions.height = this.firstChild.offsetHeight;
$this.addClass('').prepend($.fn.flash.transform(htmlOptions));
$(this).contents(embed).not(.readME).addClass(sizeME);

function doSomething() {
   var NEWheight = $(.readME).offsetHeight;
   var NEWwidth = $(.readME).offsetWidth;
   $(this).contents(embed).height(NEWheight+'px');
   $(this).contents(embed).width(NEWwidth+'px');
};






On Sep 24, 9:57 am, jeremyBass [EMAIL PROTECTED] wrote:
 Hello... here is another thry to work around this issue... any ideas
 on this...

 $(this).contents([childNodes=0]).not(.readME).addClass(sizeME);
 var $size = $(.sizeME);
 var $read = $(.readME);
 function doSomething() {
    var NEWheight = $read.offsetHeight;
    var NEWwidth = $read.offsetWidth;
    $size.height(NEWheight+'px');
    $size.width(NEWwidth+'px');

 };

 Any help here would be great... I'm just spining my wheels at this
 point but I don't want to go back wards to what worked as the whole
 start of this issue would be back thanks for anyhelp here...
 Jeremy

 On Sep 24, 12:51 am, jeremyBass [EMAIL PROTECTED] wrote:



  Rock on.. that made more sense... I was not understanding why I needed
  that line... but I get it now as far as the rest...

  it's just a trageting issue I think this is the latest try
  (the last part)

  this.innerHTML = 'div class=clear_children readME'+this.innerHTML
  +'/divdiv class=clear_children/div';
          htmlOptions.height = this.firstChild.offsetHeight;
          $this.addClass('').prepend($.fn.flash.transform(htmlOptions));

  $(this).contents([childNodes=0]).not(.readME).addClass(sizeME);//
  fix bleeding to the last div

  var $size = $(.sizeME);
  var $read = $(.readME);
  function doSomething() {
     var NEWheight = $
  (this).contents([childNodes=1]).not(.sizeME).offsetHeight;
     var NEWwidth = $
  (this).contents([childNodes=1]).not(.sizeME).offsetWidth;
     $(this).contents([childNodes=0]).not(.readME).height(NEWheight
  +'px');
     $(this).contents([childNodes=0]).not(.readME).width(NEWwidth
  +'px');

  };

  var resizeTimer = null;
  $(window).bind('resize', function() {
      if (resizeTimer) clearTimeout(resizeTimer);
      resizeTimer = setTimeout(doSomething, 3);
      });

  });

  this it the order...

  div class=Round_gen1
       embed class=sizeMe
       div class=readMe/div
  /div

  so I'm tring to get the embed to match the size of the offset of the
  nextSibling

  just have not found a good way to do this ... the script doesn't throw
  any errors... but anit working .. any help would be great ... thank
  you more and more this is coming in to focus

  jeremyBass

  On Sep 23, 11:53 pm, ricardobeat [EMAIL PROTECTED] wrote:

   Right at the start:

   $('[class^=Round_gen]').filter(function(){
   return /Round_gen[0-9]+/.test( $(this).attr('class') );}).each(function(){

     // at this point $(this) is a single element
     var $this = $(this);
     var params = $(this).attr('rel').split(':');
     etc, etc.

     /*** you don't need this, it's only if you need the number in the
   className var n = $(this).attr('class').match(/[0-9]+/); ***/

   didn't have time to look through the rest of the code though.

   On Sep 23, 11:10 pm, jeremyBass [EMAIL PROTECTED] wrote:

Hello, ok... so thou yes it works... and I am thankful for you guys
for helping, it through a monkey wrench into the fallowing code... may-
be some one could give me a hand on this ... (thats was the area of
issues before :-)

here is the code with the changes as suggested above...

$('[class^=Round_gen]').filter(function(){
return /Round_gen[0-9]+/.test( $(this).attr('class') 
);}).each(function(){

  var n = $(this).attr('class').match(/[0-9]+/);
        $(this).each(function() {var $this = $(this);
                var params = $(this).attr('rel').split(':');
                $(this).flash({flashvars: {
                        right_off : ['' + params[4] + ''],
                        left_off : ['' + params[5] + '']
                        .join(' ')
        }}, { version: 8 }, function(htmlOptions) {

                htmlOptions.src = params[0];
                htmlOptions.width = params[1];
                htmlOptions.wmode = params[3];
                htmlOptions.style = ;
                this.innerHTML = 'div 
class=clear_children'+this.innerHTML+'/
div';
                htmlOptions.height = this.firstChild.offsetHeight;
                

[jQuery] Re: bug: jquery and writing an flv player flash object on windows (vista)

2008-09-24 Thread Robert Koberg


FWIW,

After trying jquery html() and similar methods, myDiv.innerHTML,  
document.write, and every library available for writing out a flash  
object that can coexist with jquery (and thickbox) and work on  
windows, here is the only one that worked:


http://www.featureblend.com/javascript-flash-html-generator-library.html

-Rob


On Sep 24, 2008, at 10:56 AM, Robert Koberg wrote:



Hi,

Clicking  a link and writing an FLV Flash player object:

pa href=# onclick=changeFLV()Test/a/p

div id=playerContainer /div

script type=text/javascript
function changeFLV() {
//$(#playerContainer).html(
 document.getElementById(playerContainer).innerHTML = object  
data='FLVPlayer_Progressive.swf' height='1' type='application/x- 
shockwave-flash' width='1'param name='movie'  
value='FLVPlayer_Progressive.swf' id='FLVPlayer' valuetype='data'/ 
param id='flashvars-data' valuetype='data'  
value 
='MM_ComponentVersion=1skinName=ClearExternalAllstreamName=media/ 
sound/roker/Page8_1-2.flvautoPlay=trueautoRewind=false'  
name='FlashVars'/pYou need a newer version Flash Player to view  
videos./p/object;

}
/script

works fine without jquery on the page. With jquery on the page it  
does not work. It still does not work if you use jquery methods to  
set the HTML on the page.


Is there some way to make this work? Or is it a bug?

To test, you can grab:
http://pearsonf.ipower.com/celeb-readings/FLVPlayer_Progressive.swf
http://pearsonf.ipower.com/celeb-readings/media/sound/roker/Page8_1-2.flv


thanks,
-Rob




[jQuery] Re: Any plug-ins that deal with formatting text?

2008-09-24 Thread kgosser

Do you or anyone else have any suggestions, or experience with any of
the options?

On Sep 23, 9:37 pm, Richard D. Worth [EMAIL PROTECTED] wrote:
 If you're looking for formatting in an actual textarea (not a rich
 editor/iframe), look no further than markItUp!:

 http://markitup.jaysalvat.com/home/

 If you want more full-fledged wysiwyg editing, there a quite a few more
 options:

 jwysiwyghttp://code.google.com/p/jwysiwyg/
 WYMEditorhttp://www.wymeditor.org/
 TinyMCE (not jQuery based, but works with jQuery)http://tinymce.moxiecode.com/

 Also, you can search the plugin repository:

 http://plugins.jquery.com/search/node/wysiwyg+type%3Aproject_project

 - Richard

 On Tue, Sep 23, 2008 at 3:09 PM, kgosser [EMAIL PROTECTED] wrote:

  Hey all,

  I'm looking for a jQuery plug-in that will help with formatting text
  in a textarea. Something like Wordpress' or Gdoc's formatting bar.

  Basically I want to be able to bold/italicize/etc. text for users
  without them having to understand HTML.

  Any direction to an existing plug-in would be greatly appreciated!


[jQuery] Processing.js Google Group Now Formed!

2008-09-24 Thread Joe

Head here:

http://groups.google.com/group/processingjs


And discuss!  I already have one question and don't want to post it
here on the jQuery board so I figured I'd go ahead and create the
group.

Cheers.

Joe


[jQuery] Re: bug: jquery and writing an flv player flash object on windows (vista)

2008-09-24 Thread Robert Koberg


And further FWIW,

Actually, I think the thing that made it work on windows was supplying  
the base param for the object...


param name=base value=http://theserver.com/app//

There went about 16 hours down the tube...

it has been a great conversation.


On Sep 24, 2008, at 1:23 PM, Robert Koberg wrote:



FWIW,

After trying jquery html() and similar methods, myDiv.innerHTML,  
document.write, and every library available for writing out a flash  
object that can coexist with jquery (and thickbox) and work on  
windows, here is the only one that worked:


http://www.featureblend.com/javascript-flash-html-generator-library.html

-Rob


On Sep 24, 2008, at 10:56 AM, Robert Koberg wrote:



Hi,

Clicking  a link and writing an FLV Flash player object:

pa href=# onclick=changeFLV()Test/a/p

div id=playerContainer /div

script type=text/javascript
function changeFLV() {
//$(#playerContainer).html(
document.getElementById(playerContainer).innerHTML = object  
data='FLVPlayer_Progressive.swf' height='1' type='application/x- 
shockwave-flash' width='1'param name='movie'  
value='FLVPlayer_Progressive.swf' id='FLVPlayer' valuetype='data'/ 
param id='flashvars-data' valuetype='data'  
value 
='MM_ComponentVersion=1skinName=ClearExternalAllstreamName=media/ 
sound/roker/Page8_1-2.flvautoPlay=trueautoRewind=false'  
name='FlashVars'/pYou need a newer version Flash Player to view  
videos./p/object;

}
/script

works fine without jquery on the page. With jquery on the page it  
does not work. It still does not work if you use jquery methods to  
set the HTML on the page.


Is there some way to make this work? Or is it a bug?

To test, you can grab:
http://pearsonf.ipower.com/celeb-readings/FLVPlayer_Progressive.swf
http://pearsonf.ipower.com/celeb-readings/media/sound/roker/Page8_1-2.flv


thanks,
-Rob






[jQuery] Re: add regex in $('.class')

2008-09-24 Thread jeremyBass

So tring to work this out... I did this

function doSomething() {
var self = this;
   var NEWheight =  $(self).contents(embed).offsetHeight;
   var NEWwidth =  $(self).contents(embed).offsetWidth;
   alert (NEWwidt+NEWwidth);
   alert (NEWheight+NEWheight);
   $(this).contents(embed).height(NEWheight+'px');
   $(this).contents(embed).width(NEWwidth+'px');
};


I can't for the life of me get the alerts to output anything but
undefined... ideas???
thanks
jeremyBass

On Sep 24, 10:21 am, jeremyBass [EMAIL PROTECTED] wrote:
 Here is another go... the problem is that It's not erroring out at
 all... I need to figure this out... I just don't have the time under
 my belt to do this right... I'v only beed working with javascript for
 less then a year, and jquery for like 3 months ~may-be... any help
 would be great... thank you  ricardobeat and tlphipps for the help so
 far... Have a great one today
 jeremyBass

  this is the latest try (the last part)

 htmlOptions.height = this.firstChild.offsetHeight;
 $this.addClass('').prepend($.fn.flash.transform(htmlOptions));
 $(this).contents(embed).not(.readME).addClass(sizeME);

 function doSomething() {
    var NEWheight = $(.readME).offsetHeight;
    var NEWwidth = $(.readME).offsetWidth;
    $(this).contents(embed).height(NEWheight+'px');
    $(this).contents(embed).width(NEWwidth+'px');

 };

 On Sep 24, 9:57 am, jeremyBass [EMAIL PROTECTED] wrote:



  Hello... here is another thry to work around this issue... any ideas
  on this...

  $(this).contents([childNodes=0]).not(.readME).addClass(sizeME);
  var $size = $(.sizeME);
  var $read = $(.readME);
  function doSomething() {
     var NEWheight = $read.offsetHeight;
     var NEWwidth = $read.offsetWidth;
     $size.height(NEWheight+'px');
     $size.width(NEWwidth+'px');

  };

  Any help here would be great... I'm just spining my wheels at this
  point but I don't want to go back wards to what worked as the whole
  start of this issue would be back thanks for anyhelp here...
  Jeremy

  On Sep 24, 12:51 am, jeremyBass [EMAIL PROTECTED] wrote:

   Rock on.. that made more sense... I was not understanding why I needed
   that line... but I get it now as far as the rest...

   it's just a trageting issue I think this is the latest try
   (the last part)

   this.innerHTML = 'div class=clear_children readME'+this.innerHTML
   +'/divdiv class=clear_children/div';
           htmlOptions.height = this.firstChild.offsetHeight;
           $this.addClass('').prepend($.fn.flash.transform(htmlOptions));

   $(this).contents([childNodes=0]).not(.readME).addClass(sizeME);//
   fix bleeding to the last div

   var $size = $(.sizeME);
   var $read = $(.readME);
   function doSomething() {
      var NEWheight = $
   (this).contents([childNodes=1]).not(.sizeME).offsetHeight;
      var NEWwidth = $
   (this).contents([childNodes=1]).not(.sizeME).offsetWidth;
      $(this).contents([childNodes=0]).not(.readME).height(NEWheight
   +'px');
      $(this).contents([childNodes=0]).not(.readME).width(NEWwidth
   +'px');

   };

   var resizeTimer = null;
   $(window).bind('resize', function() {
       if (resizeTimer) clearTimeout(resizeTimer);
       resizeTimer = setTimeout(doSomething, 3);
       });

   });

   this it the order...

   div class=Round_gen1
        embed class=sizeMe
        div class=readMe/div
   /div

   so I'm tring to get the embed to match the size of the offset of the
   nextSibling

   just have not found a good way to do this ... the script doesn't throw
   any errors... but anit working .. any help would be great ... thank
   you more and more this is coming in to focus

   jeremyBass

   On Sep 23, 11:53 pm, ricardobeat [EMAIL PROTECTED] wrote:

Right at the start:

$('[class^=Round_gen]').filter(function(){
return /Round_gen[0-9]+/.test( $(this).attr('class') 
);}).each(function(){

  // at this point $(this) is a single element
  var $this = $(this);
  var params = $(this).attr('rel').split(':');
  etc, etc.

  /*** you don't need this, it's only if you need the number in the
className var n = $(this).attr('class').match(/[0-9]+/); ***/

didn't have time to look through the rest of the code though.

On Sep 23, 11:10 pm, jeremyBass [EMAIL PROTECTED] wrote:

 Hello, ok... so thou yes it works... and I am thankful for you guys
 for helping, it through a monkey wrench into the fallowing code... 
 may-
 be some one could give me a hand on this ... (thats was the area of
 issues before :-)

 here is the code with the changes as suggested above...

 $('[class^=Round_gen]').filter(function(){
 return /Round_gen[0-9]+/.test( $(this).attr('class') 
 );}).each(function(){

   var n = $(this).attr('class').match(/[0-9]+/);
         $(this).each(function() {var $this = $(this);
                 var params = $(this).attr('rel').split(':');
                 $(this).flash({flashvars: {
      

[jQuery] Scrolling link menu - jQuery version?

2008-09-24 Thread R. Rajesh Jeba Anbiah

I vaguely remember that I have seen a jQuery version of this
http://web.archive.org/web/20030405135609/http://www.scriptbreaker.com/examples/scroll_menu.asp
(unobtrusive unordered list to menu transformation script) But, can't
get that by googling.

Has anyone bookmarked such plugin? TIA

--
  ?php echo 'Just another PHP saint'; ?
Email: rrjanbiah-at-Y!comBlog: http://rajeshanbiah.blogspot.com/


[jQuery] Lightbox balupton

2008-09-24 Thread Snef

Hi,

Playing around with the lightbox. Works nice!
Only one 'little' problem though:

When using it with IE6, the browser locks an the computer is having a
hard time. I already tried to explicitly add ie6_support: true.

I used css to hide the info box (and close link), that couldn't cause
the problem I assume.

Any ideas?

Unfortunately I cant give a link to the page...


[jQuery] Re: add regex in $('.class')

2008-09-24 Thread jeremyBass

Ok little by little

this does output the alerts but I can't seem to target the embed...

function doSomething() {

   var NEWheight =  self.childNodes[1].offsetHeight;
   var NEWwidth =  self.childNodes[1].offsetWidth;
   alert (NEWwidth+NEWwidth);
   alert (NEWheight+NEWheight);
   $(this).contents(embed).css(heigh,NEWheight+'px');
   $(this).contents(embed).css(heigh,NEWwidth+'px');
};

the problem is that in the dom it seems to me that that the embed is
not really a child of the div...
is there a better way to target that embed?... thanks for the help
here...
jeremyBass


On Sep 24, 10:52 am, jeremyBass [EMAIL PROTECTED] wrote:
 So tring to work this out... I did this

 function doSomething() {
         var self = this;
    var NEWheight =  $(self).contents(embed).offsetHeight;
    var NEWwidth =  $(self).contents(embed).offsetWidth;
    alert (NEWwidt+NEWwidth);
    alert (NEWheight+NEWheight);
    $(this).contents(embed).height(NEWheight+'px');
    $(this).contents(embed).width(NEWwidth+'px');

 };

 I can't for the life of me get the alerts to output anything but
 undefined... ideas???
 thanks
 jeremyBass

 On Sep 24, 10:21 am, jeremyBass [EMAIL PROTECTED] wrote:



  Here is another go... the problem is that It's not erroring out at
  all... I need to figure this out... I just don't have the time under
  my belt to do this right... I'v only beed working with javascript for
  less then a year, and jquery for like 3 months ~may-be... any help
  would be great... thank you  ricardobeat and tlphipps for the help so
  far... Have a great one today
  jeremyBass

   this is the latest try (the last part)

  htmlOptions.height = this.firstChild.offsetHeight;
  $this.addClass('').prepend($.fn.flash.transform(htmlOptions));
  $(this).contents(embed).not(.readME).addClass(sizeME);

  function doSomething() {
     var NEWheight = $(.readME).offsetHeight;
     var NEWwidth = $(.readME).offsetWidth;
     $(this).contents(embed).height(NEWheight+'px');
     $(this).contents(embed).width(NEWwidth+'px');

  };

  On Sep 24, 9:57 am, jeremyBass [EMAIL PROTECTED] wrote:

   Hello... here is another thry to work around this issue... any ideas
   on this...

   $(this).contents([childNodes=0]).not(.readME).addClass(sizeME);
   var $size = $(.sizeME);
   var $read = $(.readME);
   function doSomething() {
      var NEWheight = $read.offsetHeight;
      var NEWwidth = $read.offsetWidth;
      $size.height(NEWheight+'px');
      $size.width(NEWwidth+'px');

   };

   Any help here would be great... I'm just spining my wheels at this
   point but I don't want to go back wards to what worked as the whole
   start of this issue would be back thanks for anyhelp here...
   Jeremy

   On Sep 24, 12:51 am, jeremyBass [EMAIL PROTECTED] wrote:

Rock on.. that made more sense... I was not understanding why I needed
that line... but I get it now as far as the rest...

it's just a trageting issue I think this is the latest try
(the last part)

this.innerHTML = 'div class=clear_children readME'+this.innerHTML
+'/divdiv class=clear_children/div';
        htmlOptions.height = this.firstChild.offsetHeight;
        $this.addClass('').prepend($.fn.flash.transform(htmlOptions));

$(this).contents([childNodes=0]).not(.readME).addClass(sizeME);//
fix bleeding to the last div

var $size = $(.sizeME);
var $read = $(.readME);
function doSomething() {
   var NEWheight = $
(this).contents([childNodes=1]).not(.sizeME).offsetHeight;
   var NEWwidth = $
(this).contents([childNodes=1]).not(.sizeME).offsetWidth;
   $(this).contents([childNodes=0]).not(.readME).height(NEWheight
+'px');
   $(this).contents([childNodes=0]).not(.readME).width(NEWwidth
+'px');

};

var resizeTimer = null;
$(window).bind('resize', function() {
    if (resizeTimer) clearTimeout(resizeTimer);
    resizeTimer = setTimeout(doSomething, 3);
    });

});

this it the order...

div class=Round_gen1
     embed class=sizeMe
     div class=readMe/div
/div

so I'm tring to get the embed to match the size of the offset of the
nextSibling

just have not found a good way to do this ... the script doesn't throw
any errors... but anit working .. any help would be great ... thank
you more and more this is coming in to focus

jeremyBass

On Sep 23, 11:53 pm, ricardobeat [EMAIL PROTECTED] wrote:

 Right at the start:

 $('[class^=Round_gen]').filter(function(){
 return /Round_gen[0-9]+/.test( $(this).attr('class') 
 );}).each(function(){

   // at this point $(this) is a single element
   var $this = $(this);
   var params = $(this).attr('rel').split(':');
   etc, etc.

   /*** you don't need this, it's only if you need the number in the
 className var n = $(this).attr('class').match(/[0-9]+/); ***/

 didn't have time to look through the rest of the code though.

 

[jQuery] Re: add regex in $('.class')

2008-09-24 Thread jeremyBass

Nevermind... got it.. but I would welcome any help on improving
this thanks for the help

$('[class^=Round_gen]').filter(function(){
return /Round_gen[0-9]+/.test( $(this).attr('class') );
}).each(function(){
$(this).each(function() {var $this = $(this);
var params = $(this).attr('rel').split(':');
$(this).flash({
flashvars: {
right_off : ['' + params[12] + ''],
left_off : ['' + params[13] + '']
.join(' ')
}
}, { version: 8 }, function(htmlOptions) {
var self = this;
$this.css(padding-right,30px);
htmlOptions.width = self.offsetWidth;
htmlOptions.src = params[0];
htmlOptions.wmode = params[3];
htmlOptions.style = ;
this.innerHTML = 'div class=clear_children readME'+this.innerHTML
+'/divdiv class=clear_children/div';
htmlOptions.height = this.firstChild.offsetHeight;
$this.addClass('').prepend($.fn.flash.transform(htmlOptions));
$(this).contents(embed).not(.readME).addClass(sizeME);

function doSomething() {

var NEWheight =  self.childNodes[1].offsetHeight;
var NEWwidth =  self.childNodes[1].offsetWidth;
//alert (NEWwidth+NEWwidth);
//alert (NEWheight+NEWheight);

$this.contents(.sizeME).css(height,NEWheight+'px');
$this.contents(.sizeME).css(width,NEWwidth+'px');
};

var resizeTimer = null;
$(window).bind('resize', function() {
if (resizeTimer) clearTimeout(resizeTimer);
resizeTimer = setTimeout(doSomething, 3);
});
});
});
});

thank you all for the help... I'm sure that there are better ways...
and I'm open for ideas... thanks again...
jeremyBass

On Sep 24, 11:17 am, jeremyBass [EMAIL PROTECTED] wrote:
 Ok little by little

 this does output the alerts but I can't seem to target the embed...

 function doSomething() {

    var NEWheight =  self.childNodes[1].offsetHeight;
    var NEWwidth =  self.childNodes[1].offsetWidth;
    alert (NEWwidth+NEWwidth);
    alert (NEWheight+NEWheight);
    $(this).contents(embed).css(heigh,NEWheight+'px');
    $(this).contents(embed).css(heigh,NEWwidth+'px');

 };

 the problem is that in the dom it seems to me that that the embed is
 not really a child of the div...
 is there a better way to target that embed?... thanks for the help
 here...
 jeremyBass

 On Sep 24, 10:52 am, jeremyBass [EMAIL PROTECTED] wrote:



  So tring to work this out... I did this

  function doSomething() {
          var self = this;
     var NEWheight =  $(self).contents(embed).offsetHeight;
     var NEWwidth =  $(self).contents(embed).offsetWidth;
     alert (NEWwidt+NEWwidth);
     alert (NEWheight+NEWheight);
     $(this).contents(embed).height(NEWheight+'px');
     $(this).contents(embed).width(NEWwidth+'px');

  };

  I can't for the life of me get the alerts to output anything but
  undefined... ideas???
  thanks
  jeremyBass

  On Sep 24, 10:21 am, jeremyBass [EMAIL PROTECTED] wrote:

   Here is another go... the problem is that It's not erroring out at
   all... I need to figure this out... I just don't have the time under
   my belt to do this right... I'v only beed working with javascript for
   less then a year, and jquery for like 3 months ~may-be... any help
   would be great... thank you  ricardobeat and tlphipps for the help so
   far... Have a great one today
   jeremyBass

    this is the latest try (the last part)

   htmlOptions.height = this.firstChild.offsetHeight;
   $this.addClass('').prepend($.fn.flash.transform(htmlOptions));
   $(this).contents(embed).not(.readME).addClass(sizeME);

   function doSomething() {
      var NEWheight = $(.readME).offsetHeight;
      var NEWwidth = $(.readME).offsetWidth;
      $(this).contents(embed).height(NEWheight+'px');
      $(this).contents(embed).width(NEWwidth+'px');

   };

   On Sep 24, 9:57 am, jeremyBass [EMAIL PROTECTED] wrote:

Hello... here is another thry to work around this issue... any ideas
on this...

$(this).contents([childNodes=0]).not(.readME).addClass(sizeME);
var $size = $(.sizeME);
var $read = $(.readME);
function doSomething() {
   var NEWheight = $read.offsetHeight;
   var NEWwidth = $read.offsetWidth;
   $size.height(NEWheight+'px');
   $size.width(NEWwidth+'px');

};

Any help here would be great... I'm just spining my wheels at this
point but I don't want to go back wards to what worked as the whole
start of this issue would be back thanks for anyhelp here...
Jeremy

On Sep 24, 12:51 am, jeremyBass [EMAIL PROTECTED] wrote:

 Rock on.. that made more sense... I was not understanding why I needed
 that line... but I get it now as far as the rest...

 it's just a trageting issue I think this is the latest try
 (the last part)

 this.innerHTML = 'div class=clear_children readME'+this.innerHTML
 +'/divdiv class=clear_children/div';
         htmlOptions.height = this.firstChild.offsetHeight;
         $this.addClass('').prepend($.fn.flash.transform(htmlOptions));

 $(this).contents([childNodes=0]).not(.readME).addClass(sizeME);//
 

[jQuery] Re: Lightbox balupton

2008-09-24 Thread Snef

Also tried to remove the show_linkback option in the construction
(read it in bug report).

Now I only have the files option in the constructor. Also tried to use
the non-packed version.

Snef schreef:
 Hi,

 Playing around with the lightbox. Works nice!
 Only one 'little' problem though:

 When using it with IE6, the browser locks an the computer is having a
 hard time. I already tried to explicitly add ie6_support: true.

 I used css to hide the info box (and close link), that couldn't cause
 the problem I assume.

 Any ideas?

 Unfortunately I cant give a link to the page...


[jQuery] Re: datepicker plugin: question regarding date range

2008-09-24 Thread pedalpete

I've just started using the javascript .addMonth(1) function for
adding a month to the selected date.

It is working flawlessly so far.
I took a look for a subtractDay() function, but haven't found much.
Apparently you can use a php type date function in javascript
[code]
d = new Date(d.getYear(),d.getMonth(),d.getDate()+90)
[/code]

This page gives a bunch of info on manipulating dates in javascript.
As far as I've seen there isn't a simple jquery-esque way of
manipulating dates, but you can easily mix both jquery and javascript.
http://bytes.com/forum/thread150917.html

Hope it helps,
Pete


On Sep 23, 10:29 pm, c.s [EMAIL PROTECTED] wrote:
 how do i get datepicker to display 5 days previous from date selected?
 bascially date range but i don't want to set it for being between
 specific dates. the fuctionality i'm looking for is user selects today
 date...date picker shows today's date and 4/5 days prior--i need to be
 able to retrieve this data...date picker pass it somehow?

 is this sort of functionality available or do i need to write the code
 for it?

 i'm still wadding around jquerythanks for patience


[jQuery] Re: Traversing table

2008-09-24 Thread Jayzon

Hi again!

I tried to get the script done by myself since no one unfortunately
answered my last entry - this is the bit of code i managed to get
done:

$(document).ready(function() {
$(input).change(function() {
var char_count = $(this).val;
var position = $(this).parent().eq();
var price = 
$(this).parent().parent().parent().$(tr.pricing
td:eq(+position+) span.price).text();
var result = char_count*price;
$
(this).parent().children(span.result).text().replaceWith(result);
});
});

The problem right now ist: I get a javascript error Null value (in
Safari)  I have no idea, what's the exact problem there. I thought
with $(input.change(function()..., the whole thing would only run
if any input field is actually changed - seems as if this isn't the
case.

The page where the script should be included is:
http://www.unilektorat.de/wordpress/leistungen/korrektorat
It's in german, but I think the purpose of this script should be
clear: The user types a number of characters into the input field, the
js file reads the corresponding price from the row above, calculates
it  replaces the 0,00 € with the calculated value.

I'd be really glad if someone could help me out with this one. Thanks!

Markus

On 9 Sep., 20:07, Jayzon [EMAIL PROTECTED] wrote:
 Well, I just tried to get a starting point for the js file:

 $(document).ready(function() {
                 var char_count = $(input).val;
                 var position = $(input:focus).parent().eq();
                 var price = 
 $(input:focus).parent().parent().children(pricing).
 (td).eq(position).(span.price).text();
                 var result = char_count*price;

 });

 First step: char_count is defined - it's the value of the input field.
 Since all input fields are empty, this value is set as soon as someone
 starts typing a number into one of the input fields, right?

 Second step: Get the position of the input field in use - is this
 possible at all with input:focus? ;)

 Third step: Get the price -traversingup from input to td to tr
 (missing a step here perhaps, traverse up totable?) then to
 tr.pricing down to td with the exact position of the input field cell
 down to the span.price in this cell to fetch the text inside it. This
 should be transformed from text to a value for calculation, right?

 Fourth step: Get the final result by calculating the input value with
 the price.

 Missing: Replace the 0,00 € in span.result with the calculated result.

 Is this in any way right? Or at least a good starting point?

 Thanks,

 Markus

 On 9 Sep., 15:46, Jayzon [EMAIL PROTECTED] wrote:

  Hi Karl,

  I'm not sure if you missed them, but I placed the input fields inside
  thetable, they are in tr.calc (the second row in the html in my first
  post). It's just an input / tag. That input field would then be a
  nice starting point, because it's placed directly under the span
  including the price  in the same cell as the span to be modified.

  Greetings,

  Markus

  On Sep 9, 2:23 pm, Karl Swedberg [EMAIL PROTECTED] wrote:

   Hi Markus,

   Can you show us just a bit more of the HTML? It would help a great  
   deal if we could see where the input field is in relation to the spans  
   that you want to modify.

   --Karl

   
   Karl Swedbergwww.englishrules.comwww.learningjquery.com

   On Sep 8, 2008, at 4:38 PM, Jayzon wrote:

Hi!

I've got atablewith multiple rows which I'd like to traverse in a
special way - here's the html (for better reading, I just included two
rows, these rows are duplicated with different values):

tbody
tr class=pricing
tdExample A/td
tdspan class=price1,20/span euro;/td
tdspan class=price2,40/span euro;/td
/tr
tr class=calc
tdCalculator/td
tdinput /span class=result0,00/span euro;/td
tdinput /span class=result0,00/span euro;/td
/tr
/tbody

What I'd like to do: If an input filed is focussed, a price should be
calculated. To keep the script as efficient as possible, I want to
travel up from the input field to the cell above it (i.e. one row up,
second or third cell in that row). My problem is: How can I traverse
the DOM in this way?

I imagine the following: The script should know where the starting
point was (second or third cell in row) and then get the corresponding
cell. I'm sure this is possible, but I have no idea how to achieve it.

If I get the DOMtraversingright, I want to get the value of
span.price to calculate the input with it  update the result in -
yes, span.result ;-)

I'm sure this is a pretty easy thing to achieve for people how know
jQuery well - I unfortunately don't (yet!). Could someone please
explain this?

Thanks for your effort!

Markus- Hide quoted text -

   - Show quoted text -


[jQuery] text() as a wrapped set?

2008-09-24 Thread 703designs

Because the text method returns a string, it's missing appendTo and
other methods. Now, of course I can do this:

$(#sandbox).text($(a).text());

But I'd prefer to do this:

$(a).text().appendTo(#sanbox);

What goes between text and appendTo? Or is the first example the best
way to do this?


[jQuery] element creation using wrap behaves oddly

2008-09-24 Thread darren

i just want to bring this up for discussion to see what people have to
say about it and to further my understanding of how jquery works and
why it works that way. maybe its a bug?

imagine the base code bHello World!/b

// fails to assign click handler:
$(b).wrap($(a href='#'/).click(function(){
alert(foo);
}));
// also fails... wrapAll, wrapInner etc


// works as expected:
$(b).replaceWith($(a href='#'Hello World/a).click(function(){
alert(foo);
}));
// also works as expected: html, prepend, append, after, before,
etc...


i found this odd. thoughts?


[jQuery] jquery callback issue

2008-09-24 Thread msk

hi,
i am using jquery in drupal i have a list like


Div class='room'
car1  (edit)
car2 (edit)
/div

edit=(a href=javascript:void(0) class=editedit/a)
that was link define behind edit caption.

now in jquery:

$(.edit).click(function(){
add_new_room();
return false;
})

function add_new_room(){
...defination of function
.


}

after ajax call in (add_new_roomfunction)
i have change the same html through ajax function
like
data=Div class='room'
car1  (edit)
car2 (edit)
/div

and insert into

$(room).html(data);


obviouly i am using


$(document).ready(function (){
..
..
})


now the issue as the page refresh it work fine
when i am going to change dynamically innerHTML of div in that way
html is replace but js function is not called somehow


can any tell me what is the issue with that

-shakeeb


[jQuery] Cycle plugin newbie question

2008-09-24 Thread ehab

this should be pretty easy to answer. im a complete newbie to jquery
and javascript, but id like to use the cycle plugin (http://malsup.com/
jquery/cycle/) on my website to animate a few images. i know html and
css but i could not find clear steps or documentation on the website
as to how to implement the plugin on your page. i have viewed the page
source on a few pages that used it and tried to copy/paste/match the
code but none of it has worked so far. i was wondering if there was a
tutorial somewhere on how to get started using this plugin or how to
just call it to the div that contains the images ?? from the html
header or inline somehow, or include some code into
jquery.cycle.all.js ?? thanks..


[jQuery] Re: no callback for css/addClass?

2008-09-24 Thread ajpiano

that sounds like an issue that needs debugging, not a (superfluous)
change to the library core...



On Sep 24, 1:06 pm, Alex Weber [EMAIL PROTECTED] wrote:
 i realize that... i just needed this in a rare case where jquery is
 showing an element before resizing it, even though the resize
 statement (css) is before the show()...

 On Sep 23, 9:05 pm, ricardobeat [EMAIL PROTECTED] wrote:

  Yeah, it's just like doing

  $('color','red'); alert('color changed');

  On Sep 23, 5:15 pm, MorningZ [EMAIL PROTECTED] wrote:

   Callbacks are used to know when asynchronous events are complete...
   setting the css or class doesn't happen asynchronously


[jQuery] Re: no callback for css/addClass?

2008-09-24 Thread Alex Weber

yeah bud thats a given i just wanted to confirm that there wasn't a
callback and why not.

thanks for all the replies!

ajpiano wrote:
 that sounds like an issue that needs debugging, not a (superfluous)
 change to the library core...



 On Sep 24, 1:06�pm, Alex Weber [EMAIL PROTECTED] wrote:
  i realize that... i just needed this in a rare case where jquery is
  showing an element before resizing it, even though the resize
  statement (css) is before the show()...
 
  On Sep 23, 9:05�pm, ricardobeat [EMAIL PROTECTED] wrote:
 
   Yeah, it's just like doing
 
   $('color','red'); alert('color changed');
 
   On Sep 23, 5:15�pm, MorningZ [EMAIL PROTECTED] wrote:
 
Callbacks are used to know when asynchronous events are complete...
setting the css or class doesn't happen asynchronously


[jQuery] why is this code inefficient?

2008-09-24 Thread pedalpete

I thought I was getting the hang of jquery and javascript, but then i
wrote this small function, and it is really taking a long to run -
like 15+ seconds.

The purpose of the function is that i have a list of concerts ordered
by date.
I want to show the date when the date changes, so for all concerts on
Wed, Sep 24, I show the date as a heading on the first concert, and
then hide the rest of the date headings, and then for concerts on Thur
Sep 25, the date shows again on the first item, so users know they are
looking at a different day.

This way users get a clear division of dates.

the function I'm using is
[code]
function showDateDivides(){
$('.divideDate').livequery(function(){
var dividedID = $(this).attr('id');
var dateTable = $('#'+dividedID).html();
var splitDateTable = dateTable.split(' ');
var dayOfWeek = splitDateTable[0];
var numOfMonth = splitDateTable[1];
$('.dateTable#'+dividedID+':first').show();
$('.dateTable#'+dividedID+':first
td#'+dayOfWeek).html(numOfMonth).addClass('firstDate');
});
[/code]

the class divideDate is hidden in the css when the page loads,
The id holds the date formated in -mm-dd
the class dateTable holds a weekly view date table (so 7 squares), and
then the day of the week gets the date number and class of firstDate
added to it.

I hope that's clear. Is this really inefficient code?




[jQuery] Re: Find() doesn't want to find anything out of the body

2008-09-24 Thread MindstormsKid



Karl Swedberg-2 wrote:
 
 Try this for the success parameter:
 
   success: function(html) {
  var $html = $(html);
  var title = $html.filter('title').text();
  alert(title);
   }
 
 Basically, you have to use .filter() instead of .find();
 
 Here's a demo page:
 
 http://test.learningjquery.com/ajax-load.php
 
 --Karl
 
 Karl Swedberg
 www.englishrules.com
 www.learningjquery.com
 
Ok, that works fine for getting the title, but not the body. Any idea why?
Thanks!
-- 
View this message in context: 
http://www.nabble.com/Find%28%29-doesn%27t-want-to-find-anything-out-of-the-body-tp19632317s27240p19655605.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: why is this code inefficient?

2008-09-24 Thread MorningZ

Do you have a live page to show this in operation?  because with that
little bit of code it's very difficult to point you in the right
direction

One piece of advice right off the top:you have to keep under
control how many divs with class divideDate are on the page


[jQuery] Re: Cycle plugin newbie question

2008-09-24 Thread Mike Alsup

 this should be pretty easy to answer. im a complete newbie to jquery
 and javascript, but id like to use the cycle plugin (http://malsup.com/
 jquery/cycle/) on my website to animate a few images. i know html and
 css but i could not find clear steps or documentation on the website
 as to how to implement the plugin on your page. i have viewed the page
 source on a few pages that used it and tried to copy/paste/match the
 code but none of it has worked so far. i was wondering if there was a
 tutorial somewhere on how to get started using this plugin or how to
 just call it to the div that contains the images ?? from the html
 header or inline somehow, or include some code into
 jquery.cycle.all.js ?? thanks..

Here's a very, very basic demo:

http://www.malsup.com/jquery/cycle/basic.html

Mike



[jQuery] autocomplete and scrolling with IE7

2008-09-24 Thread Shelane

If you click on the scroll bar and try to click anywhere else on the
page without selecting an item, the results never go away in IE7.  It
works fine in other browsers.

Example: http://education.llnl.gov/jquery/
Click the Auto Complete on the left and type Mod into field.

Is this a known bug?


[jQuery] Listen for location anchor change?

2008-09-24 Thread mario

Hi,

I was just wondering if there is anyway to listen for changes on the
location bar when a link sets an anchor on the same page.

Example:

current location: www.something.com/

I click on a link and it takes me to:

www.something.com/#someanchor

Is there anyway to listen for this change/event with jquery?


[jQuery] Re: Listen for location anchor change?

2008-09-24 Thread Andy Matthews

Javascript has the built in property location.hash that will return the
value of the anchor along with the # sign.


andy

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of mario
Sent: Wednesday, September 24, 2008 3:09 PM
To: jQuery (English)
Subject: [jQuery] Listen for location anchor change?


Hi,

I was just wondering if there is anyway to listen for changes on the
location bar when a link sets an anchor on the same page.

Example:

current location: www.something.com/

I click on a link and it takes me to:

www.something.com/#someanchor

Is there anyway to listen for this change/event with jquery?




[jQuery] Re: element creation using wrap behaves oddly

2008-09-24 Thread ricardobeat

I believe you can't assing an event handler to an element before it is
added to the DOM. This works for me:

$('b').wrap($('a href=#/a').click(function(){
alert(foo);
});

Or if you want the click event assigned to a and not b

$('b').wrap($('a href=#/a').parent().click(function(){
alert(foo);
});

- ricardo

On Sep 24, 3:08 pm, darren [EMAIL PROTECTED] wrote:
 i just want to bring this up for discussion to see what people have to
 say about it and to further my understanding of how jquery works and
 why it works that way. maybe its a bug?

 imagine the base code bHello World!/b

 // fails to assign click handler:
$(a href='#'/).click(function(){
alert(foo);
})

 // also fails... wrapAll, wrapInner etc

 // works as expected:
 $(b).replaceWith($(a href='#'Hello World/a).click(function(){
     alert(foo);}));

 // also works as expected: html, prepend, append, after, before,
 etc...

 i found this odd. thoughts?


[jQuery] Re: Listen for location anchor change?

2008-09-24 Thread Aaron Heimlich
I think he's looking for something more along the lines of IE8's
onhashchange event[1]. Unfortunately, this is something that, to my
knowledge, no other browser implements.
[1] http://msdn.microsoft.com/en-us/library/cc288209(VS.85).aspx

On Wed, Sep 24, 2008 at 3:27 PM, Andy Matthews [EMAIL PROTECTED]wrote:


 Javascript has the built in property location.hash that will return the
 value of the anchor along with the # sign.


 andy

 -Original Message-
 From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of mario
 Sent: Wednesday, September 24, 2008 3:09 PM
 To: jQuery (English)
 Subject: [jQuery] Listen for location anchor change?


 Hi,

 I was just wondering if there is anyway to listen for changes on the
 location bar when a link sets an anchor on the same page.

 Example:

 current location: www.something.com/

 I click on a link and it takes me to:

 www.something.com/#someanchor

 Is there anyway to listen for this change/event with jquery?





-- 
Aaron Heimlich
Web Developer
[EMAIL PROTECTED]


[jQuery] Re: Need help with jQuery array

2008-09-24 Thread Jim Davis
Rene,

Thanks for your help. Your solution works great.

Jim

On Wed, Sep 24, 2008 at 6:54 AM, Rene Veerman [EMAIL PROTECTED] wrote:


 Give your UL tag an id 'menu', and replace your document.ready code
 with this:
 $(document).ready(function() {

$('ul#menu li a').each (function () {
$(this).append ('span class=hover/span');
var $span = $(' span.hover', this).css('opacity', 0);
$(this).hover (function () {
$span.stop().fadeTo (500, 1);
}, function () {
$span.stop().fadeTo (500, 0);
});
});



 Jim Davis wrote:
  I am adapting Greg-J's hover fade method
  http://greg-j.com/static-content/hover-fade-redux.html to a
  navigation menu. Demo of my menu is here:
 
  http://jimdavis.org/celtic/fadetest.php
 
  If you view the source code you will see that I repeat the jQuery
  function for each menu item. Since this nav menu will have about 10
  items I want to change the script to use an array to minimize the
  code. What needs to be changed to use an array?
 
  Jim
 
 
 




[jQuery] Re: text() as a wrapped set?

2008-09-24 Thread ricardobeat

text() is really meant to retrieve text content as a string, and
append() is for appending elements, it's probably going through a lot
more hoops than just using text().

So it looks like the first way is the best way to do it, enjoy the
beauty of jQuery: extend it!

$.fn.textCopy = function(source) { // copy FROM
  return this.each(function(){
 $(this).text( $(source).text() );
  });
};

or

$.fn.textReplace = function(source) { // copy TO
  return this.each(function(){
 $(source).text( $(this).text() );
  });
};

cheers
- ricardo

On Sep 24, 3:27 pm, 703designs [EMAIL PROTECTED] wrote:
 Because the text method returns a string, it's missing appendTo and
 other methods. Now, of course I can do this:

 $(#sandbox).text($(a).text());

 But I'd prefer to do this:

 $(a).text().appendTo(#sanbox);

 What goes between text and appendTo? Or is the first example the best
 way to do this?


[jQuery] Re: no callback for css/addClass?

2008-09-24 Thread ricardobeat

There is no way a css() and show() could happen in the wrong order, as
the second one only executes after the first one returns the object.
Is it an animated resize?

On Sep 24, 3:59 pm, Alex Weber [EMAIL PROTECTED] wrote:
 yeah bud thats a given i just wanted to confirm that there wasn't a
 callback and why not.

 thanks for all the replies!

 ajpiano wrote:
  that sounds like an issue that needs debugging, not a (superfluous)
  change to the library core...

  On Sep 24, 1:06 pm, Alex Weber [EMAIL PROTECTED] wrote:
   i realize that... i just needed this in a rare case where jquery is
   showing an element before resizing it, even though the resize
   statement (css) is before the show()...

   On Sep 23, 9:05 pm, ricardobeat [EMAIL PROTECTED] wrote:

Yeah, it's just like doing

$('color','red'); alert('color changed');

On Sep 23, 5:15 pm, MorningZ [EMAIL PROTECTED] wrote:

 Callbacks are used to know when asynchronous events are complete...
 setting the css or class doesn't happen asynchronously


[jQuery] Re: Listen for location anchor change?

2008-09-24 Thread mario

Thank you all, yes I was looking for something along the lines of what
Aaron said.

Well at least now I'm certain it can't be done...

On Sep 24, 3:33 pm, Aaron Heimlich [EMAIL PROTECTED] wrote:
 I think he's looking for something more along the lines of IE8's
 onhashchange event[1]. Unfortunately, this is something that, to my
 knowledge, no other browser implements.
 [1]http://msdn.microsoft.com/en-us/library/cc288209(VS.85).aspx

 On Wed, Sep 24, 2008 at 3:27 PM, Andy Matthews [EMAIL PROTECTED]wrote:





  Javascript has the built in property location.hash that will return the
  value of the anchor along with the # sign.

  andy

  -Original Message-
  From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
  Behalf Of mario
  Sent: Wednesday, September 24, 2008 3:09 PM
  To: jQuery (English)
  Subject: [jQuery] Listen for location anchor change?

  Hi,

  I was just wondering if there is anyway to listen for changes on the
  location bar when a link sets an anchor on the same page.

  Example:

  current location:www.something.com/

  I click on a link and it takes me to:

 www.something.com/#someanchor

  Is there anyway to listen for this change/event with jquery?

 --
 Aaron Heimlich
 Web Developer
 [EMAIL PROTECTED]


[jQuery] Re: jQuery Cycle - Get Current Slide Number

2008-09-24 Thread Phillip

That worked perfectly. Thank for your help, I was completely stumped.

On Sep 24, 11:51 am, dlimpid [EMAIL PROTECTED] wrote:
 try this:

 $(function() {
   $('*').filter(function() { return this.id.match(/^s\d+$/); })
     .each(function(n) {
       $(this).cycle({
         timeout: 0,
         speed: 500,
         fx: 'fade',
         prev: '#s' + (n + 1) + '_prev',
         next: '#s' + (n + 1) + '_next',
         after: function(curr, next, opts) {
           $('#s' + (n + 1) + '_current').html((opts.currSlide + 1) + 
 of  + opts.slideCount +  images);
         }
       });
     });

 });

 I think that the problem of original code was the scope of the closer
 of before function doesn't contains slideShow variable.

 There was another problem with before callback. I think at very first
 time, i.e. when page is just loaded, in before callback function
 opts.nextSlide has wrong value. (try before and opts.nextSlide instead
 of after and opts.currSlide)

 On Sep 24, 6:54 am, Phillip [EMAIL PROTECTED] wrote:

  Thanks for the reply. I gave it shot, but still no dice. The good news
  is opts.slideCount is working. But opts.nextSlide doesn't seem to
  update when you click ahead. Any ideas on what to try next?




[jQuery] Re: Listen for location anchor change?

2008-09-24 Thread ricardobeat

Implement it yourself:

function onhashchange(){
//do stuff
};

$('a').click(function(){
  if (this.href.indexOf('#')+1) onhashchange();
});

- ricardo

On Sep 24, 5:33 pm, Aaron Heimlich [EMAIL PROTECTED] wrote:
 I think he's looking for something more along the lines of IE8's
 onhashchange event[1]. Unfortunately, this is something that, to my
 knowledge, no other browser implements.
 [1]http://msdn.microsoft.com/en-us/library/cc288209(VS.85).aspx

 On Wed, Sep 24, 2008 at 3:27 PM, Andy Matthews [EMAIL PROTECTED]wrote:





  Javascript has the built in property location.hash that will return the
  value of the anchor along with the # sign.

  andy

  -Original Message-
  From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
  Behalf Of mario
  Sent: Wednesday, September 24, 2008 3:09 PM
  To: jQuery (English)
  Subject: [jQuery] Listen for location anchor change?

  Hi,

  I was just wondering if there is anyway to listen for changes on the
  location bar when a link sets an anchor on the same page.

  Example:

  current location:www.something.com/

  I click on a link and it takes me to:

 www.something.com/#someanchor

  Is there anyway to listen for this change/event with jquery?

 --
 Aaron Heimlich
 Web Developer
 [EMAIL PROTECTED]


[jQuery] Re: autosuggest help

2008-09-24 Thread allan2008

Thanks for the help guys! I understand this much better now. I really
appreciate your work Jorn, thanks for sharing with us!


[jQuery] Re: no callback for css/addClass?

2008-09-24 Thread Alex Weber

sorry i just took a look at the code and its a fadeIn() not a show()
but really it doesn't change anything.. here's the code:

$('#produtos_contato').css('width','350px');
$('#produtos_links').fadeIn(resize);

where resize() is a function that stretches the left menu panel as far
down or up as the content goes (completely unrelated to the divs in
the js)

in firefox, opera, etc it works ok but in IE #produtos_contato
doesn't seem to resize in time because its supposed to fit in
alongside the div that fades in but instead sits under it...

On Sep 24, 5:48 pm, ricardobeat [EMAIL PROTECTED] wrote:
 There is no way a css() and show() could happen in the wrong order, as
 the second one only executes after the first one returns the object.
 Is it an animated resize?

 On Sep 24, 3:59 pm, Alex Weber [EMAIL PROTECTED] wrote:

  yeah bud thats a given i just wanted to confirm that there wasn't a
  callback and why not.

  thanks for all the replies!

  ajpiano wrote:
   that sounds like an issue that needs debugging, not a (superfluous)
   change to the library core...

   On Sep 24, 1:06 pm, Alex Weber [EMAIL PROTECTED] wrote:
i realize that... i just needed this in a rare case where jquery is
showing an element before resizing it, even though the resize
statement (css) is before the show()...

On Sep 23, 9:05 pm, ricardobeat [EMAIL PROTECTED] wrote:

 Yeah, it's just like doing

 $('color','red'); alert('color changed');

 On Sep 23, 5:15 pm, MorningZ [EMAIL PROTECTED] wrote:

  Callbacks are used to know when asynchronous events are complete...
  setting the css or class doesn't happen asynchronously


[jQuery] support newbie: DOM tablesorter questions. time sensitive

2008-09-24 Thread c.s

Hello jquery community,

So I'm still wadding around jquery/dom/js but had to dive into the
deep end to support under-resourced projects. I have a couple code
questions and was also wondering what the best resource would be for
on-the-fly question/answer sort of thing: irc channel(s)? I'm hoping
that soon I'll be able to start answering questions instead of posting
for basic solutions...but all in due time.

1. lilabel for=happyHappyinput type=checkbox //li
 - if checkbox (:checked), I need to grab the text 'Happy' and pass
it to an h4
 - in general i'm a bit confused between innerHTML, .html(), .text():
could someone clarify as if talking to a two-year old ; )

2. input type=text value= /
- user enters a number, I need to capture and pass it to the value
of the input
  - i'm using it within tablesorter, so the number needs to pass to
the value before validation
 - also, if user changes number or removes, value needs to update

would livequery make any of dom binding etc easier?

If any of you are chat types, I'll be online tonight...drop me a reply
to author and I'll pass along my sn.

Thanks to the readers and reply-ers; every bit helps


[jQuery] Re: support newbie: DOM tablesorter questions. time sensitive

2008-09-24 Thread MorningZ


what the best resource would be for on-the-fly question/answer sort
of thing: irc channel(s)?


This isn't operators are standing by... groups/forums like this are
people, other users, helping out for the sake of helping out  and
patience is a virtue...  making a post and expecting an immediate
answer, while it may happen sometimes, is totally unrealistic




 in general i'm a bit confused between innerHTML, .html(), .text():


InnerHMTL is used to set the html of a DOM object
http://www.google.com/search?q=javascript+innerHTML

jQuery's .html and .text methods wrap around javascript's
functionality and are fully explained in the docs
http://docs.jquery.com/Manipulation




user enters a number, I need to capture and pass it to the value of
the input


.val() could get the value and $.ajax could pass the value to where it
needs to go
http://docs.jquery.com/Ajax




i'm using it within tablesorter, so the number needs to pass to the
value before validation


The plugin tablesorter (http://tablesorter.com/docs/)?   validating
what before you pass where and what does it have to do with that
particular plugin?


[jQuery] Re: IE issue... load order, DOM, event handling... ? help please!

2008-09-24 Thread ricardobeat

the onload event is not very reliable, maybe using the old way (I
don't have IE6 to test it out:

(function($) {
  $.fn.pageOpening = function(path) {
$(#loadingGal).show();
var imageObj = new Image();
$(imageObj).attr(src,path)[0].onload = function(){
$(#loadingGal).hide();
$(#leftCol).hide();
$(#leftCol).css(background-
image,url(+path+)).fadeIn(1000);
};
  }

$(document).ready(function() {
$().pageOpening(images/photo-green-homes.jpg);

});

If that doesn't work, just skip the fade effect on IE6. Let it die ;)

- ricardo

On Sep 24, 12:18 pm, [EMAIL PROTECTED] [EMAIL PROTECTED]
wrote:
 no taker?

 On Sep 23, 12:34 pm, [EMAIL PROTECTED] [EMAIL PROTECTED]
 wrote:

  Hi all.  I'm working on a site where id like an image to fade in as
  the page shows up.  The tricky part (i think) is that you can't trace
  the load of a background image.  So ive made a new image dynamically
  and traced that, assuming that once the image is loaded there, i can
  insert it to the background, and remove the loading icon (#loadingGal)

  code follows!

  (function($) {
    $.fn.pageOpening = function(path) {
                  $(#loadingGal).show();
                  var imageObj = new Image();
                  $(imageObj).attr(src,path).load(function(){
                          $(#loadingGal).hide();
                          $(#leftCol).hide();
                          
  $(#leftCol).css(background-image,url(+path+)).fadeIn(1000);
                  });
    }

  $(document).ready(function() {
          $().pageOpening(images/photo-green-homes.jpg);

  });

  In IE6, the background image does not load and the loading div does
  not hide.  On refresh however, all is fine.  I feel this is a loading
  order issue with IE... or maybe cache.

  any help is appreciated!

  thanks.


[jQuery] Re: why is this code inefficient?

2008-09-24 Thread Karl Rudd

For a start try using  $('div.divideDate'). This means that jQuery can
just check div elements for the divideDate class rather than every
element on the page.

Karl Rudd

On Thu, Sep 25, 2008 at 5:01 AM, pedalpete [EMAIL PROTECTED] wrote:

 I thought I was getting the hang of jquery and javascript, but then i
 wrote this small function, and it is really taking a long to run -
 like 15+ seconds.

 The purpose of the function is that i have a list of concerts ordered
 by date.
 I want to show the date when the date changes, so for all concerts on
 Wed, Sep 24, I show the date as a heading on the first concert, and
 then hide the rest of the date headings, and then for concerts on Thur
 Sep 25, the date shows again on the first item, so users know they are
 looking at a different day.

 This way users get a clear division of dates.

 the function I'm using is
 [code]
function showDateDivides(){
$('.divideDate').livequery(function(){
var dividedID = $(this).attr('id');
var dateTable = $('#'+dividedID).html();
var splitDateTable = dateTable.split(' ');
var dayOfWeek = splitDateTable[0];
var numOfMonth = splitDateTable[1];
$('.dateTable#'+dividedID+':first').show();
$('.dateTable#'+dividedID+':first
 td#'+dayOfWeek).html(numOfMonth).addClass('firstDate');
});
 [/code]

 the class divideDate is hidden in the css when the page loads,
 The id holds the date formated in -mm-dd
 the class dateTable holds a weekly view date table (so 7 squares), and
 then the day of the week gets the date number and class of firstDate
 added to it.

 I hope that's clear. Is this really inefficient code?





[jQuery] Re: Bind events on DOM elements inserted from other frame

2008-09-24 Thread ricardobeat

Hi,

This works for me (FF3) (code running in the parent frame):

$('#test',frames[0].document).click(function(){ //bind function to
event from element *inside iframe*
$('bTESTE/b').appendTo('body').click(function(){ // append
element to the *parent frame* and assing a click handler to it
 alert('test');
 });
});

I might not be understanding clearly what you want, a test case or
explanation of the functionality you are looking for might help.

cheers,
- ricardo

On Sep 24, 1:27 pm, hubbs [EMAIL PROTECTED] wrote:
 Hi Ricardo,

 I am not appending an iframe, it is hardcoded.  I am trying to append
 to the parent document from within the iframe, and have the event in
 the parent bound to the appended element from the iframe.

 On Sep 23, 11:49 pm, ricardobeat [EMAIL PROTECTED] wrote:

  Hi, I can't test anything right now, but are you setting up the
  ready() function after appending the iframe?

  On Sep 23, 9:11 pm, hubbs [EMAIL PROTECTED] wrote:

   Yeah, this really is not working.  Could someone please help me to
   understand how to make multiple frames use the same jquery instance so
   I can resolve this problem?  Do I need to resort to frame ready
   plugin?  I really don't want to...

   On Sep 17, 7:12 pm, ricardobeat [EMAIL PROTECTED] wrote:

Not sure but $(frames['frame'].document).ready() should work (from the
parent window).

On Sep 17, 8:21 pm, hubbs [EMAIL PROTECTED] wrote:

 Ok, I am realizing it has to do with the do with the $(document).ready
 function.  If I just use:

 $ = window.parent.$;
  $(#hold).append('a href=#Inserted from iFrame/a br /');

 In the iframe, it correctly adds the link to the parent, and it gets
 the event from livequery!  Hooray!!

 But, obviously I need to add back a document ready function so that I
 can bind events within the iframe.  How does that need to be done in
 this context?  As I said, using the normal document ready does not
 work.

 On Sep 17, 9:58 am, ricardobeat [EMAIL PROTECTED] wrote:

  using the iframe's jQuery object:

  $('.classinparentframe', parent.window.document)

  Ideally if the contents of the iframe are always known to you, you
  should use only one instance of jQuery on the parent window and do 
  all
  your stuff from it, it's simpler to debug also.

  On Sep 16, 10:29 pm, hubbs [EMAIL PROTECTED] wrote:

   Thanks Ricardo.

   But what if I wanted to access the parent document from WITHIN the
   iframe?

   On Sep 16, 12:27 pm, ricardobeat [EMAIL PROTECTED] wrote:

You need to understand that a frame is another 'window' 
instance, it
doesn't have the same jQuery object as the parent window unless 
you
tell it to. So the '$' object you use in firebug console is 
always the
one from the parent window.

If i'm not mistaken you can acess frame content with the parent
window's jQuery object using $('.classinsidetheframe',
frames['name'].document).css();

On Sep 16, 1:48 pm, hubbs [EMAIL PROTECTED] wrote:

 Ok Brandon,

 I found this in another post:

 var doc = $('#testframe')[0].contentWindow.document;
 $(doc.body).append('spantest/span');

 This seems like it would help, but I am not sure how to use 
 this,
 along with what you posted to get it working correctly.  
 Somehow
 sending the GET within the context of the contentWindow is 
 confusing
 me, and I just can't get it working.

 On Sep 15, 9:18 am, Brandon Aaron [EMAIL PROTECTED] wrote:

  To see what I mean run this in Firebug:
  $('iframe')[0].contentWindow.$ = $;

  Then click on the link in the iframe and it will behave as 
  you expect.

  --
  Brandon Aaron

  On Mon, Sep 15, 2008 at 9:13 AM, Brandon Aaron [EMAIL 
  PROTECTED]wrote:

   This would work if you used the frames parent instance of 
   jQuery. LiveQuery
   works by monitoring the DOM methods within jQuery. Since 
   within the frame
   you are using a new instance of jQuery, LiveQuery will 
   not be monitoring its
   DOM methods.
   --
   Brandon Aaron

   On Sun, Sep 14, 2008 at 11:04 PM, hubbs [EMAIL 
   PROTECTED] wrote:

   I can confirm that using event delegation will fix this 
   problem.  I
   guess that it is just a problem with the LiveQuery 
   plugin.  Brandon,
   if you are where around here, could you comment on this?

   Thanks.

   On Sep 14, 2:29 pm, hubbs [EMAIL PROTECTED] wrote:
I have a working example of this, and would really 
like help
understanding why bind or livequery does not bind 
events to DOM
elements that are inserted from 

[jQuery] Re: ready() function different when inside a frame?

2008-09-24 Thread ricardobeat


As the jQuery instance is from the parent window, you have to specify
that you want an element from the iframe:

$ = window.parent.$;
$(function() {
$(#test, frames['thisframe']).click(function() { // element in
iframe
   $(#hold).append('a href=#Inserted from iFrame/a br /'); //
element in parent frame
   });
});

- ricardo

On Sep 24, 2:38 am, hubbs [EMAIL PROTECTED] wrote:
 I have a frame that I want to use the same instance of jquery as in
 the parent window. Here is what I did:

 $ = window.parent.$;
 $(function() {
 $(#test).click(function() {
    $(#hold).append('a href=#Inserted from iFrame/a br /');
    });

 });

 For some reason, the click event is not being bound, and the html is
 not getting appended.  BUT, if I remove the click function, and just
 load the page without it, it DOES correctly get inserted into the
 parent.  What is going on here?  And why can't I get a click function
 to work in a frame using the parents jquery instance?

 Example:http://web2.puc.edu/PUC/files/bind.html


[jQuery] Sort of like tabs... need to start with a random div and swap it out when clicking a link

2008-09-24 Thread illtron

I think I'm pretty close to getting this to work, but it's not quite.
This is essentially tab functionality, but the initially showing div
needs to be randomly chosen.

I can either show the random div initially, but then the links don't
work. Alternatively, I can make the links work, but then I can't get
the random div. The code I'm including shows working links.

To (attempt to) show the random div, I'm using this
http://www.leftrightdesigns.com/library/jquery/randomchild/jquery.randomchild.js
The links use this: http://enure.net/dev/hide-all-except-one/

I was trying to take this part, which shows the first child div of
#toggleThis: $('#toggleThis  div:first').attr('id')
And substitute this: $('#toggleThis').randomChild() but it doesn't
work.

Can anybody weigh in and tell me where I'm going wrong? Thanks!

!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN http://
www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd
html xmlns=http://www.w3.org/1999/xhtml;
head
meta http-equiv=Content-Type content=text/html; charset=utf-8 /
titleRandom test/title
style type=text/css.hide { display: none; }/style
script type=text/javascript src=http://code.jquery.com/jquery-
latest.min.js/script
script type=text/javascript

$(document).ready(function() {
var hash = window.location.hash;

(!hash) ?
hideAllExcept('#' + $('#toggleThis  div:first').attr('id'))
: hideAllExcept(window.location.hash);

$('a.toggle').click(function() {
var href = $(this).attr('href');
hideAllExcept(href);
});
});

function hideAllExcept(el) {
$('#toggleThis div').addClass('hide');
$(el).removeClass('hide');

$('a.toggle').removeClass('active');
$('a[href=' + el + ']').addClass('active');

}

jQuery.fn.randomChild = function(settings) {
return this.each(function(){
var c = $(this).children().length;
var r = Math.ceil(Math.random() * c);
$(this).children().hide().parent().children(':nth-child(' + r +
')').show();
});
};

/script

/head
body



ul
lia href=#lorem class=toggleLorem ipsum/a/li
lia href=#ut class=toggleUt enim ad/a/li
lia href=#duis class=toggleDuis aute/a/li
lia href=#execepteur class=toggleExcepteur sint/a/li
/ul

div id=toggleThis
div id=loremLorem ipsum dolor sit amet./div
div id=utUt enim ad minim veniam./div
div id=duisDuis aute irure dolor./div
div id=execepteurExcepteur sint occaecat./div
/div





/body
/html


[jQuery] Add Class to matched href location

2008-09-24 Thread jrutter

Im having trouble getting this to work, I feel like Im really close.

Does anyone have any idea?

var path = location.pathname.substring(1);
if ([EMAIL PROTECTED] == path]) {
$('.nav ul#example li.addClass('active'));
}


[jQuery] Form submitted twice in IE ?

2008-09-24 Thread MichaelE

I have a fairly complex jquery-based form in a ColdFusion back-end
app, with a tabbed interface that fires validation on each tab change,
as well as on submit. Lots of moving parts. I don't think there's
anything wrong here, works fine...

The problem is that in IE, the form is getting submitted twice to my
CF page.
With Firefox, no problems... clicking the 'submit' button or hitting
'enter' in any field causes the form to be submitted only one time as
expected. However, in IE7, either clicking 'submit' or 'enter' submits
the form twice.

Any ideas?

Interested in finding both a probable cause and a cure, if possible!


  1   2   >