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

2008-09-23 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 = ' 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 = ' 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
> a

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

2008-09-23 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('Inserted from iFrame ');
>
> > > 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('test');
>
> > > > > > > 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.
>
> > > > > > > 

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

2008-09-23 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
>
>             
>                 Updates - Recent Additions to this Site
>                  << created by jquery
>                 
>                             lorem ipsum dolar
>                 
>                     scrollbar divset
>                 
>             
>
> 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] ready() function different when inside a frame?

2008-09-23 Thread hubbs

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('Inserted from iFrame ');
   });
});

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] How to bind Window Resize with richFaces?

2008-09-23 Thread alee amin
hi,

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



Can you people help me in binding it ?

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


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

2008-09-23 Thread Sam Sherlock
I used firebug console to test removing the jscrollbar


my code is like this


Updates - Recent Additions to this Site
 << created by jquery

lorem ipsum dolar

scrollbar divset



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] datepicker plugin: question regarding date range

2008-09-23 Thread c.s

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: jScrollPane, hide dragscroll... possible?

2008-09-23 Thread expanism

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: Help with $.ajax() function

2008-09-23 Thread FrenchiINLA

try $.getJSON since you want to get json data somthing like
 $(document).ready(function(){
   $("#peep").click(function(){
.getJSON(url,   { request:'tes',message:'SupLawl' },   function(json)
{ alert(json.msg);   } );

});
});


On Sep 23, 6:57 pm, Bockit <[EMAIL PROTECTED]> wrote:
> Can't work this out myself so turning to others, chances are I'm
> missing something small, but let's see.
>
> I'm trying to use the $.ajax() function in my app, however it just
> isn't sending the GET data when I click on the link.
>
> $(document).ready(function(){
>                         $("#peep").click(function(){
>                                 $.ajax({
>                                         url: 
> "http://bockit.dyndns.org:8081/peep/servlet/peep";,
>                                         type: "GET",
>                                         dataType: "json",
>                                         data: "request=test&message=SupLawl",
>                                         error: function(){
>                                                 alert("woops");
>                                         },
>                                         success: function(json){
>                                                 alert("worked omg: " + 
> json.msg);
>                                         }
>                                 });
>                         });
>                 });
>
> Could anyone take a look at that and tell me what I'm doing wrong?
>
> At the moment the server isn't even registering a request, at all. If
> I manually type the url into the address bar, the server gets the
> request, and it runs through its motions properly, so I know the
> problem is somewhere in that code.


[jQuery] Help with $.ajax() function

2008-09-23 Thread Bockit

Can't work this out myself so turning to others, chances are I'm
missing something small, but let's see.

I'm trying to use the $.ajax() function in my app, however it just
isn't sending the GET data when I click on the link.

$(document).ready(function(){
$("#peep").click(function(){
$.ajax({
url: 
"http://bockit.dyndns.org:8081/peep/servlet/peep";,
type: "GET",
dataType: "json",
data: "request=test&message=SupLawl",
error: function(){
alert("woops");
},
success: function(json){
alert("worked omg: " + 
json.msg);
}
});
});
});

Could anyone take a look at that and tell me what I'm doing wrong?

At the moment the server isn't even registering a request, at all. If
I manually type the url into the address bar, the server gets the
request, and it runs through its motions properly, so I know the
problem is somewhere in that code.


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

2008-09-23 Thread Richard D. Worth
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:

jwysiwyg http://code.google.com/p/jwysiwyg/
WYMEditor http://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] Re: Dynamic created element doesn't respond to event

2008-09-23 Thread Richard D. Worth
See

http://docs.jquery.com/Frequently_Asked_Questions#Why_doesn.27t_an_event_work_on_a_new_element_I.27ve_created.3F

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:
> 
>   One
>   Two
>   Three
> 
>
> JS click event:
> $('a.clicked').click(function(){
>   alert('clicked');
> });
>
> JS dynamic loading:
> $(function(){
>
> addElement = function(){
>   $('ul').append('Four');
> }
>
> });
>
>
>
> 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: jQModal is "modaling" over target div content.

2008-09-23 Thread MorningZ

Is this in IE?

If so (even if not), try adding the parameter "toTop: true" to the jqm
declaration


helped me out here

http://groups.google.com/group/jquery-en/browse_thread/thread/a7b200301d36ce0f/6751840de0e969cc?


