There's some sort of scope issue here that I cant seem to get passed.
I'd ideally just like the function to return the shortUrl from the
json results but can't seem to get it anywhere but the callback
function.
function shortenURL(url){
var apiKey = 'APIKEY';
var apiLogin =
Same as subject
I'm having trouble using it with jQuery 1.3.2.
Please advice.
Hi, I have values in each input which tells the user what to enter in
that field. Each value clears on click and resets to default if no
value is entered. How can I have it treat my values as if it would be
empty (no value entered)?
You can avoid that issue by using a solution that doesn't modify the
inputs value. The (planned) jQuery UI watermark widget does that, you
can get the code from labs here:
http://jquery-ui.googlecode.com/svn/branches/labs/watermark/ui/ui.watermark.js
A sort-of demo is here:
One interesting side note is that, according to John Resig's
presentation on recent changes to jQuery internals (at last weekend's
jQuery conference):
for (var i=0; i 250; i++) {
$('lisome thing/li').attr('id', 'foo' + i).appendTo('ul');
}
... is now faster than this:
for (var i=0; i
I'd ideally just like the function to return the shortUrl from the
json results but can't seem to get it anywhere but the callback
function.
...
$.getJSON(http://api.bit.ly/shorten?version=2.0.1longUrl=;
+ url + login= + apiLogin + apiKey= + apiKey, function(data){
I am trying to get/set only text of list only element text value.
But for some reason I can not select it in clear way.
ul
li id=myid Here text that I want to modify
ul
li id=dfdfi don't want modify this/li
li id=dfdfi don't want modify this/li
/ul
/li
ul
You didn't show your code,
sure :)
On Sat, Sep 19, 2009 at 04:31, Catherine catherinek@gmail.com wrote:
Same as subject
I'm having trouble using it with jQuery 1.3.2.
Please advice.
--
alex
smime.p7s
Description: S/MIME Cryptographic Signature
event driven programs can't usually rely on the order they might run.
but in the case they both handle the same event or predictable event sequence,
you may have handler for one event [conditionally] trigger the other event or
even invoke it's handler directly.
just my thought :) .
On Sat,
Hi,
I have this code jQuery:
$('div.contenedor a').each(function(index){
$(this).attr({
'rel': 'external',
'id': index
});
});
--
This´s my html
--
div id=contenedor
h1UNA TERTULIA INESPERADA/h1
Your syntax is incorrect. What you want, I think, is:
$(this).attr({
'rel','external',
'id',index
});
(commas in place of the colons)
-Adam
On Sep 19, 8:20 am, Lord Gustavo Miguel Angel
goosfanc...@gmail.com wrote:
Hi,
I have this code jQuery:
$('div.contenedor
Hi,
I'm trying to get the data() function working, but no success so far.
Here's the code I've come up with:
//$(a[href*='user.php?nick=']).data(test, true);
$(a[href*='user.php?nick=']).mouseover(function() {
$(this).data(test, true);
});
On Sep 18, 9:31 pm, Catherine catherinek@gmail.com wrote:
Same as subject
I'm having trouble using it with jQuery 1.3.2.
Please advice.
What trouble are you having? You need to provide some details.
I've tried that and still can't seem to get the data into any sort of
usable scope.
On Sat, Sep 19, 2009 at 10:03 AM, adambundy adambu...@gmail.com wrote:
Your syntax is incorrect. What you want, I think, is:
$(this).attr({
'rel','external',
'id',index
});
(commas in place of the colons)
No, that's not correct. The syntax is fine in the original.
I think the
It's colons
straight from the docs
http://docs.jquery.com/Attributes/attr#properties
On Sep 19, 12:44 pm, Mike McNally emmecin...@gmail.com wrote:
On Sat, Sep 19, 2009 at 10:03 AM, adambundy adambu...@gmail.com wrote:
Your syntax is incorrect. What you want, I think, is:
$(this).attr({
Yup, it will be correct, so weird, why does Google's character wrong.
On 9月18日, 下午7時44分, lanxiazhi lanxia...@gmail.com wrote:
you may request the a.php directly in the browser ,and see if the charactors
display correctly.
2009/9/18 David .Wu chan1...@gmail.com
it's not work actually.
Have you put a console.log() call in your mouseover handler?
On Sat, Sep 19, 2009 at 10:03 AM, cafaro tvdbu...@gmail.com wrote:
Hi,
I'm trying to get the data() function working, but no success so far.
Here's the code I've come up with:
//$(a[href*='user.php?nick=']).data(test, true);
On Sep 19, 11:34 am, Bill H dysfunct...@gmail.com wrote:
I've tried that and still can't seem to get the data into any sort of
usable scope.
The problem is that while you may be understanding scope, you are not
understanding asynchronous calls the $.getJSON call doesn't
return anything
In other words, you have to redesign your shortenURL function, like this:
function shortenURL( url, callback ) {
var apiKey = 'APIKEY';
var apiLogin = 'LOGIN';
$.getJSON(
http://api.bit.ly/shorten?version=2.0.1longUrl=;
+ url + login= + apiLogin + apiKey= + apiKey,
I'm using the GalleryView plugin and it works beautifully on a plain
HTML page. But when I add the code into a Drupal node, the last
filmstrip image wraps to the next line and is invisible.
Here's an example of it working as expected on an empty page:
http://parkcirclefilms.org/drpl/gallery.htm
i would like to know how i could do it better this actualy repeats 3
more time to get the other mouse over states.
Please dont write any code i am still learning and would be helpful if
anyone could just guide me in the right direction
Many Thanks
$('#vision, #navvision').hover(
On Sep 18, 4:54 pm, Rama Vadakattu rama.vadaka...@gmail.com wrote:
Can any one please recommend a powerful WYSIWYG (commercial/open
source) editor which has a image upload capability.
What about TinyMCE? It seems good and I think it's easy to install new
(even your own) plugins :)
Hi All,
I need some pointers on what I'm doing wrong here. I followed the
multipart form demo included with jquery.validate, creating a custom
validation rule like so:
code$.validator.addMethod(pageRequired, function(value, element) {
var $element = $(element)
on 9/18/09 7:49 AM, dudal at jes...@dudal.com wrote:
Hey Steffan
I'm glad you like it. I used to go with the full carousel version
just for this feature, but then I looked into the code and found that
it could be acomplished using only 3 lines of code or so. I posted it
on Ganeshjis
On Sat, Sep 19, 2009 at 11:17 PM, morwo lukaszewsk...@gmail.com wrote:
On Sep 18, 4:54 pm, Rama Vadakattu rama.vadaka...@gmail.com wrote:
Can any one please recommend a powerful WYSIWYG (commercial/open
source) editor which has a image upload capability.
What about TinyMCE? It seems good
I am using getJSON to get results from a different domain and i wanted
to get _some_ object back when calling getJSON so that i can insert
some variables into the callback scope.
Basically, what i wanted to do was this:
var new_json = $.getJSON(url, function(data) {
Sorry not work!
--
From: Mike McNally emmecin...@gmail.com
Sent: Saturday, September 19, 2009 1:44 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: [ why don´t working attr ]
On Sat, Sep 19, 2009 at 10:03 AM, adambundy
Well the selector was definitely wrong. div.contenedor means select
all divs with class 'contenedor'. Your div did not have that class -
rather, it had that string as its id value. For that you need
div#contenedor.
Now, are other things wrong? Maybe; you didn't post anything else.
On Sat,
getJSON, like all Ajax and Ajax-style calls, is *asynchronous*. That's what
the A in Ajax stands for.
Instead of trying to use a return value, you need to use the
getJSONcallback function (which you're already providing) to do
whatever you want
with the data.
So your code might look something
resolved!
1) thank´s all
Was colons. Correct!
$(div#contenedor a).attr({
title:asdasdasd,
rel:external
});
Was div#. correct!
Gustavo.
--
From: Mike McNally emmecin...@gmail.com
Sent: Saturday, September 19, 2009 6:05 PM
To:
this looks a bit like a homework assignment to be honest ;)
for ease of maintenance and to avoid repeating code i'd stick the two
anonymous functions into a single own 'proper' function and pass the
variables to it.
you're also getting the target elements on every single mouseover and
mouseout
by the way, does that code work?
On Sep 19, 10:57 pm, ryan.j ryan.joyce...@googlemail.com wrote:
this looks a bit like a homework assignment to be honest ;)
for ease of maintenance and to avoid repeating code i'd stick the two
anonymous functions into a single own 'proper' function and pass
Hi all,
i'm struggling with a small yet in,teresting problem. In order to
allow users to filter content, i've created a small checkbox list. To
each checkbox is attached an ID , and too some divs on the page are
attached these id's too (in the class attr that is); one div can be
attached to
Code the class qualifier with a .? Like,
$(.zoneCoupon , div. + idCoupons).each(function(){
On Sat, Sep 19, 2009 at 5:30 PM, elpatator romain.simi...@gmail.com wrote:
Hi all,
i'm struggling with a small yet in,teresting problem. In order to
allow users to filter content, i've created a
Hi Mike,
I think you might have misread my post and the code attached.
I am quite aware of the fact that the callback function only runs upon
a successful completion of the request and is run asynchronously. If
you look at the code i've written you'll see that i am in fact
_counting_ on that
Hello, I have a link:
a href=some_url onclick=popup()
In the script, I have myFunction and I want to use the href:
function popup()
{
$(#popup)
.fadeIn('slow')
.load(this.href)
return false
}
But it doesn't work. How do I access href?
Thanks
I have used xstandard for many years now. I am currently evaluating
ckeditor though because the plugin architecture makes it extrendable,
which would be useful for my web apps. If xstandard works for your
environment though, it is something I would recommend.
@DavGarcia
On Sep 19, 4:19 pm,
wow really! not sure what to say about that.
Here is a development link to the actual project
http://alienfactory.com/vision1/
if any one would like to help out on the javascript jquery question
above
Thanks in advance for any help
I would structure things a little differently.
don't use the onclick event handler.
a href=http://jquery.com; class=popup-linkjQuery/a
Then in your javascript use jQuery:
$().ready(function(){
$(.popup-link).click(function(){
var $popuplink = $(this);
$(#popup)
The problem is that the link is dynamically loaded after the original page,
the document ready function doesn't affect it.
Any idea?
--
View this message in context:
http://www.nabble.com/A-very-simple-newbie-problem-tp25526787s27240p25527753.html
Sent from the jQuery General Discussion
Then you just need to use the live method to catch the bubbled up DOM
elements and attach the click event.
See here:
$().ready(function(){
$(.popup-link).live(click, function(){
var $popuplink = $(this);
$(#popup)
.fadeIn(slow)
42 matches
Mail list logo