[jQuery] Re: mery christmas!

2007-12-24 Thread Rey Bango


The same to you Feijo!! :D

Feijó wrote:

and great 2008 to ya'll !!
 
 
huge hug

baita abraço
Feijó
 


[jQuery] Re: (this).next problem

2007-12-24 Thread [EMAIL PROTECTED]

You'll need to do something along the lines of:

$('a.collapse_device').click(function() {
  $(this). // this gets the a.collapse_device itself
parent(). // this gets the span
parent(). // this gets the li
parent(). // this gets the ul
parent(). // this gets the div.device_header
next('div.device_content'). // *this* gets the div you're after
hide(); // this hides it
});

It's not that the a only knows about other a's as siblings ... it's
that siblings have to be at the same level in the HTML hierarchy,
which in this case they aren't. Your div.device_content is a sibling
of div.device_header; likewise, your ul is a sibling of your h2. Your
a doesn't in fact have any siblings.

Rebecca
http://blog.rebeccamurphey.com

On Dec 24, 1:56 pm, jody <[EMAIL PROTECTED]> wrote:
> hi all,
>
> I'm new to the list and new to jQuery, so I hope you can bear with me.
> I'm having a problem getting a specific div to hide without hiding
> similarly classed divs. The HTML looks something like this:
>
> 
> Device Name
> 
> - a> 
> 
> 
>  
> ---Device Information---
> 
>
> The jQuery I'd like to use looks like this:
>
> $('.collapse_device').click(function(){
> $(this).next('.device_content').hide() });
>
> If I write it as:
>
> $('.collapse_device').click(function(){
> $('.device_content').hide() });
>
> That works, but closes all the ".device_content" classes on the page
> and there could be, depending on the view, anywhere from 1-20 or
> more .device_content classes on the page.
>
> So, what am I doing wrong with (this).next and/or is there a better
> way to do what I'm trying to do? I've read around in the forums here
> and tried different methods but none seem to get at this exact
> problem. I've deduced that it may be to do with next requiring
> siblings--but I can't find clear documentation on just how strictly
> jQuery interprets the word "sibling"--if strictly, e.g. anchors are
> only siblings of anchors, then I can see the problem in that an anchor
> can't recognize the .device_content div as its sibling. But then I
> wonder if I'm thinking too hard about it?
>
> Thanks in advance,
> jody


[jQuery] Re: Problems with clueTip

2007-12-24 Thread KnoxBaby

Hello,

thanks for your help again. Thanks, I want to say that I didn't upload
the new "version" because it worked everything ...

Second, I want to ask you if you can add the possibility to split the
local content too if spitTitle is set because than I would not have a
redundant data as title again and again.