[jQuery] Re: jQuery noConflict breaks the galleria in IE 6 & 7

2008-09-23 Thread sutra

Any idea on this issue at all?

It works if NO no-conflict is used: http://teesworks.com/testIE.html

It breaks if no-conflict is used: 
http://teesworks.com/testIE-with-noconflict.html


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

2008-09-23 Thread jeremyBass

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 = ''+this.innerHTML+'';
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 = ''+this.innerHTML+'';
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 first time
around... any ideas on this?

thank you for the help
jeremyBass


On Sep 23, 5:16 pm, ricardobeat <[EMAIL PROTECTED]> wrote:
> There is no need for quotes as everything is already a string.
>
> Jeremy, you need to understand what's going on:
>
> $('[class^=Round_gen]').filter(function(){
> // checks for any element where the 'class' attribute starts with
> 'Round_gen'
>
>     return /Round_gen[0-9]+/.test( $(this).attr('class') );
> // 'test' is a method of the regular expression, that will test this
> element's attribute 'class' against it, returning true or false. there
> is no attribute called 'Round_gen'
>
> }).each(funct

[jQuery] Re: Superfish jQuery competing with other js files

2008-09-23 Thread Joel Birch

Hi Aaron,

LightWindow uses the Prototype library so you need to read up about
using jQuery with other libraries, here:
http://docs.jquery.com/Using_jQuery_with_Other_Libraries

That page will tell you everything you need to know so you can use
both libraries at the same time. However, a far better solution would
be to swap LightWindow for an equivalent plugin that uses jQuery as
its library, precluding the need to use Prototype at all (and saving
you having to include so much extra code). There are many to choose
from - Thickbox, Lightbox (jQuery version), Shadowbox, etc...

Joel Birch.


[jQuery] Re: Superfish - Disabling Animation

2008-09-23 Thread Joel Birch

2008/9/24 Charl Mert <[EMAIL PROTECTED]>:
> How do I disable animations in superfish?

$('ul.sf-menu').superfish({
speed: 1
});

This sets the animation speed (or "duration") to one microsecond which
is basically instantaneous.

Joel Birch.


[jQuery] Re: cross domain XML with ajax

2008-09-23 Thread Michael Geary

> 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: superfish menu only drops down

2008-09-23 Thread Joel Birch

I think I misunderstood the original question. @tsnj do a search for
the "Supposition" plugin. It was created to do exactly what you want.
It never left beta as I think there was still a minor bug that I
wasn't satisfied with but didn't get around to solving. You may find
it works fine for what you want though. At the very least, you or
anyone else are welcome to use the existing code and improve upon it.

Joel Birch.


[jQuery] Re: Getting Superfish menus to overlap in IE

2008-09-23 Thread Joel Birch

Great stuff Ricardo! Thanks for doing this.

Just a small warning: you said "which equals the element's index in
relation to its parent". Whilst this probably does work in most cases,
be aware that (as far as I know) DOM elements are not guaranteed to be
returned in the order they appear in the source (although they
probably are most of the time). I think there was a recent jquery-dev
thread discussing this.

@Aaron - I'm really interested to know if this solutions works - could
you please report back if Ricardo's code fixes your IE z-index
problem?

Cheers
Joel Birch.


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

2008-09-23 Thread MindstormsKid



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 , they have to be inside
> a block-level element. That's why getting a '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  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] product grid plugin

2008-09-23 Thread cc96ai

does jquery have any plugin like magento product grid ?
http://demo.magentocommerce.com/bed-and-bath/living-room


[jQuery] Getting page width to insert into body tag

2008-09-23 Thread bmclaughlin

Hello,
I am fairly new to jQuery so please keep that in mind

I have a css 2 column layout with a left side menu.

ex:
| //  |  |
|  menu  |content area  |
| //  |  |

On one of the pages there is a table for data that is dynamically
populated in the content area. Some times the table could be 500px
wide and other times it could be 5000px wide. Therefor the outer css
container, and browser, need to know the total page width.
The css 2 column layout falls down because it does not know how wide
to make things.

I was wondering if there was a way to use the dimensions plug in to
detirmine the width of the table, add the width of the left side (to
get the total width needed for the page) and inject that into the body
tag as width="".
This would tell the viewport that the page body is XXXpx wide,
allowing the css container to adjust and the browser window to provide
the horizontal scroll bar to allow users to slide over to view all the
data.

Thank you for your time.


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

2008-09-23 Thread mario

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:

   One
   Two
   Three


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

JS dynamic loading:
$(function(){

addElement = function(){
   $('ul').append('Four');
}

});



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] jQModal is "modaling" over target div content.

2008-09-23 Thread urbolutions

OK, this is kind of odd. Hopefully it is something relatively simple.

I have a div set with modal target and inner AJAX content target
defined as:



I have a JS Function with calls to jqModal as such:

$('#modalFormContainer').jqm({ajax: '../modules/dispatcher/index.php?
mod=content&op=modalForm', target: '#modalFormContainerContent',
modal: true, trigger: false});

$('#modalFormContainer').jqmShow();

The end effect is that the 50% black haze covers the div content and
prohibits clicking inside of the content area.

Anything obvious I am doing wrong here?

Thanks much!


[jQuery] cross domain XML with ajax

2008-09-23 Thread philosaur

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] Re: Getting Superfish menus to overlap in IE

2008-09-23 Thread ricardobeat

It's quite simple, the each() function already passes a variable to
the inner function, which equals the element's index in relation to is
parent.


--> this is index 0
--> index 1
--> 2 etc


What my code does is iterate over all the  elements and for each
one, give it the inline css property 'z-index' that equals 10 minus
the elements own index.

you could rewrite it like this with the same effect:

$('#menu li').each(function( llama ){
$(this).css( 'z-index' , (30 - llama) ); // will give matched li
elements a z-index of 30, 29, 28 and so on
});

I believe you won't have any problems running this code before
Superfish, it shouldn't overwrite the css.

cheers,
- ricardo

On Sep 23, 3:56 pm, Aaron <[EMAIL PROTECTED]> wrote:
> Two questions?
>
> Wouldn't I have to still pass a value for i for each instantiation of
> an li? Or do I not quite understand how this works? Basically could
> you explain how this works a little bit so that I fully understand the
> jQuery and JS behind it. I would really appreciate that.
>
> The other question is pretty close to the first question. For
> implementing this, I know I would most likely have to put this code
> after the superfish call in the document.ready part of the code? I
> believe I understand that the first post would be called with each li
> but it looks like it would be looking at the parent item instead of
> the brother items.
>
> I guess both questions really just fall to a little bit more
> explanation of how these functions would work, but thanks Ricardo! I
> have a couple other tasks to tackle right now but I will probably be
> able to give this a shot tomorrow and give more feedback then.
>
> ~Aaron
>
> On Sep 23, 2:09 pm, ricardobeat <[EMAIL PROTECTED]> wrote:
>
> > or better yet (thanks Eric!):
>
> > $('#menu li').each(function(i){
> >     $(this).css('z-index',10-i);
>
> > });
>
> > - ricardo
>
> > On Sep 23, 3:06 pm, ricardobeat <[EMAIL PROTECTED]> wrote:
>
> > > $('#menu li').each(function(){
> > >  var zindex = 10 - $(this).parent().find('li').index(this);
> > >  $(this).css('z-index',zindex);
>
> > > });
>
> > > On Sep 23, 10:12 am, Aaron <[EMAIL PROTECTED]> wrote:
>
> > > > Unfortunately I don't understand the jQuery enough to put something
> > > > like that together. Anyone else understand it enough to give this a
> > > > whirl?
>
> > > > Aaron
>
> > > > On Sep 22, 9:55 pm, "Joel Birch" <[EMAIL PROTECTED]> wrote:
>
> > > > > Your solution for fixing this incarnation of the IE z-index bug is
> > > > > actually the only one I have ever come across, so whilst it is hacky,
> > > > > it's probably as good as you are going to get. I guess a nifty bit of
> > > > > jQuery could make applying the z-indexes easier and keep the source
> > > > > HTML clean. If anyone wants to give that a go please share the
> > > > > results!
>
> > > > > Joel Birch.


[jQuery] Re: Get parent url and add to a textarea

2008-09-23 Thread ricardobeat

$('#message") returns a jQuery object, which is 'array-like' (as the
docs say). Arrays start at position zero, so [0] is asking for the
first element in the array (which happens to be the only one).

For example, $('#list li')[2] would give you the 3rd element from that
object. Note that this gives you a standard HTML element, with no
jQuery functions attached. 'value' is a native property.

Essentialy, $('#message')[0] or $('#message').get(0) or
document.getElementById('message') all return exactly the same.

- ricardo