Than, to your solution about the link with the onclick="return
confirm(...)", I have to say: Is there another solution because I have
several links and every link has a tooltip with the same "style", but
another confirm message so I would have to use the same cluetip with
different confirm messages and that would be a little be redundant :(

thanks!!!


On Dec 24, 8:31 pm, Karl Swedberg <[EMAIL PROTECTED]> wrote:
> Okay, after investigating a bit more, I discovered that there is an
> error in the Metadata plugin that you're using.
>
> On line 95 the left curly bracket is not escaped in the regexp:
>
>   if ( !/^{/.test( data ) )
>
> it should be this:
>
>   if ( !/^\{/.test( data ) )
>
> Actually, that isn't what is causing this particular problem, so
> something else is going on there, too.  Regardless, the good news is
> that the SVN version of Metadata 2.0 does not change the contents of
> the element to [object object] when you use .wrapInner() on it. You
> can pick it up here:
>
> http://jqueryjs.googlecode.com/svn/tags/plugins/metadata/2.0/jquery.m...
>
> --Karl
> _
> Karl Swedberg
>
> On Dec 24, 2007, at 4:23 AM, KnoxBaby wrote:
>
>
>
> > WOW thanks, I try this ... the problem is: I need metadata plugin for
> > the table sorter to work correctly :( Do you think there's a nother
> > version of metadata, that would work?
>
> > jtip.js can be removed as it is only necesary on the login page!
> > Thanks for your effort, I hope, that the problem with the metadata
> > plugin can be fixed! that would be great :)
>
> > On Dec 24, 4:25 am, Karl Swedberg <[EMAIL PROTECTED]> wrote:
> >> The plot thickens!
>
>  I really don't know the reason ... tried everything. But one
>  question
>  more: When I use local content, I think the spiTitle option
>  should be
>  available for this too to split the local content into title/
>  content
>  or how to do that instead? thanks!
>
> >> I started plucking out other stuff that was on your page, and when I
> >> removed the metadata plugin, the problem magically vanished. Not sure
> >> why, but it looks like something breaks with your version of the
> >> metadata plugin and the .wrapInner() method. Can you try removing the
> >> metadata plugin from the page and testing again? Also, might as well
> >> remove jtip.js, just in case. I haven't tested in IE yet, but firefox
> >> stopped displaying [object object].
>
> >> Thanks, and sorry about the hassle.
>
> >> --Karl
> >> _
> >> Karl Swedberg
>
> >> On Dec 23, 2007, at 5:36 PM, KnoxBaby wrote:
>
> >>> oh I missed the link to my site:
> >>>http://www.jahlabs.de/jquery/test/
>
> >>> On 23 Dez., 22:39, KnoxBaby <[EMAIL PROTECTED]> wrote:
>  Thanks again for your great support and help, but it doesn't fix my
>  prob :(
>  Again my site:
>
>  it's the newest jquery file and cluetip comes from svn! I have
>  removed
>  the spitTitle but also when I try to use rel="asd.html" without
>  local:true and the asd.html is in the same directory, I have an
>  empty
>  tooltip ...
>
>  Now with the local content, the tooltip displays again [object
>  Object]
>  in Firefox and doesn't display the tooltip in IE :(
>
>  On 23 Dez., 22:13, Karl Swedberg <[EMAIL PROTECTED]> wrote:
>
> >> -In IE it shows sometimes in the status bar "errors on the page",
> >> and
> >> sometimes not ... I'm a little bit confused ...
> >> -In Firefox, Tooltips are shown correctly if I use title=""
> >> attribute
> >> and spitTitle in tpl/my_cluetips.js and without spitTitle and
> >> using
> >> local:true, it shows a tooltip with [object Object] as content
> >> -In IE, both options don't work and don't even show a tooltip
> >> with
> >> wrong content
> >> -in IE, the sorting of the table doesn't work on the columns with
> >> dates in it ...
>
> > Hi there. Looks like a problem with your script is causing a
> > JavaScript error in the clueTip code. I believe this error could
> > be
> > keeping the rest of your scripts from running on document.ready,
> > so
> > this could be the reason you're having all the other problems:
>
> >   $('a.help').cluetip({
> >   cluetipClass: 'jtip',
> >   arrows: true,
> >   dropShadow: false,
> >   leftOffset: 20,
> >   fx: {
> > open:   'fadeIn', // can be 'show' or
> > 'slideDown' or 'fadeIn'
> > openSpeed:  ''
> >   },
> >   local: true,
> >   

[jQuery] Re: Select elements in order

2007-12-24 Thread McLars

You should be able the use $(":header") selector to select all of the
headers simultaneously. I imagine they'd be stored in the document
order, but I haven't tried it.

Larry


On Dec 24, 9:23 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> I want to select some items on my page in the order they appear, but
> it seems that jQuery selects them in the order that my selectors are
> written instead. So:
>
> $('h1,h2,h3')
>
> gets me all the h1s, then all the h2s, then all the h3s. Is there a
> way to get them in the order they appear in my document instead?
> Barring that, it's almost like I need a way to say "select all the
> h2's after this h1 UNTIL you find another h1 or an h3 ... "
>
> Any help would be appreciated!!
>
> Rebeccahttp://blog.rebeccamurphey.com


[jQuery] local ajax development?

2007-12-24 Thread [EMAIL PROTECTED]

I am trying to pull in some data, but I can't get it to work when I
develop locally. I keep getting the following error:[Exception...
"'Permission denied to call method XMLHttpRequest.open' when calling
method: [nsIDOMEventListener::handleEvent]" nsresult: "0x8057001e
(NS_ERROR_XPC_JS_THREW_STRING)" location: "" data: no]

Any ideas?


[jQuery] Using JSONP...I'm clueless.

2007-12-24 Thread Ryura

Basically, I'm trying to pull data from a database on a different
server.

On the site without the database (we'll say http://thisdomain.com/index.html),
I have
var gomon = new Array();
gomon[0] = "Test";
gomon[1] = "Testx";
gomon[2] = "Test3";

$.ajax({
  type: "GET",
  url: "http://somedomain.net/jsonp/selection.php";,
  dataType: "jsonp",
  data: "foo="+gomon,
  success: function(gata){
  alert(gata.go[3]].repping)
}
});



selection.php basically is echoing this:
({
"go": [
{"zepping":"grrr","zamount":"1","zepped":"Ryura","tzme":"2"},
{"zepping":"garrr","zamount":"1","zepped":"Ryura","tzme":"2"},
{"zepping":"gsrrr","zamount":"1","zepped":"Ryura","tzme":"2"},
{"zepping":"grrrd","zamount":"1","zepped":"Ryura","tzme":"2"}
]
})

Now, when viewing thisdomain.com/index.html, Firebug gives me this
error:
[Exception... "'Permission denied to call method XMLHttpRequest.open'
when calling method: [nsIDOMEventListener::handleEvent]" nsresult:
"0x8057001e (NS_ERROR_XPC_JS_THREW_STRING)" location: ""
data: no]

And nothing executes. What did I do wrong?

Thanks,
Ryura


[jQuery] Re: Beginner help with highlight effect

2007-12-24 Thread Glen Lipka
Check out this page in the docs.
http://docs.jquery.com/Effects/animate

I am in the airport in Phoenix on public wifi, so I cant make a demo right
this sec.  But that page should help.

Glen

On Dec 24, 2007 8:35 AM, rics <[EMAIL PROTECTED]> wrote:

>
> Hello,
>
> I'm a PHP developer, but all this javascript thing is new to me. It's
> the first time I try to do something with javascript and I'm using
> JQuery to help me do things fast (and best).
>
> I wish to make some highlight effect, but can't figure it out by
> myself. Can you help me?
>
> I wish to click a checkbox and then "flash" a div using yellow
> background. I think I have to paint the div background with yellow and
> then fade to transparent again. Am I thinking correct? How can I do
> that?
>
> Thanks,
> rics, from Brazil.
>


[jQuery] Re: check if an id exists

2007-12-24 Thread Michael Geary
$('#id').size !== 0 would not work. I'll bet that your actual code has
.size() instead of .size without the parentheses, right? The size property
is a method, so the !== 0 test would always return true (since a function
reference is never equal to 0).
 
.length is slightly more efficient than .size() - look at the source code
for the .size method:
 
size: function() {
return this.length;
}
 
The only reason the size method exists at all is for compatibility with very
old jQuery code that may have used it back in the days when there was no
.length property.
 
-Mike



  _  

From: Alexey Blinov

Personally I do it with `$('#id').size !== 0` but length is goood to i think
:)


On Dec 24, 2007 5:55 PM, Cloudream <[EMAIL PROTECTED]> wrote: 



$('#id').length>0 ?


On Dec 24, 10:11pm, debussy007 < [EMAIL PROTECTED]> wrote:
>
> what is the best way in jquery to check wether an id exists ?



[jQuery] Re: check if an id exists

2007-12-24 Thread Michael Geary

$('#id').length may not be a boolean value, but $('#id').length>0 is.

However, in the contexts where you're likely to use this, it doesn't matter:

if( $('#id').length ) ...

or:

$('#id').length ? ... : ...

In either of those cases, the length property works fine for the test,
regardless of whether it's a boolean or a number.

> Well, just to split hairs, the length property returns a number, not a
> true boolean. You could also use:
> 
>   $('*').is('#myId')   or you can reverse it like so: $
> ('#myId').is('*')
> 
> The .is() method does return a boolean. An advantage is that you can
> apply this to a subset of elements, for example:
> 
>   $('a').is('#myId')

> > $('#id').length>0 ?

> > > what is the best way in jquery to check wether an id exists ?



[jQuery] mery christmas!

2007-12-24 Thread Feijó
and great 2008 to ya'll !!


huge hug
baita abraço
Feijó


[jQuery] Re: (this).next problem

2007-12-24 Thread Karl Swedberg


Hi Jody,

The .next() method only works for *sibling* elements. Let's take a  
look at your HTML again, but with another element added and with some  
indentation:



Device Name



-
New Link






---Device Information---


Now, the new link that I added is the next sibling of the link with  
class of "collapse_device". The h2 and the ul are siblings of each  
other, and  is a sibling of class="device_content">.


So, what you want to do is go "up" the DOM tree to an ancestor element  
of ; in particular, you want to go up to  
. Then you want to go "across" to the next  
element, which is , and hide that. So, it  
should look like this:


$('.collapse_device').click(function(){
$(this).parents('device_header').next('.device_content').hide()
});

Hope that helps.

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



On Dec 24, 2007, at 1:56 PM, jody wrote:



hi all,

I'm new to the list and new to jQuery, so I hope you can bear with me.
I'm having a problem getting a specific div to hide without hiding
similarly classed divs. The HTML looks something like this:


Device Name

- 



---Device Information---


The jQuery I'd like to use looks like this:

$('.collapse_device').click(function(){
$(this).next('.device_content').hide() });

If I write it as:

$('.collapse_device').click(function(){
$('.device_content').hide() });

That works, but closes all the ".device_content" classes on the page
and there could be, depending on the view, anywhere from 1-20 or
more .device_content classes on the page.

So, what am I doing wrong with (this).next and/or is there a better
way to do what I'm trying to do? I've read around in the forums here
and tried different methods but none seem to get at this exact
problem. I've deduced that it may be to do with next requiring
siblings--but I can't find clear documentation on just how strictly
jQuery interprets the word "sibling"--if strictly, e.g. anchors are
only siblings of anchors, then I can see the problem in that an anchor
can't recognize the .device_content div as its sibling. But then I
wonder if I'm thinking too hard about it?

Thanks in advance,
jody




[jQuery] Re: (this).next problem

2007-12-24 Thread Erik Beeson
Siblings are tags who have the same parent. For example:

.

bar and far are siblings, foo and wax are siblings, far and wax aren't
siblings.

Maybe try this:

$('.collapse_device').click(function() {
  $(this).parents('.device_header').next().hide();
});

That will walk up the hierarchy to an element with class device_header, then
find the next sibling of that, which is your device_content.

Hope it helps.

--Erik


On 12/24/07, jody <[EMAIL PROTECTED]> wrote:
>
>
> hi all,
>
> I'm new to the list and new to jQuery, so I hope you can bear with me.
> I'm having a problem getting a specific div to hide without hiding
> similarly classed divs. The HTML looks something like this:
>
> 
> Device Name
> 
> - a> 
> 
> 
> 
> ---Device Information---
> 
>
> The jQuery I'd like to use looks like this:
>
> $('.collapse_device').click(function(){
> $(this).next('.device_content').hide() });
>
> If I write it as:
>
> $('.collapse_device').click(function(){
> $('.device_content').hide() });
>
> That works, but closes all the ".device_content" classes on the page
> and there could be, depending on the view, anywhere from 1-20 or
> more .device_content classes on the page.
>
> So, what am I doing wrong with (this).next and/or is there a better
> way to do what I'm trying to do? I've read around in the forums here
> and tried different methods but none seem to get at this exact
> problem. I've deduced that it may be to do with next requiring
> siblings--but I can't find clear documentation on just how strictly
> jQuery interprets the word "sibling"--if strictly, e.g. anchors are
> only siblings of anchors, then I can see the problem in that an anchor
> can't recognize the .device_content div as its sibling. But then I
> wonder if I'm thinking too hard about it?
>
> Thanks in advance,
> jody
>


[jQuery] Re: Select elements in order

2007-12-24 Thread Erik Beeson
See my responses regarding this issue in this thread:

http://groups.google.com/group/jquery-en/browse_thread/thread/c21d5c20bfd25f6c/f42894299920f05d?lnk=gst

--Erik


On 12/24/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
>
> I want to select some items on my page in the order they appear, but
> it seems that jQuery selects them in the order that my selectors are
> written instead. So:
>
> $('h1,h2,h3')
>
> gets me all the h1s, then all the h2s, then all the h3s. Is there a
> way to get them in the order they appear in my document instead?
> Barring that, it's almost like I need a way to say "select all the
> h2's after this h1 UNTIL you find another h1 or an h3 ... "
>
> Any help would be appreciated!!
>
> Rebecca
> http://blog.rebeccamurphey.com
>


[jQuery] Thickbox Fixed Position?

2007-12-24 Thread blemming

Is it possible to fix the position of the thickbox? I have a client
that wants the thickbox exactly 115px off the top regardless of the
scrollbar position.  I tried to adjust the following css but I had
different results depending on the size of the thickbox. The problem
is that we have 3 different size thickbox implementations but they all
need to be fixed to the same position of top:115px;

#TB_window {
  position: fixed;
  background: url(img/popin_bg.jpg) top repeat-x #FF;
  z-index: 102;
  color:#00;
  display:none;
  border: 5px solid #ff9900;
  text-align:left;
  top:50%; <= I set that to a fixed size of 115px..
  left:50%;
}

Any thoughts would be greatly appreciated.

Best, David


[jQuery] (this).next problem

2007-12-24 Thread jody

hi all,

I'm new to the list and new to jQuery, so I hope you can bear with me.
I'm having a problem getting a specific div to hide without hiding
similarly classed divs. The HTML looks something like this:


Device Name

- 


 
---Device Information---


The jQuery I'd like to use looks like this:

$('.collapse_device').click(function(){
$(this).next('.device_content').hide() });

If I write it as:

$('.collapse_device').click(function(){
$('.device_content').hide() });

That works, but closes all the ".device_content" classes on the page
and there could be, depending on the view, anywhere from 1-20 or
more .device_content classes on the page.

So, what am I doing wrong with (this).next and/or is there a better
way to do what I'm trying to do? I've read around in the forums here
and tried different methods but none seem to get at this exact
problem. I've deduced that it may be to do with next requiring
siblings--but I can't find clear documentation on just how strictly
jQuery interprets the word "sibling"--if strictly, e.g. anchors are
only siblings of anchors, then I can see the problem in that an anchor
can't recognize the .device_content div as its sibling. But then I
wonder if I'm thinking too hard about it?

Thanks in advance,
jody


[jQuery] Re: Access denied to jQuery library

2007-12-24 Thread cFreed

Solved but remains puzzling.

It was with Vista, where the jQuery.js file was seen as missing
proprietary rights.
Copyied into another folder, it became accessible.
Then deleting the original file and moving the copy to the original
folder made it to work.
Don't understand why this was possible: which special characteristic
may the downloaded jQuery.js have?


[jQuery] Select elements in order

2007-12-24 Thread [EMAIL PROTECTED]

I want to select some items on my page in the order they appear, but
it seems that jQuery selects them in the order that my selectors are
written instead. So:

$('h1,h2,h3')

gets me all the h1s, then all the h2s, then all the h3s. Is there a
way to get them in the order they appear in my document instead?
Barring that, it's almost like I need a way to say "select all the
h2's after this h1 UNTIL you find another h1 or an h3 ... "

Any help would be appreciated!!

Rebecca
http://blog.rebeccamurphey.com


[jQuery] Re: MSIE 7.0 and slide() function...

2007-12-24 Thread Adam Greene

Hi Andrea,
I found that IE is really susceptible to displaying odd behavior based
off of the css properties of the element you are toggling.  I don't
have a sure-fire solution, but there are a few things you can try:
1) make sure the element you are toggling has no other css properties
2) make sure your floats are properly wrapped or have a clear element
below them
3) wrap the contents within the toggled element with a div
4) wrap the toggled element with a div

Again, I'm not an expert in this, so I'm hesitant to throw this out
there and cause you to bark up the wrong tree, but I've been in your
shoes and variations on these tricks worked for me (I believe it all
stems from IE's hasLayout hack)

Good luck,
Adam

On Dec 22, 11:12 am, ajma <[EMAIL PROTECTED]> wrote:
> Have you tried the Acordian control? It seems like that does what you
> want.
>
> On Dec 22, 1:52 am, andrea varnier <[EMAIL PROTECTED]> wrote:
>
> > Hi :)
> > I'm working on my website, just to practice a bit with jquery.
> > I have a problem here:http://www.andreavarnier.com/temp
>
> > menu code is like this
>
> > 
> > Home
> > Musica
> > 
> > audio
> >  > href="spartiti.html">spartiti
> > lezioni
> > 
> > 
> > Andrea
> > 
> >  > href="curriculum.html">curriculum
> > foto
> > video
> > 
> > 
> > Guestbook
> > Links
> > Contatti
> > 
>
> > and the js I'm using is fairly simple:
>
> > $(document).ready(function(){
> > $(".sub").css("display", "none");
> > $(".open_sub").click(function(){
> > var f = $(".open_sub").not(this);
> > f.children("ul.sub:visible").slideUp();
> > f.removeClass("active");
> > var t = $(this);
> > t.children("ul.sub").slideToggle();
> > t.toggleClass("active");
> > });
>
> > });
>
> > with Internet Explorer 7 the submenus do not disappear until the
> > slide() effect is over.
> > this means the 's are overlapping each other.
> > is there a known workaround? I searched this mailing list but I didn't
> > find anything...
> > thank you in advance :)
> > andrea