On Sep 23, 12:13 pm, Stinhambo <[EMAIL PROTECTED]> wrote:
> Wow that's great and it works too! What is the square bracket and zero
> for?
>
> On Sep 23, 11:14 pm, BB <[EMAIL PROTECTED]> wrote:
>
> > The smallest thing would be:
>
> > $("#message")[0].value += window.opener.location.href;
>
> > On 23 Sep., 15:09, Stinhambo <[EMAIL PROTECTED]> wrote:
>
> > > I managed to achieve what I wanted with this -
>
> > > document.getElementById('message').value +=
> > > window.opener.location.href;
>
> > > in the jquery file but I can't work out the proper jquery way. I'd
> > > love to know!
>
> > > On Sep 23, 9:42 pm, Stinhambo <[EMAIL PROTECTED]> wrote:
>
> > > > Hi all!
>
> > > > I have some js that opens a popup window based on the rel attribute -
>
> > > > $('a[rel="email_page"]').click(function(){
>
> > > > window.open(this.href,'mywindow','height=580,width=400,scrollTo,resizable=0,scrollbars=0,location=0','false');
> > > >         return false;
> > > >     });
>
> > > > But what I want to achieve is to pass the parent url
> > > > (window.opener.href?) to the popup window and append the URL to the
> > > > contents of a textarea -
>
> > > > I wanted to
> > > > send you a link to - ** ADD URL HERE ** 
>
> > > > Any ideas?


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

2008-09-23 Thread ricardobeat

Hmm.

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.

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

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

On Sep 23, 6:45 pm, MindstormsKid <[EMAIL PROTECTED]> wrote:
> Here:  
> http://mindstormskid.googlepages.com/test.htmlhttp://mindstormskid.googlepages.com/test.html
> --
> View this message in 
> context:http://www.nabble.com/Find%28%29-doesn%27t-want-to-find-anything-out-...
> Sent from the jQuery General Discussion mailing list archive at Nabble.com.


[jQuery] Re: how to add elements to a jQuery object without copying it

2008-09-23 Thread Michael Geary