[jQuery] Beginner help with highlight effect

2007-12-24 Thread rics

Hello,

I'm a PHP developer, but all this javascript thing is new to me. It's
the first time I try to do something with javascript and I'm using
JQuery to help me do things fast (and best).

I wish to make some highlight effect, but can't figure it out by
myself. Can you help me?

I wish to click a checkbox and then "flash" a div using yellow
background. I think I have to paint the div background with yellow and
then fade to transparent again. Am I thinking correct? How can I do
that?

Thanks,
rics, from Brazil.


[jQuery] Re: unbind keypress for input boxes

2007-12-24 Thread Jeroen

On Dec 24, 2007 6:49 PM, Michael Geary <[EMAIL PROTECTED]> wrote:
>
> How does "the user is filling in a form" equate to "the mouse is over an
> input element"? Those seem like two quite different and unrelated things.
>
> I've watched a lot of people fill in forms, and quite often they will click
> in an input element and then move the mouse out of the way so they can see
> what they are typing. A few people (like me) will even fill in forms without
> ever having the mouse near an input element, by using the Tab key to
> navigate through the form.

Good point, I didn't think of using tab, focus is definitely the way to go.
However the unbinding of the keys is still a problem. I have the keys
assigned to the document, so they can be used everywhere. Like so:

$(document).keypress(function (e) {
if(e.which == "120" || e.which == "100") {
// do something
}
});

But when I focus (in this case) on an input field, textarea whatever,
I want it disabled because it will perform the action if the person
types in the specific key that is bound.

> I wonder if this might be closer to what you're looking for:
>
> $('input').focus( function(){...} ).blur( function(){...} );

This logic should work perfectly, but now for the part in between the
functions  to unbind  :)

Thanks in advance.

-- 
Jeroen


[jQuery] Need to make a class or plugin...

2007-12-24 Thread Alexey Blinov
Hi!
I have this code in my 'Learn jQuery' project...

$(document).ready(function() {
//try idle events
var _events = [[window, 'scroll'], [window, 'resize'], [document,
'mousemove'], [document, 'keydown']];
jQuery.each(_events, function(i, e) {
// console.log(e.toString());
$(e[0]).bind(e[1], function () {onActive()})
});

$(document).bind(
'state:idle',
function () {console.log('system idled')}
);

var _timer;
function onActive(){
// console.log('Neo, wake up!');
$(document).trigger('state:active');
clearTimeout(_timer)
_timer = setTimeout(function ()
{$(document).trigger('state:idle');}, 1);
}
});

not perfect, i know. I need help with this - i want it to become perfect and
i want it to make a jQuery plug-in or standalone class i can 'new' with time
parameter... Both tasks simple, i'm sure, but i can't do them.
Can anybody help?

BTW: short story - its something that allow me to check for user idle time
and do something in, say, 10 mins of inactivity (autologoff or discard
changes... of redirect him to Flickr/YouTube ;) )


[jQuery] Re: check if an id exists

2007-12-24 Thread McLars

Well, just to split hairs, the length property returns a number, not a
true boolean. You could also use:

  $('*').is('#myId')   or you can reverse it like so: $
('#myId').is('*')

The .is() method does return a boolean. An advantage is that you can
apply this to a subset of elements, for example:

  $('a').is('#myId')

Larry


On Dec 24, 7:55 am, Cloudream <[EMAIL PROTECTED]> wrote:
> $('#id').length>0 ?
>
> On Dec 24, 10:11 pm, debussy007 <[EMAIL PROTECTED]> wrote:
>
>
>
> > Hi,
>
> > what is the best way in jquery to check wether an id exists ?
>
> > Thank you for any kind help !!
> > --
> > View this message in 
> > context:http://www.nabble.com/check-if-an-id-exists-tp14488007s27240p14488007...
> > Sent from the jQuery General Discussion mailing list archive at 
> > Nabble.com.- Hide quoted text -
>
> - Show quoted text -


[jQuery] Re: check if an id exists

2007-12-24 Thread Alexey Blinov
Personally I do it with `$('#id').size !== 0` but length is goood to i think
:)

On Dec 24, 2007 5:55 PM, Cloudream <[EMAIL PROTECTED]> wrote:

>
> $('#id').length>0 ?
>
> On Dec 24, 10:11pm, debussy007 <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> > what is the best way in jquery to check wether an id exists ?
> >
> > Thank you for any kind help !!
> > --
> > View this message in context:
> http://www.nabble.com/check-if-an-id-exists-tp14488007s27240p14488007...
> > Sent from the jQuery General Discussion mailing list archive at
> Nabble.com.
>


[jQuery] Re: FlyDOM + New Input Field != New Field being Submitted

2007-12-24 Thread hj

On Dec 21, 3:15 pm, Bitruder <[EMAIL PROTECTED]> wrote:
> I'm using jQuery + FlyDOM to add new elements dynamically after page
> load to the DOM tree. I'm adding new input fields this way. They are
> clearly within  tags (added as children to a  within
> the  ). However, when I submit the form, only the pre-
> existing input fields get submitted and show up in PHP's $_POST
> variable.
>
> Any idea how to get the new input fields to submit as well?

Do the new elements each have a NAME attribute? Lack of NAME means
the element won't be submitted with the form.

Do the new elements have a DISABLED attribute? If DISABLED="disabled"
(or if the element's 'disabled' property is true), the element won't
be submitted
with the form


[jQuery] Re: Problems with clueTip

2007-12-24 Thread Karl Swedberg


Okay, after investigating a bit more, I discovered that there is an  
error in the Metadata plugin that you're using.


On line 95 the left curly bracket is not escaped in the regexp:

  if ( !/^{/.test( data ) )

it should be this:

  if ( !/^\{/.test( data ) )

Actually, that isn't what is causing this particular problem, so  
something else is going on there, too.  Regardless, the good news is  
that the SVN version of Metadata 2.0 does not change the contents of  
the element to [object object] when you use .wrapInner() on it. You  
can pick it up here:


http://jqueryjs.googlecode.com/svn/tags/plugins/metadata/2.0/jquery.metadata.js


--Karl
_
Karl Swedberg




On Dec 24, 2007, at 4:23 AM, KnoxBaby wrote:



WOW thanks, I try this ... the problem is: I need metadata plugin for
the table sorter to work correctly :( Do you think there's a nother
version of metadata, that would work?

jtip.js can be removed as it is only necesary on the login page!
Thanks for your effort, I hope, that the problem with the metadata
plugin can be fixed! that would be great :)

On Dec 24, 4:25 am, Karl Swedberg <[EMAIL PROTECTED]> wrote:

The plot thickens!

I really don't know the reason ... tried everything. But one  
question
more: When I use local content, I think the spiTitle option  
should be
available for this too to split the local content into title/ 
content

or how to do that instead? thanks!


I started plucking out other stuff that was on your page, and when I
removed the metadata plugin, the problem magically vanished. Not sure
why, but it looks like something breaks with your version of the
metadata plugin and the .wrapInner() method. Can you try removing the
metadata plugin from the page and testing again? Also, might as well
remove jtip.js, just in case. I haven't tested in IE yet, but firefox
stopped displaying [object object].

Thanks, and sorry about the hassle.

--Karl
_
Karl Swedberg

On Dec 23, 2007, at 5:36 PM, KnoxBaby wrote:




oh I missed the link to my site:
http://www.jahlabs.de/jquery/test/



On 23 Dez., 22:39, KnoxBaby <[EMAIL PROTECTED]> wrote:

Thanks again for your great support and help, but it doesn't fix my
prob :(
Again my site:



it's the newest jquery file and cluetip comes from svn! I have
removed
the spitTitle but also when I try to use rel="asd.html" without
local:true and the asd.html is in the same directory, I have an  
empty

tooltip ...



Now with the local content, the tooltip displays again [object
Object]
in Firefox and doesn't display the tooltip in IE :(



On 23 Dez., 22:13, Karl Swedberg <[EMAIL PROTECTED]> wrote:



-In IE it shows sometimes in the status bar "errors on the page",
and
sometimes not ... I'm a little bit confused ...
-In Firefox, Tooltips are shown correctly if I use title=""
attribute
and spitTitle in tpl/my_cluetips.js and without spitTitle and  
using

local:true, it shows a tooltip with [object Object] as content
-In IE, both options don't work and don't even show a tooltip  
with

wrong content
-in IE, the sorting of the table doesn't work on the columns with
dates in it ...



Hi there. Looks like a problem with your script is causing a
JavaScript error in the clueTip code. I believe this error could  
be
keeping the rest of your scripts from running on document.ready,  
so

this could be the reason you're having all the other problems:



  $('a.help').cluetip({
  cluetipClass: 'jtip',
  arrows: true,
  dropShadow: false,
  leftOffset: 20,
  fx: {
open:   'fadeIn', // can be 'show' or
'slideDown' or 'fadeIn'
openSpeed:  ''
  },
  local: true,
  hideLocal: true,
  splitTitle: '|'  // this is the problem option.
  });


Here you're using the splitTitle option as well as the local  
option.

You can only have one or the other. Also, those links don't have a
title attribute, and that is what is causing the error. The plugin
should really handle that more gracefully. In fact, the svn  
version
has fixed it as of November 27 ("clueTip: fixed error (reported  
athttp://jquery.com/plugins/node/941)

when splitTitle is used and title attribute is empty."). If you
want
to use the splitTitle option, you'll need a title attribute to
split. ;-) If you want to use local content, remove the splitTitle
option.



-whgen the tooltips are shown and you click the delete link and
click
on "abort", the link is clicked even though the browser should
"stop"



This is because you need to attach the event handler to the abort
link
after the clueTip is populated with the content. Actually, if  
you're

using local content and jQuery 1.2.x, it should work. Otherwise,
you're going to have to re-bind the click event to the link. Shawn
Grover wrote an excellent blog entry on "Using the jQuery clueTip
plugin with dynamic content" (thanks, Shawn!!), which might give 

[jQuery] Re: unbind keypress for input boxes

2007-12-24 Thread Michael Geary

How does "the user is filling in a form" equate to "the mouse is over an
input element"? Those seem like two quite different and unrelated things.

I've watched a lot of people fill in forms, and quite often they will click
in an input element and then move the mouse out of the way so they can see
what they are typing. A few people (like me) will even fill in forms without
ever having the mouse near an input element, by using the Tab key to
navigate through the form.

I wonder if this might be closer to what you're looking for:

$('input').focus( function(){...} ).blur( function(){...} );

-Mike

> From: Jeroen
> 
> I have a few keys bound to a function, but I want it to be 
> temporary disabled when a user is filling in a form.
> 
> I thought this would do it:
> 
>   $('input').hover( function() {
>   $('input').unbind("keypress");
>   }, function() {
>   // Rebind stuff
>   });
> 
> But it's not working. What am I doing wrong here?



[jQuery] Re: check if an id exists

2007-12-24 Thread Michael Geary

That won't work because $() *always* returns a valid jQuery object even if
there are no matching elements. This allows you to write code like
$('.foo').hide() without worrying about whether there are any elements with
class="foo" or not.

Instead (as pointed out elsewhere in the thread), check the .length
property.

> not sure, this is untested but might work(not sure what 
> jQuery return if nothing is found)
> 
> if($('#id'))
> {
> //it exists
> }
> else
> {
> //it does not
> }

> > what is the best way in jquery to check wether an id exists ?



[jQuery] Re: Problem with toggle

2007-12-24 Thread Karl Swedberg


But i am not getting the desired functionality of toggling. Please  
help


Like Josh, I can't help much without seeing html, but I would suggest  
using .show() and .hide() rather than .css('display',...).


FF uses (the more appropriate) display: table-row for  elements,  
so setting to display: block will most likely produce some funky  
results.


So, change ...$($trId).css("display","");

to ...
$($trId).show();

And change ...
$($trId).css("display","none");

to ...
$($trId).hide();

Also, I wonder if this is working correctly:


  var $trId = "#myTrId" + $("[EMAIL PROTECTED]'imgId']").index(this);



If you're using FF with Firebug, check what the value of $trId is by  
adding this line after the one above (and then checking the console):


console.log($trId);

Otherwise, just use an alert:

alert($trId);

In what ways is it failing? Is it producing a JavaScript error?

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



On Dec 24, 2007, at 12:21 PM, Josh Nathanson wrote:



Try changing this:
$($trId).css("display","");

To this:
$($trId).css("display","block");

Don't know if that's the whole problem, kinda hard to tell without  
seeing the html, but it's a start.


-- Josh

- Original Message - From: "JQueryProgrammer" <[EMAIL PROTECTED] 
>

To: "jQuery (English)" 
Sent: Monday, December 24, 2007 5:17 AM
Subject: [jQuery] Problem with toggle




I am facing an issue with the toogle API. I have a tr with dynamic
Id's as Id1, Id2 etc. Within that tr I have many td's in which  
one

td has an image which needs to be toggled to plus image and minus
image. That is when I click on the image, it should toggle between
plus and minus images. Also when the image is clicked another tr
should be displayed and hidden accordingly. That means a tr within a
tr and the outer tr has an image. I was trying to write the code as:

$("[EMAIL PROTECTED]'myImgId']").toggle(
  function() {
  var $trId = "#myTrId" + $("[EMAIL PROTECTED]'imgId']").index(this);
  $($trId).css("display","");
  $(this).attr("src","minus.jpg");
  },
  function() {
  var $trId = "#myTrId" + $("[EMAIL PROTECTED]'imgId']").index(this);
  $($trId).css("display","none");
  $(this).attr("src","plus.jpg");
  }
);

But i am not getting the desired functionality of toggling. Please  
help






[jQuery] Re: Problem with toggle

2007-12-24 Thread Josh Nathanson


Try changing this:
$($trId).css("display","");

To this:
$($trId).css("display","block");

Don't know if that's the whole problem, kinda hard to tell without seeing 
the html, but it's a start.


-- Josh

- Original Message - 
From: "JQueryProgrammer" <[EMAIL PROTECTED]>

To: "jQuery (English)" 
Sent: Monday, December 24, 2007 5:17 AM
Subject: [jQuery] Problem with toggle




I am facing an issue with the toogle API. I have a tr with dynamic
Id's as Id1, Id2 etc. Within that tr I have many td's in which one
td has an image which needs to be toggled to plus image and minus
image. That is when I click on the image, it should toggle between
plus and minus images. Also when the image is clicked another tr
should be displayed and hidden accordingly. That means a tr within a
tr and the outer tr has an image. I was trying to write the code as:

$("[EMAIL PROTECTED]'myImgId']").toggle(
   function() {
   var $trId = "#myTrId" + $("[EMAIL PROTECTED]'imgId']").index(this);
   $($trId).css("display","");
   $(this).attr("src","minus.jpg");
   },
   function() {
   var $trId = "#myTrId" + $("[EMAIL PROTECTED]'imgId']").index(this);
   $($trId).css("display","none");
   $(this).attr("src","plus.jpg");
   }
);

But i am not getting the desired functionality of toggling. Please help 




[jQuery] Re: Problems with clueTip

2007-12-24 Thread Karl Swedberg




Ok I got it to work with verion 1.0:

http://jqueryjs.googlecode.com/svn/tags/plugins/metadata/1.0/jquery.metadata.pack.js


I just looked at your test page, and the tips are still showing  
[object object]. Did you change it back?


Until this bug is fixed, you might want to just change lines 251 and  
252 in jquery.cluetip.js, removing the .wrapInner() method:


Change this ...

var localCluetip = $.fn.wrapInner ?  
$localContent.wrapInner('').children().clone(true) :  
$localContent.html();
$.fn.wrapInner ? $cluetipInner.empty().append(localCluetip) :  
$cluetipInner.html(localCluetip);


to this ...

var localCluetip = $localContent.html();
$cluetipInner.html(localCluetip);


This way you should be able to use both the metadata plugin and the  
clueTip plugin.




so now, I just need the opportunity to split the local content into
title and content of the tooltip :)


Rather than splitting the local content, can you simply put the  
content for the clueTip title into the title attribute of the link?  
That's the way it's intended to work. So, it would look like this:


alt="" />



Further: I don't understand why the link is followed even though I
click on abort on the confirming message (but only n Firefox and when
the tooltip is displayed ..)?


I totally misunderstood this question before. You're referring to the  
onclick handler on the link itself, aren't you? I thought you might be  
referring to a link inside the clueTip contents.


Here is what I would do for that:

1. remove the "onclick" stuff from the HTML. It plays nicer and is  
less obtrusive when you include the all your event handling in a  
separate file.


2. add .click(fn) to the $('a.help') selector. So, it would looke  
something like this:


$('a.help')
.cluetip({
cluetipClass: 'jtip',
arrows: true,
dropShadow: false,
positionBy: 'auto',
leftOffset: 20,
fx: {
open:   'fadeIn', // can be 'show' or 'slideDown' or  
'fadeIn'

openSpeed:  ''
},
local: true
})
.click(function() {
return confirm('Diese News wirklich löschen?');
});


I don't know how much more time I'm going to have to help you until  
the 26th, so if I don't reply again before then, best wishes and Happy  
Holidays!


--Karl
_
Karl Swedberg


On Dec 24, 2007, at 7:20 AM, KnoxBaby wrote:



Ok I got it to work with verion 1.0:

http://jqueryjs.googlecode.com/svn/tags/plugins/metadata/1.0/jquery.metadata.pack.js

so now, I just need the opportunity to split the local content into
title and content of the tooltip :)

Further: I don't understand why the link is followed even though I
click on abort on the confirming message (but only n Firefox and when
the tooltip is displayed ..)?

thanks!

On 24 Dez., 04:25, Karl Swedberg <[EMAIL PROTECTED]> wrote:

The plot thickens!

I really don't know the reason ... tried everything. But one  
question
more: When I use local content, I think the spiTitle option  
should be
available for this too to split the local content into title/ 
content

or how to do that instead? thanks!


I started plucking out other stuff that was on your page, and when I
removed the metadata plugin, the problem magically vanished. Not sure
why, but it looks like something breaks with your version of the
metadata plugin and the .wrapInner() method. Can you try removing the
metadata plugin from the page and testing again? Also, might as well
remove jtip.js, just in case. I haven't tested in IE yet, but firefox
stopped displaying [object object].

Thanks, and sorry about the hassle.

--Karl
_
Karl Swedberg

On Dec 23, 2007, at 5:36 PM, KnoxBaby wrote:




oh I missed the link to my site:
http://www.jahlabs.de/jquery/test/



On 23 Dez., 22:39, KnoxBaby <[EMAIL PROTECTED]> wrote:

Thanks again for your great support and help, but it doesn't fix my
prob :(
Again my site:



it's the newest jquery file and cluetip comes from svn! I have
removed
the spitTitle but also when I try to use rel="asd.html" without
local:true and the asd.html is in the same directory, I have an  
empty

tooltip ...



Now with the local content, the tooltip displays again [object
Object]
in Firefox and doesn't display the tooltip in IE :(



On 23 Dez., 22:13, Karl Swedberg <[EMAIL PROTECTED]> wrote:



-In IE it shows sometimes in the status bar "errors on the page",
and
sometimes not ... I'm a little bit confused ...
-In Firefox, Tooltips are shown correctly if I use title=""
attribute
and spitTitle in tpl/my_cluetips.js and without spitTitle and  
using

local:true, it shows a tooltip with [object Object] as content
-In IE, both options don't work and don't even show a tooltip  
with

wrong content
-in IE, the sorting of the table doesn't work on the columns with
dates in it ...



Hi there. Looks like a problem with your script is causing a
JavaScript error in the clueTip code. I believe this error coul

[jQuery] unbind keypress for input boxes

2007-12-24 Thread Jeroen

Hi,

I have a few keys bound to a function, but I want it to be temporary
disabled when
a user is filling in a form.

I thought this would do it:

$('input').hover( function() {
$('input').unbind("keypress");
}, function() {
// Rebind stuff
});

But it's not working. What am I doing wrong here?

Happy holidays!

-- 
Jeroen


[jQuery] Re: check if an id exists

2007-12-24 Thread Cloudream

$('#id').length>0 ?

On Dec 24, 10:11 pm, debussy007 <[EMAIL PROTECTED]> wrote:
> Hi,
>
> what is the best way in jquery to check wether an id exists ?
>
> Thank you for any kind help !!
> --
> View this message in 
> context:http://www.nabble.com/check-if-an-id-exists-tp14488007s27240p14488007...
> Sent from the jQuery General Discussion mailing list archive at Nabble.com.


[jQuery] Problem with toggle

2007-12-24 Thread JQueryProgrammer

I am facing an issue with the toogle API. I have a tr with dynamic
Id's as Id1, Id2 etc. Within that tr I have many td's in which one
td has an image which needs to be toggled to plus image and minus
image. That is when I click on the image, it should toggle between
plus and minus images. Also when the image is clicked another tr
should be displayed and hidden accordingly. That means a tr within a
tr and the outer tr has an image. I was trying to write the code as:

$("[EMAIL PROTECTED]'myImgId']").toggle(
function() {
var $trId = "#myTrId" + $("[EMAIL PROTECTED]'imgId']").index(this);
$($trId).css("display","");
$(this).attr("src","minus.jpg");
},
function() {
var $trId = "#myTrId" + $("[EMAIL PROTECTED]'imgId']").index(this);
$($trId).css("display","none");
$(this).attr("src","plus.jpg");
}
);

But i am not getting the desired functionality of toggling. Please help


[jQuery] Re: check if an id exists

2007-12-24 Thread debussy007


Thanks this works great !!


Richard D. Worth-2 wrote:
> 
> From:
> 
> http://docs.jquery.com/Frequently_Asked_Questions#How_do_I_test_whether_an_element_exists.3F
> 
> if ( $('#theId').length ) {
>   // exists
> } else {
>   // doesn't exist
> }
> 
> - Richard
> 
> On Dec 24, 2007 9:11 AM, debussy007 <[EMAIL PROTECTED]> wrote:
> 
>>
>>
>> Hi,
>>
>> what is the best way in jquery to check wether an id exists ?
>>
>> Thank you for any kind help !!
>> --
>> View this message in context:
>> http://www.nabble.com/check-if-an-id-exists-tp14488007s27240p14488007.html
>> Sent from the jQuery General Discussion mailing list archive at
>> Nabble.com
>> .
>>
>>
> 
> 

-- 
View this message in context: 
http://www.nabble.com/check-if-an-id-exists-tp14488007s27240p14488585.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: check if an id exists

2007-12-24 Thread Richard D. Worth
From:

http://docs.jquery.com/Frequently_Asked_Questions#How_do_I_test_whether_an_element_exists.3F

if ( $('#theId').length ) {
  // exists
} else {
  // doesn't exist
}

- Richard

On Dec 24, 2007 9:11 AM, debussy007 <[EMAIL PROTECTED]> wrote:

>
>
> Hi,
>
> what is the best way in jquery to check wether an id exists ?
>
> Thank you for any kind help !!
> --
> View this message in context:
> http://www.nabble.com/check-if-an-id-exists-tp14488007s27240p14488007.html
> Sent from the jQuery General Discussion mailing list archive at Nabble.com
> .
>
>


[jQuery] Re: check if an id exists

2007-12-24 Thread debussy007


(the error is "elem has no properties" in the jquery js)


debussy007 wrote:
> 
> I tried :
> if( ! $('#tooltip') ) {
> ...
> }
> 
> it gives me a javascript error if I add this :(
> 
> 
> 
> 
> 
> Eridius wrote:
>> 
>> not sure, this is untested but might work(not sure what jQuery return if
>> nothing is found)
>> 
>> if($('#id'))
>> {
>> //it exists
>> }
>> else
>> {
>> //it does not
>> }
>> 
>> debussy007 wrote:
>>> 
>>> Hi,
>>> 
>>> what is the best way in jquery to check wether an id exists ?
>>> 
>>> Thank you for any kind help !!
>>> 
>> 
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/check-if-an-id-exists-tp14488007s27240p14488143.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: check if an id exists

2007-12-24 Thread debussy007


I tried :
if( ! $('#tooltip') ) {
...
}

it gives me a javascript error if I add this :(





Eridius wrote:
> 
> not sure, this is untested but might work(not sure what jQuery return if
> nothing is found)
> 
> if($('#id'))
> {
> //it exists
> }
> else
> {
> //it does not
> }
> 
> debussy007 wrote:
>> 
>> Hi,
>> 
>> what is the best way in jquery to check wether an id exists ?
>> 
>> Thank you for any kind help !!
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/check-if-an-id-exists-tp14488007s27240p14488142.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: check if an id exists

2007-12-24 Thread Eridius


not sure, this is untested but might work(not sure what jQuery return if
nothing is found)

if($('#id'))
{
//it exists
}
else
{
//it does not
}

debussy007 wrote:
> 
> Hi,
> 
> what is the best way in jquery to check wether an id exists ?
> 
> Thank you for any kind help !!
> 

-- 
View this message in context: 
http://www.nabble.com/check-if-an-id-exists-tp14488007s27240p14488089.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: Filter out innerhtml of div #id

2007-12-24 Thread Flesler

try removing the get(0)

Ariel Flesler

On Dec 24, 6:21 am, KnoxBaby <[EMAIL PROTECTED]> wrote:
> ahh, this would be a nice idea, than it would work like the code is on
> the page itself :) I try this, thanks :)
>
> On Dec 24, 1:21 am, "Glen Lipka" <[EMAIL PROTECTED]> wrote:
>
>
>
> > Are you trying to get it while its in the variable?  Maybe put the html into
> > a dom element first, like
>
> > $("div#someHiddenDiv").append(str);
> > thingyouwant = $("div#content").html();
>
> > Does this help?
>
> > Glen
>
> > On Dec 22, 2007 7:30 PM, psy* <[EMAIL PROTECTED]> wrote:
>
> > > Hello,
>
> > > I have a full html code in in a var:
>
> > > str = 'full html code here starting with ';
>
> > > and now I want to get the innerHTML of a div with an certain id. I tried
> > > that:
>
> > > $(var_name).filter('div#content').get(0).html()
>
> > > but that doesn't work. What's the right way??
>
> > > thanks!- Hide quoted text -
>
> - Show quoted text -


[jQuery] check if an id exists

2007-12-24 Thread debussy007


Hi,

what is the best way in jquery to check wether an id exists ?

Thank you for any kind help !!
-- 
View this message in context: 
http://www.nabble.com/check-if-an-id-exists-tp14488007s27240p14488007.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: Problems with clueTip

2007-12-24 Thread KnoxBaby

OK I tried it, and it works without the metadata ... But I need a
working version of metadata for tablesorter plugin ... What to do
now??

Further: How to split the content of the local div (like the title
attribute) so that I can have a local content:

"title|content" and it's splitted for the tooltip??

On 24 Dez., 04:25, Karl Swedberg <[EMAIL PROTECTED]> wrote:
> The plot thickens!
>
> >> I really don't know the reason ... tried everything. But one question
> >> more: When I use local content, I think the spiTitle option should be
> >> available for this too to split the local content into title/content
> >> or how to do that instead? thanks!
>
> I started plucking out other stuff that was on your page, and when I
> removed the metadata plugin, the problem magically vanished. Not sure
> why, but it looks like something breaks with your version of the
> metadata plugin and the .wrapInner() method. Can you try removing the
> metadata plugin from the page and testing again? Also, might as well
> remove jtip.js, just in case. I haven't tested in IE yet, but firefox
> stopped displaying [object object].
>
> Thanks, and sorry about the hassle.
>
> --Karl
> _
> Karl Swedberg
>
> On Dec 23, 2007, at 5:36 PM, KnoxBaby wrote:
>
>
>
> > oh I missed the link to my site:
> >http://www.jahlabs.de/jquery/test/
>
> > On 23 Dez., 22:39, KnoxBaby <[EMAIL PROTECTED]> wrote:
> >> Thanks again for your great support and help, but it doesn't fix my
> >> prob :(
> >> Again my site:
>
> >> it's the newest jquery file and cluetip comes from svn! I have
> >> removed
> >> the spitTitle but also when I try to use rel="asd.html" without
> >> local:true and the asd.html is in the same directory, I have an empty
> >> tooltip ...
>
> >> Now with the local content, the tooltip displays again [object
> >> Object]
> >> in Firefox and doesn't display the tooltip in IE :(
>
> >> On 23 Dez., 22:13, Karl Swedberg <[EMAIL PROTECTED]> wrote:
>
>  -In IE it shows sometimes in the status bar "errors on the page",
>  and
>  sometimes not ... I'm a little bit confused ...
>  -In Firefox, Tooltips are shown correctly if I use title=""
>  attribute
>  and spitTitle in tpl/my_cluetips.js and without spitTitle and using
>  local:true, it shows a tooltip with [object Object] as content
>  -In IE, both options don't work and don't even show a tooltip with
>  wrong content
>  -in IE, the sorting of the table doesn't work on the columns with
>  dates in it ...
>
> >>> Hi there. Looks like a problem with your script is causing a
> >>> JavaScript error in the clueTip code. I believe this error could be
> >>> keeping the rest of your scripts from running on document.ready, so
> >>> this could be the reason you're having all the other problems:
>
> >>>$('a.help').cluetip({
> >>>cluetipClass: 'jtip',
> >>>arrows: true,
> >>>dropShadow: false,
> >>>leftOffset: 20,
> >>>fx: {
> >>>  open:   'fadeIn', // can be 'show' or
> >>> 'slideDown' or 'fadeIn'
> >>>  openSpeed:  ''
> >>>},
> >>>local: true,
> >>>hideLocal: true,
> >>>splitTitle: '|'  // this is the problem option.
> >>>});
>
> >>> Here you're using the splitTitle option as well as the local option.
> >>> You can only have one or the other. Also, those links don't have a
> >>> title attribute, and that is what is causing the error. The plugin
> >>> should really handle that more gracefully. In fact, the svn version
> >>> has fixed it as of November 27 ("clueTip: fixed error (reported 
> >>> athttp://jquery.com/plugins/node/941)
> >>>  when splitTitle is used and title attribute is empty."). If you
> >>> want
> >>> to use the splitTitle option, you'll need a title attribute to
> >>> split. ;-) If you want to use local content, remove the splitTitle
> >>> option.
>
>  -whgen the tooltips are shown and you click the delete link and
>  click
>  on "abort", the link is clicked even though the browser should
>  "stop"
>
> >>> This is because you need to attach the event handler to the abort
> >>> link
> >>> after the clueTip is populated with the content. Actually, if you're
> >>> using local content and jQuery 1.2.x, it should work. Otherwise,
> >>> you're going to have to re-bind the click event to the link. Shawn
> >>> Grover wrote an excellent blog entry on "Using the jQuery clueTip
> >>> plugin with dynamic content" (thanks, Shawn!!), which might give you
> >>> some ideas:http://grover.open2space.com/node/191
>
> >>> I'm planning to package up the last month's improvements/bug fixes
> >>> into a new release within the next few days. In the meantime, if you
> >>> want to grab the version from svn, feel free.
>
> >>>http://jqueryjs.googlecode.com/svn/trunk/plugins/cluetip/
>
> >>> If you want to stick with the version you have, then fix that 

[jQuery] Access denied to jQuery library

2007-12-24 Thread cFreed

Having installed jQuery on my main development machine, it works fine.
But from another machine, through the network, if I call a .htm page
which uses jQuery, I get a "403 Forbidden" error, with "You don't have
permission to access ...my path through network.../jQuery 1.2.1/
jquery.js".
All the other .js files used are correctly loaded.

I wonder what may happen...?
TIA for any comment.


[jQuery] Re: general unique id for new append element

2007-12-24 Thread Byron

you could use $.data() to get a unique id, something like:

$.extend($.fn, {
  id : function () {
return this.each(function () {
  $(this).attr("id", "jQuery_" + $.data(this));
});
  }
});

example usage :

$('').id().appendTo('body');


result :


hope this helps :)



[jQuery] Re: Problems with clueTip

2007-12-24 Thread KnoxBaby

WOW thanks, I try this ... the problem is: I need metadata plugin for
the table sorter to work correctly :( Do you think there's a nother
version of metadata, that would work?

jtip.js can be removed as it is only necesary on the login page!
Thanks for your effort, I hope, that the problem with the metadata
plugin can be fixed! that would be great :)

On Dec 24, 4:25 am, Karl Swedberg <[EMAIL PROTECTED]> wrote:
> The plot thickens!
>
> >> I really don't know the reason ... tried everything. But one question
> >> more: When I use local content, I think the spiTitle option should be
> >> available for this too to split the local content into title/content
> >> or how to do that instead? thanks!
>
> I started plucking out other stuff that was on your page, and when I
> removed the metadata plugin, the problem magically vanished. Not sure
> why, but it looks like something breaks with your version of the
> metadata plugin and the .wrapInner() method. Can you try removing the
> metadata plugin from the page and testing again? Also, might as well
> remove jtip.js, just in case. I haven't tested in IE yet, but firefox
> stopped displaying [object object].
>
> Thanks, and sorry about the hassle.
>
> --Karl
> _
> Karl Swedberg
>
> On Dec 23, 2007, at 5:36 PM, KnoxBaby wrote:
>
>
>
> > oh I missed the link to my site:
> >http://www.jahlabs.de/jquery/test/
>
> > On 23 Dez., 22:39, KnoxBaby <[EMAIL PROTECTED]> wrote:
> >> Thanks again for your great support and help, but it doesn't fix my
> >> prob :(
> >> Again my site:
>
> >> it's the newest jquery file and cluetip comes from svn! I have
> >> removed
> >> the spitTitle but also when I try to use rel="asd.html" without
> >> local:true and the asd.html is in the same directory, I have an empty
> >> tooltip ...
>
> >> Now with the local content, the tooltip displays again [object
> >> Object]
> >> in Firefox and doesn't display the tooltip in IE :(
>
> >> On 23 Dez., 22:13, Karl Swedberg <[EMAIL PROTECTED]> wrote:
>
>  -In IE it shows sometimes in the status bar "errors on the page",
>  and
>  sometimes not ... I'm a little bit confused ...
>  -In Firefox, Tooltips are shown correctly if I use title=""
>  attribute
>  and spitTitle in tpl/my_cluetips.js and without spitTitle and using
>  local:true, it shows a tooltip with [object Object] as content
>  -In IE, both options don't work and don't even show a tooltip with
>  wrong content
>  -in IE, the sorting of the table doesn't work on the columns with
>  dates in it ...
>
> >>> Hi there. Looks like a problem with your script is causing a
> >>> JavaScript error in the clueTip code. I believe this error could be
> >>> keeping the rest of your scripts from running on document.ready, so
> >>> this could be the reason you're having all the other problems:
>
> >>>$('a.help').cluetip({
> >>>cluetipClass: 'jtip',
> >>>arrows: true,
> >>>dropShadow: false,
> >>>leftOffset: 20,
> >>>fx: {
> >>>  open:   'fadeIn', // can be 'show' or
> >>> 'slideDown' or 'fadeIn'
> >>>  openSpeed:  ''
> >>>},
> >>>local: true,
> >>>hideLocal: true,
> >>>splitTitle: '|'  // this is the problem option.
> >>>});
>
> >>> Here you're using the splitTitle option as well as the local option.
> >>> You can only have one or the other. Also, those links don't have a
> >>> title attribute, and that is what is causing the error. The plugin
> >>> should really handle that more gracefully. In fact, the svn version
> >>> has fixed it as of November 27 ("clueTip: fixed error (reported 
> >>> athttp://jquery.com/plugins/node/941)
> >>>  when splitTitle is used and title attribute is empty."). If you
> >>> want
> >>> to use the splitTitle option, you'll need a title attribute to
> >>> split. ;-) If you want to use local content, remove the splitTitle
> >>> option.
>
>  -whgen the tooltips are shown and you click the delete link and
>  click
>  on "abort", the link is clicked even though the browser should
>  "stop"
>
> >>> This is because you need to attach the event handler to the abort
> >>> link
> >>> after the clueTip is populated with the content. Actually, if you're
> >>> using local content and jQuery 1.2.x, it should work. Otherwise,
> >>> you're going to have to re-bind the click event to the link. Shawn
> >>> Grover wrote an excellent blog entry on "Using the jQuery clueTip
> >>> plugin with dynamic content" (thanks, Shawn!!), which might give you
> >>> some ideas:http://grover.open2space.com/node/191
>
> >>> I'm planning to package up the last month's improvements/bug fixes
> >>> into a new release within the next few days. In the meantime, if you
> >>> want to grab the version from svn, feel free.
>
> >>>http://jqueryjs.googlecode.com/svn/trunk/plugins/cluetip/
>
> >>> If you want to

[jQuery] Re: general unique id for new append element

2007-12-24 Thread Karl Delandsheere

Bah...

Test if there's something in a document.getElementById( your_id ). If
there is, choose another id, if not, go on.

No?


On Dec 24, 12:18 am, Guy Fraser <[EMAIL PROTECTED]> wrote:
> > On Dec 23, 5:09 am, dn2965 <[EMAIL PROTECTED]> wrote:
>
> >> hello everyone
> >> i want to know a way to general unique id for new append element. like
> >> EXT's  .id();
>
> I don't think there is any equivalent in jQuery at present. It would be
> useful though as I've had several occasions myself when such a feature
> would be useful.
>
> For anyone not familiar with the feature in Ext, it basically gives you
> a guaranteed unique ID (ie. checks there are no other ids or names with
> same value in the document).
>
> Guy


[jQuery] Re: Problems with clueTip

2007-12-24 Thread KnoxBaby

grml, I go crazy with IE :(
I posted, that everything works fine except splitting ... that's not
right.

Without metadata plugin, it works from local content for IE and FF!
Here I just need the option to split the content.

With metadata 1.0, it works in FF, but not in IE (in IE, it doesn't
show any tooltip).

With metadata 2.0, it works in FF or IE ... :) (here again: option to
split local content...)

merry xmas ;)

now I try, if it works than also with ajax request :)

On 24 Dez., 04:25, Karl Swedberg <[EMAIL PROTECTED]> wrote:
> The plot thickens!
>
> >> I really don't know the reason ... tried everything. But one question
> >> more: When I use local content, I think the spiTitle option should be
> >> available for this too to split the local content into title/content
> >> or how to do that instead? thanks!
>
> I started plucking out other stuff that was on your page, and when I
> removed the metadata plugin, the problem magically vanished. Not sure
> why, but it looks like something breaks with your version of the
> metadata plugin and the .wrapInner() method. Can you try removing the
> metadata plugin from the page and testing again? Also, might as well
> remove jtip.js, just in case. I haven't tested in IE yet, but firefox
> stopped displaying [object object].
>
> Thanks, and sorry about the hassle.
>
> --Karl
> _
> Karl Swedberg
>
> On Dec 23, 2007, at 5:36 PM, KnoxBaby wrote:
>
>
>
> > oh I missed the link to my site:
> >http://www.jahlabs.de/jquery/test/
>
> > On 23 Dez., 22:39, KnoxBaby <[EMAIL PROTECTED]> wrote:
> >> Thanks again for your great support and help, but it doesn't fix my
> >> prob :(
> >> Again my site:
>
> >> it's the newest jquery file and cluetip comes from svn! I have
> >> removed
> >> the spitTitle but also when I try to use rel="asd.html" without
> >> local:true and the asd.html is in the same directory, I have an empty
> >> tooltip ...
>
> >> Now with the local content, the tooltip displays again [object
> >> Object]
> >> in Firefox and doesn't display the tooltip in IE :(
>
> >> On 23 Dez., 22:13, Karl Swedberg <[EMAIL PROTECTED]> wrote:
>
>  -In IE it shows sometimes in the status bar "errors on the page",
>  and
>  sometimes not ... I'm a little bit confused ...
>  -In Firefox, Tooltips are shown correctly if I use title=""
>  attribute
>  and spitTitle in tpl/my_cluetips.js and without spitTitle and using
>  local:true, it shows a tooltip with [object Object] as content
>  -In IE, both options don't work and don't even show a tooltip with
>  wrong content
>  -in IE, the sorting of the table doesn't work on the columns with
>  dates in it ...
>
> >>> Hi there. Looks like a problem with your script is causing a
> >>> JavaScript error in the clueTip code. I believe this error could be
> >>> keeping the rest of your scripts from running on document.ready, so
> >>> this could be the reason you're having all the other problems:
>
> >>>$('a.help').cluetip({
> >>>cluetipClass: 'jtip',
> >>>arrows: true,
> >>>dropShadow: false,
> >>>leftOffset: 20,
> >>>fx: {
> >>>  open:   'fadeIn', // can be 'show' or
> >>> 'slideDown' or 'fadeIn'
> >>>  openSpeed:  ''
> >>>},
> >>>local: true,
> >>>hideLocal: true,
> >>>splitTitle: '|'  // this is the problem option.
> >>>});
>
> >>> Here you're using the splitTitle option as well as the local option.
> >>> You can only have one or the other. Also, those links don't have a
> >>> title attribute, and that is what is causing the error. The plugin
> >>> should really handle that more gracefully. In fact, the svn version
> >>> has fixed it as of November 27 ("clueTip: fixed error (reported 
> >>> athttp://jquery.com/plugins/node/941)
> >>>  when splitTitle is used and title attribute is empty."). If you
> >>> want
> >>> to use the splitTitle option, you'll need a title attribute to
> >>> split. ;-) If you want to use local content, remove the splitTitle
> >>> option.
>
>  -whgen the tooltips are shown and you click the delete link and
>  click
>  on "abort", the link is clicked even though the browser should
>  "stop"
>
> >>> This is because you need to attach the event handler to the abort
> >>> link
> >>> after the clueTip is populated with the content. Actually, if you're
> >>> using local content and jQuery 1.2.x, it should work. Otherwise,
> >>> you're going to have to re-bind the click event to the link. Shawn
> >>> Grover wrote an excellent blog entry on "Using the jQuery clueTip
> >>> plugin with dynamic content" (thanks, Shawn!!), which might give you
> >>> some ideas:http://grover.open2space.com/node/191
>
> >>> I'm planning to package up the last month's improvements/bug fixes
> >>> into a new release within the next few days. In the meantime, if you
> >>> want to gra

[jQuery] Re: Problems with clueTip

2007-12-24 Thread KnoxBaby


>This is because you need to attach the event handler to the abort link
>after the clueTip is populated with the content. Actually, if you're
>using local content and jQuery 1.2.x, it should work. Otherwise,
>you're going to have to re-bind the click event to the link. Shawn
>Grover wrote an excellent blog entry on "Using the jQuery clueTip
>plugin with dynamic content" (thanks, Shawn!!), which might give you
>some ideas: http://grover.open2space.com/node/191
I have jquery 1.2.1 but it doesn't work as you can see. the link is
clicked nad FF does not stop. I don't know, what do you mean by
"rebind". can you please tell me how to fix it? thanks!

On 24 Dez., 04:25, Karl Swedberg <[EMAIL PROTECTED]> wrote:
> The plot thickens!
>
> >> I really don't know the reason ... tried everything. But one question
> >> more: When I use local content, I think the spiTitle option should be
> >> available for this too to split the local content into title/content
> >> or how to do that instead? thanks!
>
> I started plucking out other stuff that was on your page, and when I
> removed the metadata plugin, the problem magically vanished. Not sure
> why, but it looks like something breaks with your version of the
> metadata plugin and the .wrapInner() method. Can you try removing the
> metadata plugin from the page and testing again? Also, might as well
> remove jtip.js, just in case. I haven't tested in IE yet, but firefox
> stopped displaying [object object].
>
> Thanks, and sorry about the hassle.
>
> --Karl
> _
> Karl Swedberg
>
> On Dec 23, 2007, at 5:36 PM, KnoxBaby wrote:
>
>
>
> > oh I missed the link to my site:
> >http://www.jahlabs.de/jquery/test/
>
> > On 23 Dez., 22:39, KnoxBaby <[EMAIL PROTECTED]> wrote:
> >> Thanks again for your great support and help, but it doesn't fix my
> >> prob :(
> >> Again my site:
>
> >> it's the newest jquery file and cluetip comes from svn! I have
> >> removed
> >> the spitTitle but also when I try to use rel="asd.html" without
> >> local:true and the asd.html is in the same directory, I have an empty
> >> tooltip ...
>
> >> Now with the local content, the tooltip displays again [object
> >> Object]
> >> in Firefox and doesn't display the tooltip in IE :(
>
> >> On 23 Dez., 22:13, Karl Swedberg <[EMAIL PROTECTED]> wrote:
>
>  -In IE it shows sometimes in the status bar "errors on the page",
>  and
>  sometimes not ... I'm a little bit confused ...
>  -In Firefox, Tooltips are shown correctly if I use title=""
>  attribute
>  and spitTitle in tpl/my_cluetips.js and without spitTitle and using
>  local:true, it shows a tooltip with [object Object] as content
>  -In IE, both options don't work and don't even show a tooltip with
>  wrong content
>  -in IE, the sorting of the table doesn't work on the columns with
>  dates in it ...
>
> >>> Hi there. Looks like a problem with your script is causing a
> >>> JavaScript error in the clueTip code. I believe this error could be
> >>> keeping the rest of your scripts from running on document.ready, so
> >>> this could be the reason you're having all the other problems:
>
> >>>$('a.help').cluetip({
> >>>cluetipClass: 'jtip',
> >>>arrows: true,
> >>>dropShadow: false,
> >>>leftOffset: 20,
> >>>fx: {
> >>>  open:   'fadeIn', // can be 'show' or
> >>> 'slideDown' or 'fadeIn'
> >>>  openSpeed:  ''
> >>>},
> >>>local: true,
> >>>hideLocal: true,
> >>>splitTitle: '|'  // this is the problem option.
> >>>});
>
> >>> Here you're using the splitTitle option as well as the local option.
> >>> You can only have one or the other. Also, those links don't have a
> >>> title attribute, and that is what is causing the error. The plugin
> >>> should really handle that more gracefully. In fact, the svn version
> >>> has fixed it as of November 27 ("clueTip: fixed error (reported 
> >>> athttp://jquery.com/plugins/node/941)
> >>>  when splitTitle is used and title attribute is empty."). If you
> >>> want
> >>> to use the splitTitle option, you'll need a title attribute to
> >>> split. ;-) If you want to use local content, remove the splitTitle
> >>> option.
>
>  -whgen the tooltips are shown and you click the delete link and
>  click
>  on "abort", the link is clicked even though the browser should
>  "stop"
>
> >>> This is because you need to attach the event handler to the abort
> >>> link
> >>> after the clueTip is populated with the content. Actually, if you're
> >>> using local content and jQuery 1.2.x, it should work. Otherwise,
> >>> you're going to have to re-bind the click event to the link. Shawn
> >>> Grover wrote an excellent blog entry on "Using the jQuery clueTip
> >>> plugin with dynamic content" (thanks, Shawn!!), which might give you
> >>> some ideas:http://grover.open2space.com

[jQuery] wymeditor in thickbox

2007-12-24 Thread Joe Shaw

I am having trouble getting the wymeditor to load in a form that is
opened into a thickbox from a separate html file.  The form html file
by itself, with proper scripts for wymeditor loaded, works fine; in
the thickbox it is a plain textarea.  Is this even possible?  Has
anyone else tried it?  Any help would be greatly appreciated.

-Joe


[jQuery] Re: Problems with clueTip

2007-12-24 Thread KnoxBaby

Ok I got it to work with verion 1.0:

http://jqueryjs.googlecode.com/svn/tags/plugins/metadata/1.0/jquery.metadata.pack.js

so now, I just need the opportunity to split the local content into
title and content of the tooltip :)

Further: I don't understand why the link is followed even though I
click on abort on the confirming message (but only n Firefox and when
the tooltip is displayed ..)?

thanks!

On 24 Dez., 04:25, Karl Swedberg <[EMAIL PROTECTED]> wrote:
> The plot thickens!
>
> >> I really don't know the reason ... tried everything. But one question
> >> more: When I use local content, I think the spiTitle option should be
> >> available for this too to split the local content into title/content
> >> or how to do that instead? thanks!
>
> I started plucking out other stuff that was on your page, and when I
> removed the metadata plugin, the problem magically vanished. Not sure
> why, but it looks like something breaks with your version of the
> metadata plugin and the .wrapInner() method. Can you try removing the
> metadata plugin from the page and testing again? Also, might as well
> remove jtip.js, just in case. I haven't tested in IE yet, but firefox
> stopped displaying [object object].
>
> Thanks, and sorry about the hassle.
>
> --Karl
> _
> Karl Swedberg
>
> On Dec 23, 2007, at 5:36 PM, KnoxBaby wrote:
>
>
>
> > oh I missed the link to my site:
> >http://www.jahlabs.de/jquery/test/
>
> > On 23 Dez., 22:39, KnoxBaby <[EMAIL PROTECTED]> wrote:
> >> Thanks again for your great support and help, but it doesn't fix my
> >> prob :(
> >> Again my site:
>
> >> it's the newest jquery file and cluetip comes from svn! I have
> >> removed
> >> the spitTitle but also when I try to use rel="asd.html" without
> >> local:true and the asd.html is in the same directory, I have an empty
> >> tooltip ...
>
> >> Now with the local content, the tooltip displays again [object
> >> Object]
> >> in Firefox and doesn't display the tooltip in IE :(
>
> >> On 23 Dez., 22:13, Karl Swedberg <[EMAIL PROTECTED]> wrote:
>
>  -In IE it shows sometimes in the status bar "errors on the page",
>  and
>  sometimes not ... I'm a little bit confused ...
>  -In Firefox, Tooltips are shown correctly if I use title=""
>  attribute
>  and spitTitle in tpl/my_cluetips.js and without spitTitle and using
>  local:true, it shows a tooltip with [object Object] as content
>  -In IE, both options don't work and don't even show a tooltip with
>  wrong content
>  -in IE, the sorting of the table doesn't work on the columns with
>  dates in it ...
>
> >>> Hi there. Looks like a problem with your script is causing a
> >>> JavaScript error in the clueTip code. I believe this error could be
> >>> keeping the rest of your scripts from running on document.ready, so
> >>> this could be the reason you're having all the other problems:
>
> >>>$('a.help').cluetip({
> >>>cluetipClass: 'jtip',
> >>>arrows: true,
> >>>dropShadow: false,
> >>>leftOffset: 20,
> >>>fx: {
> >>>  open:   'fadeIn', // can be 'show' or
> >>> 'slideDown' or 'fadeIn'
> >>>  openSpeed:  ''
> >>>},
> >>>local: true,
> >>>hideLocal: true,
> >>>splitTitle: '|'  // this is the problem option.
> >>>});
>
> >>> Here you're using the splitTitle option as well as the local option.
> >>> You can only have one or the other. Also, those links don't have a
> >>> title attribute, and that is what is causing the error. The plugin
> >>> should really handle that more gracefully. In fact, the svn version
> >>> has fixed it as of November 27 ("clueTip: fixed error (reported 
> >>> athttp://jquery.com/plugins/node/941)
> >>>  when splitTitle is used and title attribute is empty."). If you
> >>> want
> >>> to use the splitTitle option, you'll need a title attribute to
> >>> split. ;-) If you want to use local content, remove the splitTitle
> >>> option.
>
>  -whgen the tooltips are shown and you click the delete link and
>  click
>  on "abort", the link is clicked even though the browser should
>  "stop"
>
> >>> This is because you need to attach the event handler to the abort
> >>> link
> >>> after the clueTip is populated with the content. Actually, if you're
> >>> using local content and jQuery 1.2.x, it should work. Otherwise,
> >>> you're going to have to re-bind the click event to the link. Shawn
> >>> Grover wrote an excellent blog entry on "Using the jQuery clueTip
> >>> plugin with dynamic content" (thanks, Shawn!!), which might give you
> >>> some ideas:http://grover.open2space.com/node/191
>
> >>> I'm planning to package up the last month's improvements/bug fixes
> >>> into a new release within the next few days. In the meantime, if you
> >>> want to grab the version from svn, feel free.
>
> >>>http://jqueryjs.googlecode.co

[jQuery] Re: Filter out innerhtml of div #id

2007-12-24 Thread KnoxBaby

ahh, this would be a nice idea, than it would work like the code is on
the page itself :) I try this, thanks :)

On Dec 24, 1:21 am, "Glen Lipka" <[EMAIL PROTECTED]> wrote:
> Are you trying to get it while its in the variable?  Maybe put the html into
> a dom element first, like
>
> $("div#someHiddenDiv").append(str);
> thingyouwant = $("div#content").html();
>
> Does this help?
>
> Glen
>
> On Dec 22, 2007 7:30 PM, psy* <[EMAIL PROTECTED]> wrote:
>
>
>
> > Hello,
>
> > I have a full html code in in a var:
>
> > str = 'full html code here starting with ';
>
> > and now I want to get the innerHTML of a div with an certain id. I tried
> > that:
>
> > $(var_name).filter('div#content').get(0).html()
>
> > but that doesn't work. What's the right way??
>
> > thanks!


[jQuery] Re: general unique id for new append element

2007-12-24 Thread McLars

Just generate a random number with Javascript, and throw in a few
characters for good measure. Like maybe the tagName followed by a four
or five (you could go higher if you'er paranoid) digit random number.
And/or you could use a time stamp of some sort.

If you want to go the extra mile, you could try to select with the new
ID just to make sure it doesn't already exist.

But I think a simple random ID of several digits would be fine, and
you can write the algorythm right in the .attr('id', ...) method.

Larry

Guy Fraser wrote:
> > On Dec 23, 5:09 am, dn2965 <[EMAIL PROTECTED]> wrote:
> >
> >> hello everyone
> >> i want to know a way to general unique id for new append element. like
> >> EXT's  .id();
> >>
>
> I don't think there is any equivalent in jQuery at present. It would be
> useful though as I've had several occasions myself when such a feature
> would be useful.
>
> For anyone not familiar with the feature in Ext, it basically gives you
> a guaranteed unique ID (ie. checks there are no other ids or names with
> same value in the document).
>
> Guy


[jQuery] Re: general unique id for new append element

2007-12-24 Thread Shawn

A quick Google search should give you a JS function that can return a 
GUID type string that can be used as an ID.  Here's a snippet I modified 
for a custom object I needed once:

//create a GUID type identifier.
//NOTE: note truely unique, but duplicates are unlikely.
// based on code found at :
// http://blog.shkedy.com/2007/01/createing-guids-with-client-side.html
generateGuid : function (obj) {
   var result, i, j;
   result = "";
   while (!j || this.guids[result]) {
 result = "";
 for(j=0; j<32; j++)
 {
   if( j == 8 || j == 12|| j == 16|| j == 20) { result = result + "-"; }
   i = Math.floor(Math.random()*16).toString(16).toUpperCase();
   result = result + i;
 }
   }

   //Add the GUID to our master index
   this.guids[result] = obj;
   return result
}


Shawn

Guy Fraser wrote:
> 
>> On Dec 23, 5:09 am, dn2965 <[EMAIL PROTECTED]> wrote:
>>   
>>> hello everyone
>>> i want to know a way to general unique id for new append element. like
>>> EXT's  .id();
>>> 
> 
> I don't think there is any equivalent in jQuery at present. It would be 
> useful though as I've had several occasions myself when such a feature 
> would be useful.
> 
> For anyone not familiar with the feature in Ext, it basically gives you 
> a guaranteed unique ID (ie. checks there are no other ids or names with 
> same value in the document).
> 
> Guy


[jQuery] a simple XML value change

2007-12-24 Thread pere roca


hi, 
I've seen in the forum many requests that take and show parameters coming
from XML.
But what about modifiying these values dynamically?
I tried something like this:

$("p").click(function(){ 
 $.ajax({
type: "GET",
url:"arxiu.xml",
dataType: "xml",
//if we suceeded in getting the XML, let's change it

success: function (xml) {   
 var grup = $("Name:contains('user')",xml); 
var item_text=(grup.text());
   alert (item_text); //yes,it shows the value I want to change

$("#grup").attr("new_value",item_text);
//I have tried also, with no success: var
item_text="new_value";

Thanks,
Pere
-- 
View this message in context: 
http://www.nabble.com/a-simple-XML-value-change-tp14487516s27240p14487516.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.