> From: ~flow
> 
> the second suggestion does work; however, the 
> pre-incrementing index has to be written as a 
> post-incrementing index, like this:
> 
>   var t = $( '.foo' );
>   var s = t;
>   t[ t.length++ ] = $Q( '.bar' )[ 0 ]; // should now like 
> like $ ( '.foo,.bar' )
>   assert( s === t, 'object identity broken' )
> 
> because we need exactly `t.length` as the target index, as 
> indices start at 0. (jQuery, unlike the standard Array 
> object, would not appear to accept assignments to unassigned 
> indices greater than the length of the object; if done, the 
> result is an `undefined`  value augmented to the jQuery 
> object, but the assignment's right hand side gets lost.)

That can't possibly be right (the part in parentheses). I think you're
misunderstanding a fundamental bit of JavaScript.

I didn't see what code you tried that failed, but if you still have it and
want to understand the *real* reason it failed, post it and I'll explain it.

If it's the code from Ricardo's message:

$foo[ ++$foo.length ] = $('.bar')[0];

then you're right, that needs to use a postincrement. But the reason it
doesn't work as expected is simply that it assigns into an array element
index one greater than it should.

-Mike



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

2008-09-23 Thread ricardobeat

There is no need for quotes as everything is already a string.

Jeremy, you need to understand what's going on:

$('[class^=Round_gen]').filter(function(){
// checks for any element where the 'class' attribute starts with
'Round_gen'

return /Round_gen[0-9]+/.test( $(this).attr('class') );
// 'test' is a method of the regular expression, that will test this
element's attribute 'class' against it, returning true or false. there
is no attribute called 'Round_gen'

}).each(function(){

 var n = $(this).attr('class').match(/[0-9]+/);
 // again, we are testing the CLASS attribute against the
regex, this will return the matched part (i.e the numbers in the
classname)

 //in here you also want your code for each element, $(n) is not gonna
do anything as n is just a number, use $(this)

});

hope it's clearer now!

- ricardo
On Sep 23, 6:13 pm, tlphipps <[EMAIL PROTECTED]> wrote:
> Just need some quotes around the class name (I forgot to include some
> quotes in my example too)
>
> This should work:
> $("[class^='Round_gen']")
>
> On Sep 23, 4:04 pm, jeremyBass <[EMAIL PROTECTED]> wrote:
>
> > So tring to get this going  I did
>
> > var n = '';
> > $('[class^=Round_gen]').filter(function(){
> >     return /Round_gen[1-9][0-9]+/.test( $(this).attr('Round_gen') 
> > );}).each(function(){
>
> >      var n = $(this).attr('Round_gen').match(/[0-9]+/);
>
> > });
>
> >  $('.Round_gen'+n+'').each(function() {...ect
>
> > and Got it picking up .Round_gen only ... not Round_gen9 or
> > Round_gen99
>
> > I think I'm close
> > thanks for the help...
> > jeremyBass
>
> > On Sep 23, 11:49 am, jeremyBass <[EMAIL PROTECTED]> wrote:
>
> > > So let say the class was named Round_gen9
>
> > > I'd replace
>
> > > $('.Round_gen9'').each(function() {etc
>
> > > with
>
> > > $('[class^=Round_gen]').filter(function(){
> > >     return /Round_gen[0-9]+/.Round_gen( $(this).attr('Round_gen') 
> > > );}).each(function(){
>
> > >      var n = $(this).attr('Round_gen').match(/[0-9]+/);
> > >          // the number after 'class' for current element});
>
> > >  $('n').each(function() {etc
>
> > > nothing is showing up... so I don't think this is fully right (I mean
> > > what I wrote)
> > > ideas??
>
> > > Thanks for the help here...
> > > jeremyBass
>
> > > On Sep 23, 11:26 am, ricardobeat <[EMAIL PROTECTED]> wrote:
>
> > > > Using [class^=class] is your best bet, the other option is to loop
> > > > over all the possibilities and that is a no-go. Coupled with the
> > > > filter function this will give you all elements with classX where X is
> > > > a number:
>
> > > > $('[class^=class]').filter(function(){
> > > >     return /class[0-9]+/.test( $(this).attr('class') 
> > > > );}).each(function(){
>
> > > >      var n = $(this).attr('class').match(/[0-9]+/); // the number
> > > > after 'class' for current element
>
> > > > });
>
> > > > hope this helps.
>
> > > > - ricardo


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

2008-09-23 Thread hubbs

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('Inserted from iFrame ');
>
> > 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('test');
>
> > > > > > 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

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

2008-09-23 Thread ricardobeat

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: Get Lightbox and Innerfade plugins work together

2008-09-23 Thread redcirce

Ricardo, I had tried this already but it did not help.  My
understanding of the "safe function" is that it works to avoid
conflicts between different libraries, ie. prototype and jquery.  Both
plugins/scripts (that I'm using at least) are jquery plugins.

Amine, I wondered whether you had had any success or had found another
solution?

On Sep 24, 5:14 am, ricardobeat <[EMAIL PROTECTED]> wrote:
> hi,
>
> you can wrap all of your code in a "safe function" to avoid conflicts
> with other libraries that use '$':
>
> (function($){
>
> // your jQuery code goes here
>
> })(jQuery);
>
> -ricardo
>
> On Sep 23, 5:32 am, "Amine CHRAIBI" <[EMAIL PROTECTED]> wrote:
>
> > Hey,
>
> > Thanks for your prompt answer, I will give it a try, even if it seems pretty
> > heavy. I'll get back to you if I still can't sole this out.
>
> > 2008/9/23 redcirce <[EMAIL PROTECTED]>
>
> > > Hello there.  I had a similar problem to yours, which I have just
> > > solved now.  I'm not sure if this is good coding or not, but it works
> > > which is enough for me.
>
> > > I was also using 2 plugins - lavalamp and coda-slider, both of which
> > > worked fine in isolation, but on the same page only the first plugin
> > > worked - the second of which did not.
>
> > > So this is how I fixed it:
>
> > > 1.  I created a copy of jquery.js and called it jquery2.js
> > > 2.  After the lavalamp scripts I called a second instance of jquery in
> > > the head for use with the coda-slider
> > > 3.  I then opened up jquery2.js and replaced all $ with $j2
> > > 4.  I opened all coda-slider scripts and as above, replaced all $ with
> > > $j2
>
> > > All of which looks like this:
>
> > > 
> > > 
>
> > > 
> > > 
> > > 
> > > 
> > >    $(function() { $(".lavaLamp").lavaLamp({ fx: "backout", speed:
> > > 700 })});
> > > 
>
> > > 
> > > 
>
> > > 
> > >  > > script>
> > >