[jQuery] Re: Pass object to function

2010-01-07 Thread knal
Aha, thanks for trhe extra info!
Some other things are clear to me now!

Thanks again!

On Jan 6, 9:17 pm, Scott Sauyet scott.sau...@gmail.com wrote:
 On Jan 6, 2:17 pm, knal knalp...@gmail.com wrote:

  BTW It also works without the  return this.each() {  part!

 Yes, but that allows you to continue chaining, i.e.

     $(this).closest(.project).closeProject().css({color: blue});

 or whatever.  This is the usual technique with jQuery plug-ins.

   -- Scott


[jQuery] Re: (autocomplete) Half of page disappears in IE7 when autocomplete list shows

2010-01-07 Thread Rune
I have now generated a static copy of the web page containing the
autocomplete dropdown html code (the div in the bottom of the page).
When I load this into IE7 there are no problems. It only fails on the
active page.

On Jan 6, 3:39 pm, Rune a...@rdfined.dk wrote:
 Hi

 I use autocomplete newest version on

 http://www.kle-online.dk/stage

 Things work great in FF and IE8 but in IE7 half of the page disappears
 when the autocomplete list shows. Try to type benz in the search
 field and problem should be easy to see.

 Cheers,
 Rune


Re: [jQuery] Re: (autocomplete) Half of page disappears in IE7 when autocomplete list shows

2010-01-07 Thread Md. Ali Ahsan Rana
Your css probably conflicting with autocomplete plugin's some css/ css class
names..

Check carefully...


-- 
http://ranacseruet.blogspot.com/


[jQuery] [Problem] Insert a script-tag after a script-tag

2010-01-07 Thread odlo
Hi,

I have witten the following lines of code:

  var s=document.createElement(script);
  s.type=text/javascript;
  s.src=http://api.intensifier.de/js/show_ads.js;;
  $(script:contains('era_layout')).after(s);

After the ebay-script with the era_vars, the intensifier-script should
be includet. But there is nothing!
When I replace .after(s) with e.g. .after('div/div'), then the div-
tag is on the right position.

Any suggestions?

Regards,
odlo


[jQuery] help fix syntax

2010-01-07 Thread runrunforest
syntax a: not working, but its what I have in mind.

$('.del').click(function(e){
e.preventDefault();
$.post('?= site_url('play/img/del') ?',
{ori: response.img_name , 
thumb: response.thumb_name },
function(e){
if(e.status == 
'deleted') {$(this).parent().remove();}
}, 'json');
});

syntax b: work but not doing thing correctly.

$('.del').click(function(e){
e.preventDefault();
$.post('?= site_url('play/img/del') ?',
{ori: response.img_name , 
thumb: response.thumb_name },
function(e){
if(e.status == 
'deleted') {}
}, 'json');
$(this).parent().remove();
});


[jQuery] help fix syntax

2010-01-07 Thread runrunforest
syntax a: not working, the parent of current element not being removed

$('a.del').click(function(e){
e.preventDefault();
$.post('/img/del.php') ,
{'img': img },
function(e){
if(e.status == 
'deleted') {$(this).parent().remove();}
}, 'json');
});

syntax b: work but its not doing things correctly.

$('a.del').click(function(e){
e.preventDefault();
$.post('/img/del.php'),
 {'img': img },
function(e){
if(e.status == 
'deleted') {}
}, 'json');
$(this).parent().remove();
});


[jQuery] Re: Help with change event

2010-01-07 Thread NotionCommotion
Sweet!  Thanks for the help!


[jQuery] Corresponding indexes with images

2010-01-07 Thread knal
Hi there,

I want to construct an imageslider myself but i can't find the right
method to iterate over my array of images.
The array is grabbed from div#images which only contains images.

Roughly the content of my function looks like this:

$(.next).livequery( 'click', function() {

$( #images img:first ).stop().animate({opacity: 0}, 250,
'linear', function() {
$( #images img:first ).hide();
$( #images img:last ).show().css('opacity', 0);
$( #images img:last ).animate({opacity: 1}, 1000, 'linear');
});
return false;

})

Of course, this only works if there are only two images in the
containing div, but it's a dynamic amount.
So i'll need to pass their indexes to the function, but how?

Any help would be greatly appreciated!

Thanks,
knal.


[jQuery] Re: (autocomplete) Half of page disappears in IE7 when autocomplete list shows

2010-01-07 Thread Rune
Hi

Thanks a lot - The problem was indeed in a css stylesheet but wasn't
related to any conflicting names. Instead we have a specific IE7-
instruction which looks like this:

body { height: 100%; overflow-y: auto;  }

Autosuggest seems to be incompatible with the overflow-y: auto
property and value. But I'm an amateur in this area so maybe it could
be sorted out in other ways. Right now I have removed this line for
the page with the autosuggest box.

Cheers,
Rune

On Jan 7, 10:17 am, Md. Ali Ahsan Rana ranacser...@gmail.com
wrote:
 Your css probably conflicting with autocomplete plugin's some css/ css class
 names..

 Check carefully...

 --http://ranacseruet.blogspot.com/


[jQuery] Re: Firebug gives a $ is not defined error

2010-01-07 Thread elubin
if you didn't change ANYTHING, it's possible one of the libraries you
are including added another JS library like scriptaculous that is
messing up your $ reference.


[jQuery] Re: help fix syntax

2010-01-07 Thread MorningZ
When you make an AJAX call, what this references changes

$('a.del').click(function() {
   var $parent = this.parent(); //i assume you want the parent of
the a
   $.post('/img/del.php') ,
 {'img': img },
 function(){
  if (e.status == 'deleted') { //e of the original
function call?
  $parent().remove();
  }
 },
   'json');
   return false; //stops the a's action
});

maybe if you better explain what you are trying to do, it would be
easier to point the path
On Jan 7, 7:16 am, runrunforest craigco...@gmail.com wrote:
 syntax a: not working, the parent of current element not being removed

                         $('a.del').click(function(e){
                                 e.preventDefault();
                                 $.post('/img/del.php') ,
                                                 {'img': img },
                                                 function(e){
                                                         if(e.status == 
 'deleted') {$(this).parent().remove();}
                                                 }, 'json');
                         });

 syntax b: work but its not doing things correctly.

                         $('a.del').click(function(e){
                                 e.preventDefault();
                                 $.post('/img/del.php'),
                                                  {'img': img },
                                                 function(e){
                                                         if(e.status == 
 'deleted') {}
                                                 }, 'json');
                                 $(this).parent().remove();
                         });

[jQuery] JQuery files(.js) required

2010-01-07 Thread NMarcu
Hello,

   My site is loading very slow with all js files imported, so I
putted all in one single file. I have a question. I have some file
that I think I don't need it. I'm loading this files:
jquery-1.3.2.js, jquery.bgframs.js, jquery.ui-1.7.2.custom.min.js,
ui.core.js, ui.draggable.js, ui.resizable.js, ui.dialog.js,
effects.core.js, effects.highlight.js, ui.tabs.js, editable,js

I need jquery for dialog, tabs, editable field, what files is
redundant information, and I can lost of it...I need minimum of data
to import


[jQuery] SUPERFISH - submenus not

2010-01-07 Thread assur3
Joel,

Thanks for a great module. Everything seems to work well except I
can't get the submenus to hide with the Suckerfish effects. All
submenus are displayed with no mouseover. I must be doing something
terribly stupid because no one else seems to have this problem!

Forgive my dumb question, but I've tried various settings, checked out
my template.css file, etc. but everything seems kosher.

My site is www.assured-it.com. The template I'm using is the new
Dominion template from Rockettheme with the Gantry architecture. In
case you need administrator, you can use the brock login with
susukuu as the password.

Any advice you can give me what I'm doing wrong? Thanks.

Brock Hotaling



[jQuery] (validate) Problems with additional methods...

2010-01-07 Thread Andrea Puddu
Hello everybody!

I'm trying to use a custom method for validate one of my input's form,
but no way.

Neither the 'additional-methods.js' included in the plugin pack work
for me Seems to be ok,  but no idea.

This is a resume of my code:

-JAVASCRIPT-

script type=text/javascript
$.validator.setDefaults({
submitHandler: function() {
$(#cForm).ajaxSubmit({
url:'inc/request.php',
target: '#form-box',
success: function(){
return false;
},
resetForm: true
});
}
});

$(document).ready(function(){
$(#cForm).validate({
rules:{
nif: alphanumeric,
},
messages: {
nombre: campo obligatorio,
email: {
required: campo obligatorio,
email: email no valido
},
telefono: {
required: campo obligatorio,
digits: solo numeros
},
nif: campo obligatorio,
legal: campo obligatorio
},
errorElement: em,
errorPlacement: function(error, element) {
if ( element.is(:radio) )
error.appendTo(element.parent().parent());
else if ( element.is(:checkbox) )
error.appendTo(element.parent());
else
error.prependTo( element.parent() );
}
});
});
/script

-HTML-
...

form action= method=post id=cForm
div
label for=nombreNombre y Apellidos/label
input class=required type=text size=25
name=nombre id=nombre value= maxlength=100/
/div
div
label for=nifNIF/label
input class=required type=text size=9
name=nif id=nif value= maxlength=9/
/div
div
label for=telefonoTeléfono/label
input class=required digits type=text
size=10 name=telefono id=telefono value= maxlength=15/
/div
div
label for=emailE-mail/label
input class=required email type=text
size=25 name=email id=email value= maxlength=100/
/div
div class=row
input class=required name=legal id=legal
type=checkbox/
label for=legalHe leído y acepto las bases
legales/a/label
input type=submit name=submit id=send
value= /
/div
/form
...


Thanks in advance!

Best Regards,

Andrea


[jQuery] SUPERFISH - version of jQuery

2010-01-07 Thread assur3
Joel,

I forgot that on my site I installed SC jQuery, because that's the
only version I found for Joomla. Is that OK, or do I need a different
version?


[jQuery] (autocomplete) how to keep the suggestion list when on blur

2010-01-07 Thread Angus
jQuery 1.3.2
jQuery Autocomplete plugin 1.1

I would like to
- keep the suggestion list when user click outside the text field.
- hide the suggestion list when user select item from the suggestion
list

I found a possible way, remove these lines of codes
if (!config.mouseDownOnSelect) {
hideResults();
}

Is there any better ways to achieve this ?



[jQuery] Re: JQuery files(.js) required

2010-01-07 Thread MorningZ
None of those are redundant, but three tips:

1) make sure you are using the minified versions in the production
enviroment
2) if you are really going to put the files together, which will be
minimal gain, make sure that each and every section ends with a semi-
colon, so the code doesn't get run all together
3) realize that these files are only going to get downloaded once to
the users browser until the cache is cleared... so if you have 200k of
script, it's not like on every single page load that that 200k is
going to go across the wire again (it's not)



On Jan 7, 8:44 am, NMarcu marcu.nico...@gmail.com wrote:
 Hello,

    My site is loading very slow with all js files imported, so I
 putted all in one single file. I have a question. I have some file
 that I think I don't need it. I'm loading this files:
 jquery-1.3.2.js, jquery.bgframs.js, jquery.ui-1.7.2.custom.min.js,
 ui.core.js, ui.draggable.js, ui.resizable.js, ui.dialog.js,
 effects.core.js, effects.highlight.js, ui.tabs.js, editable,js

 I need jquery for dialog, tabs, editable field, what files is
 redundant information, and I can lost of it...I need minimum of data
 to import


[jQuery] Re: JQuery files(.js) required

2010-01-07 Thread Mike Alsup
 None of those are redundant, but three tips:

Actually all of the individual jquery UI files are redundant with
jquery.ui-1.7.2.custom.min.js if that download was configured
properly.  Try with just these three: jquery-1.3.2.js,
jquery.bgiframe.js, jquery.ui-1.7.2.custom.min.js


Re: [jQuery] Need your opinion you ALL!!!

2010-01-07 Thread John Norcott
Hi Erik,

I'm not really sure about speed, and I can't speak about Unix (I'm a Windows
developer), but one thing I can tell you about relative paths vs. absolute
paths is relative paths will allow the site to be moved easily.

For example, if you develop the site on one machine, test it on another, and
have a third box for production, if you use absolute paths, you need to make
sure you put the site one the same drive letter, in the same path, on all
three machines.  With relative paths, you can place the site anywhere you
need, and there should be no issues resolving pages/resources.

Also, if there is ever a chance your employer will want to move this site to
another production machine, using relative paths now will make that future
move immensely easier.

Hope that helps.

-John

On Wed, Jan 6, 2010 at 10:14 PM, Erik R. Peterson eriks...@mac.com wrote:

 Hello everyone,

 Someone wants me to use FULL DIRECTORY PATHS for every page and script for
 a website I just completed.  I argued that it would slow down the website
 for users...  I prefer relative paths such as /src/ and /img/.

 Am I wrong to say this?

 Is there really a difference in performance with speed whether I use
 absolute or relative paths?

 Love to hear your opinion...

 Thanks.

 Erik

 BTW - the website was transferred from WINDOWS SERVER to a UNIX...  I
 actually preferred Windows.  I'm dealing
 with a Network Admin that doesn't know web design...



[jQuery] Need help with a simple problem?

2010-01-07 Thread Dennis J
I  am a total newbie when it comes down to Jquery, still in the
learning process.

$(document).ready(function(){
$('#top-bar-login li.current').hover(
function() { $(#top-bar-login ul).css('display', 
'block'); },
function() { $(#top-bar-login ul).css('display', 
'none'); });
});

I created a simple hover to show menu
But instead of the hover function, I want to activate the function on
click.

$(document).ready(function(){
$('#top-bar-login li.current').click(
function() { $(#top-bar-login ul).css('display', 
'block'); },
function() { $(#top-bar-login ul).css('display', 
'none'); });
});

Now the code doesn't work.
Where is the problem?


Re: [jQuery] Need your opinion you ALL!!!

2010-01-07 Thread Jonathan Vanherpe (T T NV)

Erik R. Peterson wrote:

Hello everyone,

Someone wants me to use FULL DIRECTORY PATHS for every page and script for a website I just 
completed.  I argued that it would slow down the website for users...  I prefer relative paths such 
as /src/ and /img/.

Am I wrong to say this?

Is there really a difference in performance with speed whether I use absolute 
or relative paths?

Love to hear your opinion...

Thanks.

Erik

BTW - the website was transferred from WINDOWS SERVER to a UNIX...  I actually 
preferred Windows.  I'm dealing
with a Network Admin that doesn't know web design...



Using relative paths is the way to go, otherwise moving the site or 
changing a domain name will cause you tons of extra work (tell your 
client you'll have to charge more down the road if they ever change the 
domain name). It won't make a difference speed-wise, though.


Note that most Unix systems are case-sensitive (I know Linux is, but Mac 
OS X isn't). So always use lowercase for all your filenames, folders and 
links.

http://www.example.com/jQuery.js is not the same as
http://www.example.com/jquery.js

Jonathan
--
Jonathan Vanherpe - Tallieu  Tallieu NV - jonat...@tnt.be


Re: [jQuery] Need your opinion you ALL!!!

2010-01-07 Thread Nathan Klatt
 Someone wants me to use FULL DIRECTORY PATHS for every page

Assuming you're generating your html on the back-end, just use a
variable for the base URL and no worries.

Stict with UNIX through the learning curve and I guarantee you'll
never go back, at least not voluntarily. :)

Nathan


[jQuery] Problem with $.post() and append()

2010-01-07 Thread DeltinoRosso
Hi,
I have problem with jquery, when I do a append() call to in a post()
call internet explorer still not print the append()...if i write the
same result out of the .post() still work with no problemany
ideas? this problem is killing me xD...I hate internet explorer but
here at work some users use it and I will to write a cross application
that run on chrome firefox and ie 8.

Sorry for my bad english  thank you


DeltinoRosso


[jQuery] Re: highlighting

2010-01-07 Thread metalmini
Euh... oke and in what way do i implement that? Can you give me a
example?

Thanks for the reply btw :-)

On Jan 7, 1:01 am, brian zijn.digi...@gmail.com wrote:
 $target.css('...')

 Or, better:

 $target.addClass('SomeClassName');





[jQuery] Re: Help with dynamicaly created table

2010-01-07 Thread Jahvi
Thank you very much, worked as intended :)

On 2 ene, 15:18, aquaone aqua...@gmail.com wrote:
 You need to trigger the update event for the table for tablesorter to
 rebuild the cache. At the bottom of your .delete_button click function, add
 $(#shop_list).update(); and it should fix your problems. For more
 information, please seehttp://tablesorter.com/docs/example-ajax.html.

 aquaone

 On Fri, Jan 1, 2010 at 18:18, Jahvi javie...@gmail.com wrote:
  Hi, Im currently using the tablesorter plugin to style a table im
  using, the code is the following:

  $(document).ready(function(){
        $(#shop_list)
         .tablesorter({widthFixed: true, widgets: ['zebra'],
                 headers: {
                         2: {
                                 sorter: false
                         },
                         3: {
                                 sorter: false
                         }
                 }
         })
         .tablesorterPager({container: $(#pager)});
  });

  As you can see it applies the plugin to the table id 'shop_list' and
  works fine on page load, I also have buttons on each record of the
  table that deletes them:

  $('.delete_button').live('click', function() {
         var id = $(this).attr(id).split(_);
         var id_store= id[1];
         jConfirm('Delete store?','Confirm', function(r) {
                 if (r==true){
                         $('#async_div').load('store.async.php?
  async=4id_store='+id_store);   //Delete store
                         $('#table_div').load('store.async.php?
  async=1');                                  //Update Table
                 }
         });
  });

  store.async.php contains all the php functions for that page and its
  working fine the problem is that when the table updates with the
  deleted record off the tableSorter plugin doesn't reapply. I've tried
  playing with the live function but I havent been able to make it work.
  Is there any way to do it? Or a better way to update the table without
  reloading it?

  Thanks in advance!


[jQuery] Re: JQuery files(.js) required

2010-01-07 Thread MorningZ
oh yeah, the custom has the functionality built in... i was thinking
core.. my bad

On Jan 7, 9:18 am, Mike Alsup mal...@gmail.com wrote:
  None of those are redundant, but three tips:

 Actually all of the individual jquery UI files are redundant with
 jquery.ui-1.7.2.custom.min.js if that download was configured
 properly.  Try with just these three: jquery-1.3.2.js,
 jquery.bgiframe.js, jquery.ui-1.7.2.custom.min.js


[jQuery] [Form Plugin] Plugin returning page html on success

2010-01-07 Thread Jahvi
Hi I have a weird problem using the form plugin on a login page on my
site, the form html is:

form id=form_login name=form_login method=post
enctype=multipart/form-data action=dologin.php

 Form elements.

/form

I'm using dologin.php to check the login and password on my DB if the
login and pass is ok it returns 'ENTER', if its correct but the user
is disabled it returns 'DISABLED' else returns 'ERROR', and I handle
that with this form plugin script:

$('#form_login').ajaxForm({
beforeSubmit: function (){
// Check if fields arent empty...
},
success: function(r){
   alert(r); // Checks the response..
if (r=='ENTER'){//User 
accepted
window.location.href = 'index_app.php';
}else if (r=='DISABLED'){  //User disabled
errorMsg('User disabled');
}else{ //Bad 
login or pass
errorMsg('Bad login or pass');
}

},
error: function(respuesta){
// Error msg
}
});

I'm using the alert to check the response im getting from the
dologin.php file and the problems I'm getting are:
1. If the login OR password isn't right, I ALWAYS get the current page
html as response.
2. I the login AND password is right, the FIRST time i get the current
page html as response.
3. After that the script works as intended (alert shows ENTER, ERROR
or DISABLED depending on the case).

It seems as in the first two cases the form is not going into the
action (I placed echo 'TEST'; in the dologin file to check if it
showed on the alert but on the first 2 cases all I get is the html).

Can anyone help me with this? Thanks in advance!


[jQuery] Re: help fix syntax

2010-01-07 Thread runrunforest
Im trying to remove parent of a at the click event, and the function
remove needs to be within the if statement.



[jQuery] JQuery Cycle Speed

2010-01-07 Thread aspacecodyssey

Hey, I'm using the JQuery cycle plugin (http://malsup.com/jquery/cycle/) and
I have images set to auto-scroll horizontally. The plugin automatically
eases the slides (I've tried turning easing off), and I'm wondering if
anyone knows of a way to get them to just continually move horizontally
(without slowing/speeding up). I'm using it to create the illusion of moving
fish in a background image: http://blazonmarketing.net/projects/mspd

Any help would be appreciated.
-- 
View this message in context: 
http://old.nabble.com/JQuery-Cycle-Speed-tp27061872s27240p27061872.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: help fix syntax

2010-01-07 Thread runrunforest
Thanks for help, with your suggestion, I made it work.


[jQuery] Re: Go through XML nodes only 1 level deep

2010-01-07 Thread Frank Peterson
That works in IE8, but in FF 3.5.3 I get undefined in the alertbox.
I've disabled adblock and flashblock, so its not those interfering. I
dont get anything in the error console either.

The code I had posted earlier doesn't work in FF 3.53 either. I'm
accessing it by running it on my desktop with this as the URL
file:///c:/xampplite/htdocs/DEVELOPMENT/geolocate.htm
but even when I access it via a decent URL I still get undefined in FF
http://localhost/DEVELOPMENT/geolocate.htm

On Jan 6, 10:13 pm, Jules jwira...@gmail.com wrote:
 Ahah, too much stale eggnog.

                 var option = {
                     error: function(request, status, error) {
                         alert(error);
                     },
                     success: function(data, status) {

                         var xml = $(data);
                         alert(xml.find('City').text());
                     },
                     dataType: xml,
                     type: GET,
                     url: your url here
                 };

                 $.ajax(option);

 This code works for me.

 On Jan 7, 2:50 pm, Steven Yang kenshin...@gmail.com wrote:

  just making sure

  you are not able to parse the xml at all right?
  i believe for IE you have to make sure you server returns the correct
  content type like text/xml to client inorder for you to parse

  hope this help

  On Thu, Jan 7, 2010 at 9:30 AM, Jules jwira...@gmail.com wrote:
   For some reason, it works on firefox (3.5.6) and doesn't work in ie
   6.0 and 8.0

   On Jan 7, 6:39 am, Frank Peterson fictionalper...@gmail.com wrote:
I'm grabbing an XML file with jQuery like this:

$(document).ready(function(){
    $.ajax({
        type: GET,
        url: http://ipinfodb.com/ip_query.php?ip=74.125.45.100;,
        dataType: xml,
        success: function(xml) {
            //$(xml).find().each(function(){
                var city = $(xml).find(City).text();
                /*
                $('div class=items id=link_'+id+'/div').html
('a href='+url+''+title+'/a').appendTo('#page-wrap');
                $(this).find('desc').each(function(){
                    var brief = $(this).find('brief').text();
                    var long = $(this).find('long').text();
                    $('div class=brief/div').html(brief).appendTo
('#link_'+id);
                    $('div class=long/div').html(long).appendTo
('#link_'+id);
                });
                */
                alert(city)
            //});
        }
    });

});

The XML file looks like this
?xml version=1.0 encoding=UTF-8?
Response
        Ip74.125.45.100/Ip
        StatusOK/Status
        CountryCodeUS/CountryCode
        CountryNameUnited States/CountryName
        RegionCode06/RegionCode
        RegionNameCalifornia/RegionName
        CityMountain View/City
        ZipPostalCode94043/ZipPostalCode
        Latitude37.4192/Latitude
        Longitude-122.057/Longitude
        Timezone-8/Timezone
        Gmtoffset-8/Gmtoffset
        Dstoffset-7/Dstoffset
/Response

But I can't get it to pull the data out.


[jQuery] img src replacement

2010-01-07 Thread Glen_H
In my footer I have a sign where I want it to say one thing regularly,
and then when someone hovers, i want it to say sometyhing else. I
basically made 2 images, and I just want to switch images on the
hover.

here is my code I used and its not working.:

$(#footer #footer-contain #availability img).hover(function () {
$(this).attr({'img src' : './images/avail_hover.png'});
   }



can anyone help me out with what I need to do?


[jQuery] Re: img src replacement

2010-01-07 Thread MorningZ
$(this).attr({'img src' : './images/avail_hover.png'});

there is no img src attr, but there is src, so

$(this).attr('src', './images/avail_hover.png');

and there's a second event to hook on the .hover event is when you
mouse off, so use that event to revert back to whatever image was
there


On Jan 7, 11:02 am, Glen_H glen.f.he...@gmail.com wrote:
 In my footer I have a sign where I want it to say one thing regularly,
 and then when someone hovers, i want it to say sometyhing else. I
 basically made 2 images, and I just want to switch images on the
 hover.

 here is my code I used and its not working.:

 $(#footer #footer-contain #availability img).hover(function () {
                         $(this).attr({'img src' : 
 './images/avail_hover.png'});
                                                            }

 can anyone help me out with what I need to do?


[jQuery] Re: Add a second trigger in this function

2010-01-07 Thread Jordan
Unfortunately that didn't work either. Is there another approach that
I should be taking on this?

On Jan 6, 3:20 pm, Johan Borestad johan.bores...@gmail.com wrote:
 I think you just forgot the last brackets on your hover method:

 $(div.tvbutton).hover(function () {
       $(div.tv).trigger('hover');

 })  --- Forgotten

 This could be optimized a little better by using id's, or at last
 saving a a reference to the div.tv, so that you don't have to make
 search for the div every time (unless you're using ajax ofcourse), but
 this should work now at last :-)

 / Johan

 On Jan 6, 9:42 pm, Jordan jscottphil...@gmail.com wrote:

  Thanks for the insight Johan! When I implemented that though, it just
  added the hover cross fade to the other div as well. I am looking for
  a way to make the 2nd div JUST trigger the first. I was looking at the
  page you linked to and I am messing around with something like the
  following... although I can't get it to work. Any thoughts?

  $(document).ready(function () {
          $('div.tv, div.desk, div.phone').hover(function () {
                  //hover in
                  var div = $(' div', this);

                  if (div.is(':animated')) {
                          div.stop().fadeTo(500, 1);
                  } else {
                          div.fadeIn(250);
                  }
          }, function () {
                  // hover out
                  var div = $(' div', this);
                  if (div.is(':animated')) {
                          div.stop().fadeTo(1000, 0);
                  } else {
                          div.fadeOut(1000);
                  }
          });
            $(div.tvbutton).hover(function () {
            $(div.tv).trigger('hover');

      });

  On Jan 5, 4:33 pm, Johan Borestad johan.bores...@gmail.com wrote:

   Hi!
   There are a number of nice implementations you could use for this.
   Example the jQuery trigger.http://docs.jquery.com/Events/trigger
   But for now, the simpliest solution is just to add another selector
   like this

   $('div.example, div.tv').hover( .

   / Johan

   On Jan 5, 8:33 pm, Jordan jscottphil...@gmail.com wrote:

I recently implemented the Image Cross Fade Transition (http://
jqueryfordesigners.com/image-cross-fade-transition/)

It works great, and I'm hoping to add to the code to enhance the
functionality. Currently, if I hover over the image, it runs the cross
fade transition, which I would like to keep. I have another div on the
page that I would like to trigger the first instance when hovered over
as well. Is there a good way to add this?

Here's what I'm using for the first instance:

$(document).ready(function () {
        $('div.tv').hover(function () {
                //hover in
                var div = $(' div', this);

                if (div.is(':animated')) {
                        div.stop().fadeTo(500, 1);
                } else {
                        div.fadeIn(250);
                }
        }, function () {
                // hover out
                var div = $(' div', this);
                if (div.is(':animated')) {
                        div.stop().fadeTo(1000, 0);
                } else {
                        div.fadeOut(1000);
                }
        });


[jQuery] The form is not submitted onKeyDown

2010-01-07 Thread Andre Polykanine
Hello everyone,

I'm trying to submit the form normally as well as by pressing
Ctrl+Enter. Yepp, the same task.
What I'm doing is the following:

 var validator=$(#myform).validate( {
 // tralala, here go the rules, error
 messages and stuff
 });

$(document).keydown (function (e) {
if (e.ctrlKey  e.which==13) {
validator.form();
}
});

then I'm trying to submit. If I do something wrong (for example, leave
a required field blank) and press Ctrl+Enter, Validator gently tells
me that yes, that field is required, go on and fill it in. But if I
fill in the field and do everything correctly, pressing Ctrl+Enter
gives absolutely nothing: no errors and no submit. the simple click on
the Submit button, however, does give the expected result.
Where am I wrong?
Thanks!

-- 
With best regards from Ukraine,
Andre
Skype: Francophile; WlmMSN: arthaelon @ yandex.ru; Jabber: arthaelon @ 
jabber.org
Yahoo! messenger: andre.polykanine; ICQ: 191749952
Twitter: m_elensule



[jQuery] Re: img src replacement

2010-01-07 Thread Glen_H
I have it now set up like this:

 $(#footer #footer-contain #availability img).hover(function () {
$(this).attr('src', './images/avail_hover.png'});



}

it still isnt working. I orig. had it set as src. but nothing seemed
to be working then so i messed around and changed it to img src.


any other ideas as to why it might not be working?

On Jan 7, 11:41 am, MorningZ morni...@gmail.com wrote:
 $(this).attr({'img src' : './images/avail_hover.png'});

 there is no img src attr, but there is src, so

 $(this).attr('src', './images/avail_hover.png');

 and there's a second event to hook on the .hover event is when you
 mouse off, so use that event to revert back to whatever image was
 there

 On Jan 7, 11:02 am, Glen_H glen.f.he...@gmail.com wrote:

  In my footer I have a sign where I want it to say one thing regularly,
  and then when someone hovers, i want it to say sometyhing else. I
  basically made 2 images, and I just want to switch images on the
  hover.

  here is my code I used and its not working.:

  $(#footer #footer-contain #availability img).hover(function () {
                          $(this).attr({'img src' : 
  './images/avail_hover.png'});
                                                             }

  can anyone help me out with what I need to do?


[jQuery] Re: Need help with a simple problem?

2010-01-07 Thread Šime Vidas
The click method has only one argument - the funcion that is going to
be executed on every mouseclick.

Also, you can use the show and hide methods as shortcuts for
manipulating the display property.

The toggles method toggles the display property between the states
hide and show.

$('#top-bar-login li.current').hover(function() {
$(this).siblings(ul).show();
}, function() {
$(this).siblings(ul).hide();
});

$('#top-bar-login li.current').click(function() {
$(this).siblings(ul).toggle();
});

If you wanted to attach 2 or more functions to the click event, you
could use the toggle method (same name as the one above, but different
purpose)...

$('#top-bar-login li.current').toggle(function() {
$(this).siblings(ul).show();
}, function() {
$(this).siblings(ul).hide();
});

Now, the first click will execute the first function, second click =
second function, third click = first function again, and so on...


[jQuery] Re: img src replacement

2010-01-07 Thread MorningZ
Perhaps the path to the image itself isn't ./images ?

Other than that,maybe some more code to show or better yet a live, non-
working page..

Rest assured the hover event does work, and the way to set an
img's source is $(this).attr(src) ...  there's something else not
seen/talked-about/thought-of that is the issue :-)


On Jan 7, 12:10 pm, Glen_H glen.f.he...@gmail.com wrote:
 I have it now set up like this:

  $(#footer #footer-contain #availability img).hover(function () {
                         $(this).attr('src', './images/avail_hover.png'});

 }

 it still isnt working. I orig. had it set as src. but nothing seemed
 to be working then so i messed around and changed it to img src.

 any other ideas as to why it might not be working?

 On Jan 7, 11:41 am, MorningZ morni...@gmail.com wrote:

  $(this).attr({'img src' : './images/avail_hover.png'});

  there is no img src attr, but there is src, so

  $(this).attr('src', './images/avail_hover.png');

  and there's a second event to hook on the .hover event is when you
  mouse off, so use that event to revert back to whatever image was
  there

  On Jan 7, 11:02 am, Glen_H glen.f.he...@gmail.com wrote:

   In my footer I have a sign where I want it to say one thing regularly,
   and then when someone hovers, i want it to say sometyhing else. I
   basically made 2 images, and I just want to switch images on the
   hover.

   here is my code I used and its not working.:

   $(#footer #footer-contain #availability img).hover(function () {
                           $(this).attr({'img src' : 
   './images/avail_hover.png'});
                                                              }

   can anyone help me out with what I need to do?


[jQuery] Re: img src replacement

2010-01-07 Thread Glen_H
does the attr function change the img source or does it add it in?
Perhaps I need a different function to do it? is that possible?

i am going to try to add a the remove attr function first, then run
the current one and see if that works...

On Jan 7, 12:25 pm, MorningZ morni...@gmail.com wrote:
 Perhaps the path to the image itself isn't ./images ?

 Other than that,maybe some more code to show or better yet a live, non-
 working page..

 Rest assured the hover event does work, and the way to set an
 img's source is $(this).attr(src) ...  there's something else not
 seen/talked-about/thought-of that is the issue :-)

 On Jan 7, 12:10 pm, Glen_H glen.f.he...@gmail.com wrote:

  I have it now set up like this:

   $(#footer #footer-contain #availability img).hover(function () {
                          $(this).attr('src', './images/avail_hover.png'});

  }

  it still isnt working. I orig. had it set as src. but nothing seemed
  to be working then so i messed around and changed it to img src.

  any other ideas as to why it might not be working?

  On Jan 7, 11:41 am, MorningZ morni...@gmail.com wrote:

   $(this).attr({'img src' : './images/avail_hover.png'});

   there is no img src attr, but there is src, so

   $(this).attr('src', './images/avail_hover.png');

   and there's a second event to hook on the .hover event is when you
   mouse off, so use that event to revert back to whatever image was
   there

   On Jan 7, 11:02 am, Glen_H glen.f.he...@gmail.com wrote:

In my footer I have a sign where I want it to say one thing regularly,
and then when someone hovers, i want it to say sometyhing else. I
basically made 2 images, and I just want to switch images on the
hover.

here is my code I used and its not working.:

$(#footer #footer-contain #availability img).hover(function () {
                        $(this).attr({'img src' : 
'./images/avail_hover.png'});
                                                           }

can anyone help me out with what I need to do?


[jQuery] superfish menu problem

2010-01-07 Thread kon
Can we keep different color for different menu items . If yes Can you
please tell me how to do it.


[jQuery] Re: img src replacement

2010-01-07 Thread MorningZ
it changes it

http://docs.jquery.com/Attributes/attr#keyvalue

attr( key, value )
Set a single property to a value, on all matched elements

going a different direction isn't the solution, something else is
wrong.

and your current one of img src as an attribute name is not going
to work, it's not the name of the property you need to set

here's a super quick and working example

http://jsbin.com/aluhe/edit (code)
http://jsbin.com/aluhe (run)


On Jan 7, 12:32 pm, Glen_H glen.f.he...@gmail.com wrote:
 does the attr function change the img source or does it add it in?
 Perhaps I need a different function to do it? is that possible?

 i am going to try to add a the remove attr function first, then run
 the current one and see if that works...

 On Jan 7, 12:25 pm, MorningZ morni...@gmail.com wrote:

  Perhaps the path to the image itself isn't ./images ?

  Other than that,maybe some more code to show or better yet a live, non-
  working page..

  Rest assured the hover event does work, and the way to set an
  img's source is $(this).attr(src) ...  there's something else not
  seen/talked-about/thought-of that is the issue :-)

  On Jan 7, 12:10 pm, Glen_H glen.f.he...@gmail.com wrote:

   I have it now set up like this:

    $(#footer #footer-contain #availability img).hover(function () {
                           $(this).attr('src', './images/avail_hover.png'});

   }

   it still isnt working. I orig. had it set as src. but nothing seemed
   to be working then so i messed around and changed it to img src.

   any other ideas as to why it might not be working?

   On Jan 7, 11:41 am, MorningZ morni...@gmail.com wrote:

$(this).attr({'img src' : './images/avail_hover.png'});

there is no img src attr, but there is src, so

$(this).attr('src', './images/avail_hover.png');

and there's a second event to hook on the .hover event is when you
mouse off, so use that event to revert back to whatever image was
there

On Jan 7, 11:02 am, Glen_H glen.f.he...@gmail.com wrote:

 In my footer I have a sign where I want it to say one thing regularly,
 and then when someone hovers, i want it to say sometyhing else. I
 basically made 2 images, and I just want to switch images on the
 hover.

 here is my code I used and its not working.:

 $(#footer #footer-contain #availability img).hover(function () {
                         $(this).attr({'img src' : 
 './images/avail_hover.png'});
                                                            }

 can anyone help me out with what I need to do?


Re: [jQuery] Re: highlighting

2010-01-07 Thread brian
var $target = $(this.hash);
$target.addClass('SomeClassName');
...

On Thu, Jan 7, 2010 at 10:02 AM, metalmini metalm...@gmail.com wrote:
 Euh... oke and in what way do i implement that? Can you give me a
 example?

 Thanks for the reply btw :-)

 On Jan 7, 1:01 am, brian zijn.digi...@gmail.com wrote:
 $target.css('...')

 Or, better:

 $target.addClass('SomeClassName');






Re: [jQuery] Re: img src replacement

2010-01-07 Thread Glen Healy
I put up my site quickly here: http://www.glenhealy.com/

the image should be at the bottom in the footer, if you can view the code,
maybe you can see what the deal is?

i used the exact code used in the example so there has to be a file issue

On Thu, Jan 7, 2010 at 12:44 PM, MorningZ morni...@gmail.com wrote:

 it changes it

 http://docs.jquery.com/Attributes/attr#keyvalue

 attr( key, value )
 Set a single property to a value, on all matched elements

 going a different direction isn't the solution, something else is
 wrong.

 and your current one of img src as an attribute name is not going
 to work, it's not the name of the property you need to set

 here's a super quick and working example

 http://jsbin.com/aluhe/edit (code)
 http://jsbin.com/aluhe (run)


 On Jan 7, 12:32 pm, Glen_H glen.f.he...@gmail.com wrote:
  does the attr function change the img source or does it add it in?
  Perhaps I need a different function to do it? is that possible?
 
  i am going to try to add a the remove attr function first, then run
  the current one and see if that works...
 
  On Jan 7, 12:25 pm, MorningZ morni...@gmail.com wrote:
 
   Perhaps the path to the image itself isn't ./images ?
 
   Other than that,maybe some more code to show or better yet a live, non-
   working page..
 
   Rest assured the hover event does work, and the way to set an
   img's source is $(this).attr(src) ...  there's something else not
   seen/talked-about/thought-of that is the issue :-)
 
   On Jan 7, 12:10 pm, Glen_H glen.f.he...@gmail.com wrote:
 
I have it now set up like this:
 
 $(#footer #footer-contain #availability img).hover(function () {
$(this).attr('src',
 './images/avail_hover.png'});
 
}
 
it still isnt working. I orig. had it set as src. but nothing seemed
to be working then so i messed around and changed it to img src.
 
any other ideas as to why it might not be working?
 
On Jan 7, 11:41 am, MorningZ morni...@gmail.com wrote:
 
 $(this).attr({'img src' : './images/avail_hover.png'});
 
 there is no img src attr, but there is src, so
 
 $(this).attr('src', './images/avail_hover.png');
 
 and there's a second event to hook on the .hover event is when you
 mouse off, so use that event to revert back to whatever image was
 there
 
 On Jan 7, 11:02 am, Glen_H glen.f.he...@gmail.com wrote:
 
  In my footer I have a sign where I want it to say one thing
 regularly,
  and then when someone hovers, i want it to say sometyhing else. I
  basically made 2 images, and I just want to switch images on the
  hover.
 
  here is my code I used and its not working.:
 
  $(#footer #footer-contain #availability img).hover(function ()
 {
  $(this).attr({'img src' :
 './images/avail_hover.png'});
 }
 
  can anyone help me out with what I need to do?



[jQuery] Can somebody tell me how I can Unsubscribe to the mailing list Pleeeeeeeeease!

2010-01-07 Thread Darren Bernard

Can somebody tell me how I can Unsubscribe to the mailing list Please! 
  
_
Got more than one Hotmail account? Save time by linking them together
 http://clk.atdmt.com/UKM/go/186394591/direct/01/

[jQuery] Re: Can somebody tell me how I can Unsubscribe to the mailing list Pleeeeeeeeease!

2010-01-07 Thread Glen_H
on the right of your screen go to edit my membership

On Jan 7, 1:01 pm, Darren Bernard darrenbernard...@hotmail.com
wrote:
 Can somebody tell me how I can Unsubscribe to the mailing list Please!

 _
 Got more than one Hotmail account? Save time by linking them together
  http://clk.atdmt.com/UKM/go/186394591/direct/01/


[jQuery] Re: JQuery Cycle Speed

2010-01-07 Thread Mike Alsup
 Hey, I'm using the JQuery cycle plugin (http://malsup.com/jquery/cycle/) and
 I have images set to auto-scroll horizontally. The plugin automatically
 eases the slides (I've tried turning easing off), and I'm wondering if
 anyone knows of a way to get them to just continually move horizontally
 (without slowing/speeding up). I'm using it to create the illusion of moving
 fish in a background image:http://blazonmarketing.net/projects/mspd

Cycle doesn't really support a continuous scroll mode.  There is a
continuous option but it doesn't work well with the scroll
transitions.  Cycle takes a breath after every transition so you
always get a brief interval between one transition and another.  With
many transition effects that interval isn't noticeable, but with the
scroll effects it is.

Mike


[jQuery] Re: img src replacement

2010-01-07 Thread MorningZ
ready to know what a major problem is??

your script.js is:

$(document).ready(function() {
   // do stuff when DOM is ready
  $(#footer #footer-contain #availability img).hover(
  function() {
$(this).attr(src, ./images/avail_hover.png);
  },
  function() {
$(this).attr(src, ./images/availab.png);
  }
 );
});

 });


There's an extra }); causing a syntax error, stopping JavaScript
dead in it's tracks..  Firebug pointed that out on page load

On Jan 7, 12:56 pm, Glen Healy glen.f.he...@gmail.com wrote:
 I put up my site quickly here:http://www.glenhealy.com/

 the image should be at the bottom in the footer, if you can view the code,
 maybe you can see what the deal is?

 i used the exact code used in the example so there has to be a file issue

 On Thu, Jan 7, 2010 at 12:44 PM, MorningZ morni...@gmail.com wrote:
  it changes it

 http://docs.jquery.com/Attributes/attr#keyvalue

  attr( key, value )
  Set a single property to a value, on all matched elements

  going a different direction isn't the solution, something else is
  wrong.

  and your current one of img src as an attribute name is not going
  to work, it's not the name of the property you need to set

  here's a super quick and working example

 http://jsbin.com/aluhe/edit(code)
 http://jsbin.com/aluhe(run)

  On Jan 7, 12:32 pm, Glen_H glen.f.he...@gmail.com wrote:
   does the attr function change the img source or does it add it in?
   Perhaps I need a different function to do it? is that possible?

   i am going to try to add a the remove attr function first, then run
   the current one and see if that works...

   On Jan 7, 12:25 pm, MorningZ morni...@gmail.com wrote:

Perhaps the path to the image itself isn't ./images ?

Other than that,maybe some more code to show or better yet a live, non-
working page..

Rest assured the hover event does work, and the way to set an
img's source is $(this).attr(src) ...  there's something else not
seen/talked-about/thought-of that is the issue :-)

On Jan 7, 12:10 pm, Glen_H glen.f.he...@gmail.com wrote:

 I have it now set up like this:

  $(#footer #footer-contain #availability img).hover(function () {
                         $(this).attr('src',
  './images/avail_hover.png'});

 }

 it still isnt working. I orig. had it set as src. but nothing seemed
 to be working then so i messed around and changed it to img src.

 any other ideas as to why it might not be working?

 On Jan 7, 11:41 am, MorningZ morni...@gmail.com wrote:

  $(this).attr({'img src' : './images/avail_hover.png'});

  there is no img src attr, but there is src, so

  $(this).attr('src', './images/avail_hover.png');

  and there's a second event to hook on the .hover event is when you
  mouse off, so use that event to revert back to whatever image was
  there

  On Jan 7, 11:02 am, Glen_H glen.f.he...@gmail.com wrote:

   In my footer I have a sign where I want it to say one thing
  regularly,
   and then when someone hovers, i want it to say sometyhing else. I
   basically made 2 images, and I just want to switch images on the
   hover.

   here is my code I used and its not working.:

   $(#footer #footer-contain #availability img).hover(function ()
  {
                           $(this).attr({'img src' :
  './images/avail_hover.png'});
                                                              }

   can anyone help me out with what I need to do?


[jQuery] CSS problem

2010-01-07 Thread John
Hi,

I have a question about css. I want to dump out all css attributes and
values of a UI element, how to do that in jQuery?

Thanks in advance,

John


[jQuery] Replacing HTML Content for Elements of a Certain Class

2010-01-07 Thread nybbblesandbytes
jQuery group,

I've been using jQuery for my website, and have come up against an
obstacle.  My page dynamically loads comments from DISQUS, and as a
result the comments take a few seconds to load.  I need to make some
jQuery code that runs a function once the comments (which are of class
dsq.comment.message) are created.  I've tried using the load(fn)
event, but it doesn't seem to work for objects that have not yet been
created.  In essence, I need jquery to watch for new elements of a
certain class to be created, then my code will make some mods.  Any
idea how to do this or what event to watch for?

Currently, I am running this code:

$(.dsq-comment-message).load(function () { alert('A comment was just
created'); } );

~ nybblesandbytes


[jQuery] IE 6 and jQuery 1.3.2 .load() issues

2010-01-07 Thread kmh
The following javascript works just fine when called from Firefox, but
IE 6.0.2900 chokes when it sees it:

 $(#data_entry).load(myurl);

 html ---
div id=data_entry
/div


The exception I'm getting is:
   Exception line 1642
   Error: Exception thrown and not caught

I'm quite new to jQuery. I've been searching the bug list but haven't
seen this precise problem documented.
Can anyone with more experience reading the jquery codebase explain
what's happening where it's choking?

Thanks,
kmh


[jQuery] Re: img src replacement

2010-01-07 Thread MorningZ
here's your exact code working

http://jsbin.com/aguji/edit
http://jsbin.com/aguji


On Jan 7, 1:34 pm, MorningZ morni...@gmail.com wrote:
 ready to know what a major problem is??

 your script.js is:

 $(document).ready(function() {
    // do stuff when DOM is ready
   $(#footer #footer-contain #availability img).hover(
               function() {
                 $(this).attr(src, ./images/avail_hover.png);
               },
               function() {
                 $(this).attr(src, ./images/availab.png);
               }
          );
     });

  });

 There's an extra }); causing a syntax error, stopping JavaScript
 dead in it's tracks..  Firebug pointed that out on page load

 On Jan 7, 12:56 pm, Glen Healy glen.f.he...@gmail.com wrote:

  I put up my site quickly here:http://www.glenhealy.com/

  the image should be at the bottom in the footer, if you can view the code,
  maybe you can see what the deal is?

  i used the exact code used in the example so there has to be a file issue

  On Thu, Jan 7, 2010 at 12:44 PM, MorningZ morni...@gmail.com wrote:
   it changes it

  http://docs.jquery.com/Attributes/attr#keyvalue

   attr( key, value )
   Set a single property to a value, on all matched elements

   going a different direction isn't the solution, something else is
   wrong.

   and your current one of img src as an attribute name is not going
   to work, it's not the name of the property you need to set

   here's a super quick and working example

  http://jsbin.com/aluhe/edit(code)
  http://jsbin.com/aluhe(run)

   On Jan 7, 12:32 pm, Glen_H glen.f.he...@gmail.com wrote:
does the attr function change the img source or does it add it in?
Perhaps I need a different function to do it? is that possible?

i am going to try to add a the remove attr function first, then run
the current one and see if that works...

On Jan 7, 12:25 pm, MorningZ morni...@gmail.com wrote:

 Perhaps the path to the image itself isn't ./images ?

 Other than that,maybe some more code to show or better yet a live, 
 non-
 working page..

 Rest assured the hover event does work, and the way to set an
 img's source is $(this).attr(src) ...  there's something else not
 seen/talked-about/thought-of that is the issue :-)

 On Jan 7, 12:10 pm, Glen_H glen.f.he...@gmail.com wrote:

  I have it now set up like this:

   $(#footer #footer-contain #availability img).hover(function () {
                          $(this).attr('src',
   './images/avail_hover.png'});

  }

  it still isnt working. I orig. had it set as src. but nothing seemed
  to be working then so i messed around and changed it to img src.

  any other ideas as to why it might not be working?

  On Jan 7, 11:41 am, MorningZ morni...@gmail.com wrote:

   $(this).attr({'img src' : './images/avail_hover.png'});

   there is no img src attr, but there is src, so

   $(this).attr('src', './images/avail_hover.png');

   and there's a second event to hook on the .hover event is when you
   mouse off, so use that event to revert back to whatever image was
   there

   On Jan 7, 11:02 am, Glen_H glen.f.he...@gmail.com wrote:

In my footer I have a sign where I want it to say one thing
   regularly,
and then when someone hovers, i want it to say sometyhing else. 
I
basically made 2 images, and I just want to switch images on the
hover.

here is my code I used and its not working.:

$(#footer #footer-contain #availability img).hover(function ()
   {
                        $(this).attr({'img src' :
   './images/avail_hover.png'});
                                                           }

can anyone help me out with what I need to do?


[jQuery] Re: img src replacement

2010-01-07 Thread Glen_H
wow. thank you for your patience with me lol. This jquery is cool and
all just a little stressful at times.


thanks again for your help

On Jan 7, 1:34 pm, MorningZ morni...@gmail.com wrote:
 ready to know what a major problem is??

 your script.js is:

 $(document).ready(function() {
    // do stuff when DOM is ready
   $(#footer #footer-contain #availability img).hover(
               function() {
                 $(this).attr(src, ./images/avail_hover.png);
               },
               function() {
                 $(this).attr(src, ./images/availab.png);
               }
          );
     });

  });

 There's an extra }); causing a syntax error, stopping JavaScript
 dead in it's tracks..  Firebug pointed that out on page load

 On Jan 7, 12:56 pm, Glen Healy glen.f.he...@gmail.com wrote:

  I put up my site quickly here:http://www.glenhealy.com/

  the image should be at the bottom in the footer, if you can view the code,
  maybe you can see what the deal is?

  i used the exact code used in the example so there has to be a file issue

  On Thu, Jan 7, 2010 at 12:44 PM, MorningZ morni...@gmail.com wrote:
   it changes it

  http://docs.jquery.com/Attributes/attr#keyvalue

   attr( key, value )
   Set a single property to a value, on all matched elements

   going a different direction isn't the solution, something else is
   wrong.

   and your current one of img src as an attribute name is not going
   to work, it's not the name of the property you need to set

   here's a super quick and working example

  http://jsbin.com/aluhe/edit(code)
  http://jsbin.com/aluhe(run)

   On Jan 7, 12:32 pm, Glen_H glen.f.he...@gmail.com wrote:
does the attr function change the img source or does it add it in?
Perhaps I need a different function to do it? is that possible?

i am going to try to add a the remove attr function first, then run
the current one and see if that works...

On Jan 7, 12:25 pm, MorningZ morni...@gmail.com wrote:

 Perhaps the path to the image itself isn't ./images ?

 Other than that,maybe some more code to show or better yet a live, 
 non-
 working page..

 Rest assured the hover event does work, and the way to set an
 img's source is $(this).attr(src) ...  there's something else not
 seen/talked-about/thought-of that is the issue :-)

 On Jan 7, 12:10 pm, Glen_H glen.f.he...@gmail.com wrote:

  I have it now set up like this:

   $(#footer #footer-contain #availability img).hover(function () {
                          $(this).attr('src',
   './images/avail_hover.png'});

  }

  it still isnt working. I orig. had it set as src. but nothing seemed
  to be working then so i messed around and changed it to img src.

  any other ideas as to why it might not be working?

  On Jan 7, 11:41 am, MorningZ morni...@gmail.com wrote:

   $(this).attr({'img src' : './images/avail_hover.png'});

   there is no img src attr, but there is src, so

   $(this).attr('src', './images/avail_hover.png');

   and there's a second event to hook on the .hover event is when you
   mouse off, so use that event to revert back to whatever image was
   there

   On Jan 7, 11:02 am, Glen_H glen.f.he...@gmail.com wrote:

In my footer I have a sign where I want it to say one thing
   regularly,
and then when someone hovers, i want it to say sometyhing else. 
I
basically made 2 images, and I just want to switch images on the
hover.

here is my code I used and its not working.:

$(#footer #footer-contain #availability img).hover(function ()
   {
                        $(this).attr({'img src' :
   './images/avail_hover.png'});
                                                           }

can anyone help me out with what I need to do?


[jQuery] Re: img src replacement

2010-01-07 Thread Glen_H
Here is another question if you have the time,

now that the image changes on hover, can I add a fade animation so
that it fades to the hover image as opposed to switching back and
forth? or would I have to create a whole new function?

On Jan 7, 1:38 pm, MorningZ morni...@gmail.com wrote:
 here's your exact code working

 http://jsbin.com/aguji/edithttp://jsbin.com/aguji

 On Jan 7, 1:34 pm, MorningZ morni...@gmail.com wrote:

  ready to know what a major problem is??

  your script.js is:

  $(document).ready(function() {
     // do stuff when DOM is ready
    $(#footer #footer-contain #availability img).hover(
                function() {
                  $(this).attr(src, ./images/avail_hover.png);
                },
                function() {
                  $(this).attr(src, ./images/availab.png);
                }
           );
      });

   });

  There's an extra }); causing a syntax error, stopping JavaScript
  dead in it's tracks..  Firebug pointed that out on page load

  On Jan 7, 12:56 pm, Glen Healy glen.f.he...@gmail.com wrote:

   I put up my site quickly here:http://www.glenhealy.com/

   the image should be at the bottom in the footer, if you can view the code,
   maybe you can see what the deal is?

   i used the exact code used in the example so there has to be a file issue

   On Thu, Jan 7, 2010 at 12:44 PM, MorningZ morni...@gmail.com wrote:
it changes it

   http://docs.jquery.com/Attributes/attr#keyvalue

attr( key, value )
Set a single property to a value, on all matched elements

going a different direction isn't the solution, something else is
wrong.

and your current one of img src as an attribute name is not going
to work, it's not the name of the property you need to set

here's a super quick and working example

   http://jsbin.com/aluhe/edit(code)
   http://jsbin.com/aluhe(run)

On Jan 7, 12:32 pm, Glen_H glen.f.he...@gmail.com wrote:
 does the attr function change the img source or does it add it in?
 Perhaps I need a different function to do it? is that possible?

 i am going to try to add a the remove attr function first, then run
 the current one and see if that works...

 On Jan 7, 12:25 pm, MorningZ morni...@gmail.com wrote:

  Perhaps the path to the image itself isn't ./images ?

  Other than that,maybe some more code to show or better yet a live, 
  non-
  working page..

  Rest assured the hover event does work, and the way to set an
  img's source is $(this).attr(src) ...  there's something else 
  not
  seen/talked-about/thought-of that is the issue :-)

  On Jan 7, 12:10 pm, Glen_H glen.f.he...@gmail.com wrote:

   I have it now set up like this:

    $(#footer #footer-contain #availability img).hover(function () 
   {
                           $(this).attr('src',
'./images/avail_hover.png'});

   }

   it still isnt working. I orig. had it set as src. but nothing 
   seemed
   to be working then so i messed around and changed it to img src.

   any other ideas as to why it might not be working?

   On Jan 7, 11:41 am, MorningZ morni...@gmail.com wrote:

$(this).attr({'img src' : './images/avail_hover.png'});

there is no img src attr, but there is src, so

$(this).attr('src', './images/avail_hover.png');

and there's a second event to hook on the .hover event is when 
you
mouse off, so use that event to revert back to whatever image 
was
there

On Jan 7, 11:02 am, Glen_H glen.f.he...@gmail.com wrote:

 In my footer I have a sign where I want it to say one thing
regularly,
 and then when someone hovers, i want it to say sometyhing 
 else. I
 basically made 2 images, and I just want to switch images on 
 the
 hover.

 here is my code I used and its not working.:

 $(#footer #footer-contain #availability img).hover(function 
 ()
{
                         $(this).attr({'img src' :
'./images/avail_hover.png'});
                                                            }

 can anyone help me out with what I need to do?


[jQuery] different lengths by IE and ff

2010-01-07 Thread CreativeMind
Hi,
I have a dropdown which diplays a companyname with 4 hidden inputs.
these hidden input values are set in text boxes on selected index
change of dropdown.
like this
  var sourcedropdown = $(e.target).parent().parent().children(:nth-
child(7)).children().eq(0);
   $(sourcedropdown).append($('option/option').val(val).html
(sourcename).addClass('selectedval'+val));
   var priceval=text[1];
   $.each(priceval,function(leftval,rightval){

   $(sourcedropdown).append($('input type=hidden id=hid'+leftval
+' /').val(rightval));

});


but when i change the selected value in dropdown, I expect 4 as the
length of inputs, firefox shows 4 in alert but IE shows zero.

var sourcedd=$(e.target).parent().parent().children(:nth-child
(7)).children().eq(0);
 $(sourcedd).change(function(){


var hiddenchildrens=$(this).children
(input:hidden);
   alert(hiddenchildrens.length);
});
}
should i append the hidden inputs in some other way ?

thanx,


Re: [jQuery] The form is not submitted onKeyDown

2010-01-07 Thread Nathan Klatt
On Thu, Jan 7, 2010 at 11:04 AM, Andre Polykanine wrote:
 var validator=$(#myform).validate( { snip });

 $(document).keydown (function (e) {
if (e.ctrlKey  e.which==13) { validator.form(); }
 });

 then I'm trying to submit. If I do something wrong (for example, leave
 a required field blank) and press Ctrl+Enter, Validator gently tells
 me that yes, that field is required, go on and fill it in. But if I
 fill in the field and do everything correctly, pressing Ctrl+Enter
 gives absolutely nothing: no errors and no submit.

It's not submitting because you never tell it to. I would first try
replacing the call to validator.form() with $(#myform).submit(). I
would assume that does the validation check first. In case doing that
bypasses the validation, check the return value of validator.form()
and submit if it's successful, a la: if (validator.form())
$(#myform).submit();.

Nathan


Re: [jQuery] JQuery Cycle Speed

2010-01-07 Thread aspacecodyssey

Figured it out. The problem is, in fact, with the easing. Cycle has a default
easing set, but setting it to 'linear' fixes it and makes the entire thing
smooth.


malsup wrote:
 
 Hey, I'm using the JQuery cycle plugin (http://malsup.com/jquery/cycle/)
 and
 I have images set to auto-scroll horizontally. The plugin automatically
 eases the slides (I've tried turning easing off), and I'm wondering if
 anyone knows of a way to get them to just continually move horizontally
 (without slowing/speeding up). I'm using it to create the illusion of
 moving
 fish in a background image:http://blazonmarketing.net/projects/mspd
 
 Cycle doesn't really support a continuous scroll mode.  There is a
 continuous option but it doesn't work well with the scroll
 transitions.  Cycle takes a breath after every transition so you
 always get a brief interval between one transition and another.  With
 many transition effects that interval isn't noticeable, but with the
 scroll effects it is.
 
 Mike
 
 

-- 
View this message in context: 
http://old.nabble.com/JQuery-Cycle-Speed-tp27061872s27240p27065070.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: JQuery Cycle Speed

2010-01-07 Thread Mike Alsup
 Figured it out. The problem is, in fact, with the easing. Cycle has a default
 easing set, but setting it to 'linear' fixes it and makes the entire thing
 smooth.

Hmm, nice.


[jQuery] Validation on a Modal form does not work

2010-01-07 Thread Elan Noy
I have a modal form that I want to validate.
The modal is based on the simple modal plugin and the validation is
based on validation plugin.
The validation works well on a regular (non modal) form. ANy ideas?

 script type=text/javascript
jQuery.validator.addMethod(zip, function(value, element)
{
return this.optional(element) || value.match(/^((\d{5}-
\d{4})|(\d{5})|([a-z]\d[a-z]\s?\d[a-z]\d))$/i);
}, US or Canadian postal code only);
$(document).ready(function(){
getaddressBook();
$(#addAddress).validate({
rules: {
emzip: {
required: true,
zip: true,
},
},
});
});
/script


[jQuery] Re: img src replacement

2010-01-07 Thread MorningZ
like so?

http://jsbin.com/amuma3/edit
http://jsbin.com/amuma3

On Jan 7, 1:45 pm, Glen_H glen.f.he...@gmail.com wrote:
 Here is another question if you have the time,

 now that the image changes on hover, can I add a fade animation so
 that it fades to the hover image as opposed to switching back and
 forth? or would I have to create a whole new function?

 On Jan 7, 1:38 pm, MorningZ morni...@gmail.com wrote:

  here's your exact code working

 http://jsbin.com/aguji/edithttp://jsbin.com/aguji

  On Jan 7, 1:34 pm, MorningZ morni...@gmail.com wrote:

   ready to know what a major problem is??

   your script.js is:

   $(document).ready(function() {
      // do stuff when DOM is ready
     $(#footer #footer-contain #availability img).hover(
                 function() {
                   $(this).attr(src, ./images/avail_hover.png);
                 },
                 function() {
                   $(this).attr(src, ./images/availab.png);
                 }
            );
       });

    });

   There's an extra }); causing a syntax error, stopping JavaScript
   dead in it's tracks..  Firebug pointed that out on page load

   On Jan 7, 12:56 pm, Glen Healy glen.f.he...@gmail.com wrote:

I put up my site quickly here:http://www.glenhealy.com/

the image should be at the bottom in the footer, if you can view the 
code,
maybe you can see what the deal is?

i used the exact code used in the example so there has to be a file 
issue

On Thu, Jan 7, 2010 at 12:44 PM, MorningZ morni...@gmail.com wrote:
 it changes it

http://docs.jquery.com/Attributes/attr#keyvalue

 attr( key, value )
 Set a single property to a value, on all matched elements

 going a different direction isn't the solution, something else is
 wrong.

 and your current one of img src as an attribute name is not going
 to work, it's not the name of the property you need to set

 here's a super quick and working example

http://jsbin.com/aluhe/edit(code)
http://jsbin.com/aluhe(run)

 On Jan 7, 12:32 pm, Glen_H glen.f.he...@gmail.com wrote:
  does the attr function change the img source or does it add it 
  in?
  Perhaps I need a different function to do it? is that possible?

  i am going to try to add a the remove attr function first, then run
  the current one and see if that works...

  On Jan 7, 12:25 pm, MorningZ morni...@gmail.com wrote:

   Perhaps the path to the image itself isn't ./images ?

   Other than that,maybe some more code to show or better yet a 
   live, non-
   working page..

   Rest assured the hover event does work, and the way to set an
   img's source is $(this).attr(src) ...  there's something else 
   not
   seen/talked-about/thought-of that is the issue :-)

   On Jan 7, 12:10 pm, Glen_H glen.f.he...@gmail.com wrote:

I have it now set up like this:

 $(#footer #footer-contain #availability img).hover(function 
() {
                        $(this).attr('src',
 './images/avail_hover.png'});

}

it still isnt working. I orig. had it set as src. but nothing 
seemed
to be working then so i messed around and changed it to img src.

any other ideas as to why it might not be working?

On Jan 7, 11:41 am, MorningZ morni...@gmail.com wrote:

 $(this).attr({'img src' : './images/avail_hover.png'});

 there is no img src attr, but there is src, so

 $(this).attr('src', './images/avail_hover.png');

 and there's a second event to hook on the .hover event is 
 when you
 mouse off, so use that event to revert back to whatever image 
 was
 there

 On Jan 7, 11:02 am, Glen_H glen.f.he...@gmail.com wrote:

  In my footer I have a sign where I want it to say one thing
 regularly,
  and then when someone hovers, i want it to say sometyhing 
  else. I
  basically made 2 images, and I just want to switch images 
  on the
  hover.

  here is my code I used and its not working.:

  $(#footer #footer-contain #availability 
  img).hover(function ()
 {
                          $(this).attr({'img src' :
 './images/avail_hover.png'});
                                                             }

  can anyone help me out with what I need to do?


Re: [jQuery] Re: img src replacement

2010-01-07 Thread Glen Healy
no more like a slowdown in the transition between the images. hope that
makes sense. lol. Like if you move over it now really fast it is twitchy
im thinking what if it were possible to add like a ms or 2 to the actual
hover effect and they will blend more.

instead of fading out they fade into one another i guess is what im trying
to say

On Thu, Jan 7, 2010 at 2:05 PM, MorningZ morni...@gmail.com wrote:

 like so?

 http://jsbin.com/amuma3/edit
 http://jsbin.com/amuma3

 On Jan 7, 1:45 pm, Glen_H glen.f.he...@gmail.com wrote:
  Here is another question if you have the time,
 
  now that the image changes on hover, can I add a fade animation so
  that it fades to the hover image as opposed to switching back and
  forth? or would I have to create a whole new function?
 
  On Jan 7, 1:38 pm, MorningZ morni...@gmail.com wrote:
 
   here's your exact code working
 
  http://jsbin.com/aguji/edithttp://jsbin.com/aguji
 
   On Jan 7, 1:34 pm, MorningZ morni...@gmail.com wrote:
 
ready to know what a major problem is??
 
your script.js is:
 
$(document).ready(function() {
   // do stuff when DOM is ready
  $(#footer #footer-contain #availability img).hover(
  function() {
$(this).attr(src, ./images/avail_hover.png);
  },
  function() {
$(this).attr(src, ./images/availab.png);
  }
 );
});
 
 });
 
There's an extra }); causing a syntax error, stopping JavaScript
dead in it's tracks..  Firebug pointed that out on page load
 
On Jan 7, 12:56 pm, Glen Healy glen.f.he...@gmail.com wrote:
 
 I put up my site quickly here:http://www.glenhealy.com/
 
 the image should be at the bottom in the footer, if you can view
 the code,
 maybe you can see what the deal is?
 
 i used the exact code used in the example so there has to be a file
 issue
 
 On Thu, Jan 7, 2010 at 12:44 PM, MorningZ morni...@gmail.com
 wrote:
  it changes it
 
 http://docs.jquery.com/Attributes/attr#keyvalue
 
  attr( key, value )
  Set a single property to a value, on all matched elements
 
  going a different direction isn't the solution, something else is
  wrong.
 
  and your current one of img src as an attribute name is not
 going
  to work, it's not the name of the property you need to set
 
  here's a super quick and working example
 
 http://jsbin.com/aluhe/edit(code)http://jsbin.com/aluhe/edit%28code%29
 http://jsbin.com/aluhe(run) http://jsbin.com/aluhe%28run%29
 
  On Jan 7, 12:32 pm, Glen_H glen.f.he...@gmail.com wrote:
   does the attr function change the img source or does it add
 it in?
   Perhaps I need a different function to do it? is that possible?
 
   i am going to try to add a the remove attr function first, then
 run
   the current one and see if that works...
 
   On Jan 7, 12:25 pm, MorningZ morni...@gmail.com wrote:
 
Perhaps the path to the image itself isn't ./images ?
 
Other than that,maybe some more code to show or better yet a
 live, non-
working page..
 
Rest assured the hover event does work, and the way to set
 an
img's source is $(this).attr(src) ...  there's something
 else not
seen/talked-about/thought-of that is the issue :-)
 
On Jan 7, 12:10 pm, Glen_H glen.f.he...@gmail.com wrote:
 
 I have it now set up like this:
 
  $(#footer #footer-contain #availability
 img).hover(function () {
 $(this).attr('src',
  './images/avail_hover.png'});
 
 }
 
 it still isnt working. I orig. had it set as src. but
 nothing seemed
 to be working then so i messed around and changed it to img
 src.
 
 any other ideas as to why it might not be working?
 
 On Jan 7, 11:41 am, MorningZ morni...@gmail.com wrote:
 
  $(this).attr({'img src' : './images/avail_hover.png'});
 
  there is no img src attr, but there is src, so
 
  $(this).attr('src', './images/avail_hover.png');
 
  and there's a second event to hook on the .hover event is
 when you
  mouse off, so use that event to revert back to whatever
 image was
  there
 
  On Jan 7, 11:02 am, Glen_H glen.f.he...@gmail.com
 wrote:
 
   In my footer I have a sign where I want it to say one
 thing
  regularly,
   and then when someone hovers, i want it to say
 sometyhing else. I
   basically made 2 images, and I just want to switch
 images on the
   hover.
 
   here is my code I used and its not working.:
 
   $(#footer #footer-contain #availability
 img).hover(function ()
  {
   $(this).attr({'img src' :
  './images/avail_hover.png'});
  
}
 
   can anyone help me out with what I need to do?



[jQuery] Re: different lengths by IE and ff

2010-01-07 Thread KeeganWatkins
at first glance, you may be expecting the :hidden selector to work
differently than it actually does:

http://docs.jquery.com/Selectors/hidden

the original implementation, before 1.3.2, checked for either
display:none or visibility:hidden, whereas the new implementation
selects elements ...if it or its parents consumes no space in
document. CSS visibility isn't taken into account.

so, my first question would be, which version of jQuery are you using?
anything before 1.3.2 won't even return hidden inputs with the
:hidden selector.

can you post a test page?

On Jan 7, 12:48 pm, CreativeMind aftab.pu...@gmail.com wrote:
 Hi,
 I have a dropdown which diplays a companyname with 4 hidden inputs.
 these hidden input values are set in text boxes on selected index
 change of dropdown.
 like this
   var sourcedropdown = $(e.target).parent().parent().children(:nth-
 child(7)).children().eq(0);
    $(sourcedropdown).append($('option/option').val(val).html
 (sourcename).addClass('selectedval'+val));
    var priceval=text[1];
    $.each(priceval,function(leftval,rightval){

    $(sourcedropdown).append($('input type=hidden id=hid'+leftval
 +' /').val(rightval));

                             });

 but when i change the selected value in dropdown, I expect 4 as the
 length of inputs, firefox shows 4 in alert but IE shows zero.

 var sourcedd=$(e.target).parent().parent().children(:nth-child
 (7)).children().eq(0);
  $(sourcedd).change(function(){

                     var hiddenchildrens=$(this).children
 (input:hidden);
                    alert(hiddenchildrens.length);});
 }

 should i append the hidden inputs in some other way ?

 thanx,


[jQuery] Re: img src replacement

2010-01-07 Thread MorningZ
I'd suggest reading through this blog post:

http://jqueryfordesigners.com/image-cross-fade-transition/


On Jan 7, 2:14 pm, Glen Healy glen.f.he...@gmail.com wrote:
 no more like a slowdown in the transition between the images. hope that
 makes sense. lol. Like if you move over it now really fast it is twitchy
 im thinking what if it were possible to add like a ms or 2 to the actual
 hover effect and they will blend more.

 instead of fading out they fade into one another i guess is what im trying
 to say

 On Thu, Jan 7, 2010 at 2:05 PM, MorningZ morni...@gmail.com wrote:
  like so?

 http://jsbin.com/amuma3/edit
 http://jsbin.com/amuma3

  On Jan 7, 1:45 pm, Glen_H glen.f.he...@gmail.com wrote:
   Here is another question if you have the time,

   now that the image changes on hover, can I add a fade animation so
   that it fades to the hover image as opposed to switching back and
   forth? or would I have to create a whole new function?

   On Jan 7, 1:38 pm, MorningZ morni...@gmail.com wrote:

here's your exact code working

   http://jsbin.com/aguji/edithttp://jsbin.com/aguji

On Jan 7, 1:34 pm, MorningZ morni...@gmail.com wrote:

 ready to know what a major problem is??

 your script.js is:

 $(document).ready(function() {
    // do stuff when DOM is ready
   $(#footer #footer-contain #availability img).hover(
               function() {
                 $(this).attr(src, ./images/avail_hover.png);
               },
               function() {
                 $(this).attr(src, ./images/availab.png);
               }
          );
     });

  });

 There's an extra }); causing a syntax error, stopping JavaScript
 dead in it's tracks..  Firebug pointed that out on page load

 On Jan 7, 12:56 pm, Glen Healy glen.f.he...@gmail.com wrote:

  I put up my site quickly here:http://www.glenhealy.com/

  the image should be at the bottom in the footer, if you can view
  the code,
  maybe you can see what the deal is?

  i used the exact code used in the example so there has to be a file
  issue

  On Thu, Jan 7, 2010 at 12:44 PM, MorningZ morni...@gmail.com
  wrote:
   it changes it

  http://docs.jquery.com/Attributes/attr#keyvalue

   attr( key, value )
   Set a single property to a value, on all matched elements

   going a different direction isn't the solution, something else is
   wrong.

   and your current one of img src as an attribute name is not
  going
   to work, it's not the name of the property you need to set

   here's a super quick and working example

  http://jsbin.com/aluhe/edit(code)http://jsbin.com/aluhe/edit%28code%29
  http://jsbin.com/aluhe(run) http://jsbin.com/aluhe%28run%29

   On Jan 7, 12:32 pm, Glen_H glen.f.he...@gmail.com wrote:
does the attr function change the img source or does it add
  it in?
Perhaps I need a different function to do it? is that possible?

i am going to try to add a the remove attr function first, then
  run
the current one and see if that works...

On Jan 7, 12:25 pm, MorningZ morni...@gmail.com wrote:

 Perhaps the path to the image itself isn't ./images ?

 Other than that,maybe some more code to show or better yet a
  live, non-
 working page..

 Rest assured the hover event does work, and the way to set
  an
 img's source is $(this).attr(src) ...  there's something
  else not
 seen/talked-about/thought-of that is the issue :-)

 On Jan 7, 12:10 pm, Glen_H glen.f.he...@gmail.com wrote:

  I have it now set up like this:

   $(#footer #footer-contain #availability
  img).hover(function () {
                          $(this).attr('src',
   './images/avail_hover.png'});

  }

  it still isnt working. I orig. had it set as src. but
  nothing seemed
  to be working then so i messed around and changed it to img
  src.

  any other ideas as to why it might not be working?

  On Jan 7, 11:41 am, MorningZ morni...@gmail.com wrote:

   $(this).attr({'img src' : './images/avail_hover.png'});

   there is no img src attr, but there is src, so

   $(this).attr('src', './images/avail_hover.png');

   and there's a second event to hook on the .hover event is
  when you
   mouse off, so use that event to revert back to whatever
  image was
   there

   On Jan 7, 11:02 am, Glen_H glen.f.he...@gmail.com
  wrote:

In my footer I have a sign where I want it to say one
  thing
   regularly,
and then when someone hovers, i want it to say
  sometyhing else. I
basically made 2 images, and I just want to switch
  images on the
hover.

here is my code I used and its not working.:

$(#footer #footer-contain #availability
  

[jQuery] Re: different lengths by IE and ff

2010-01-07 Thread CreativeMind
I am using v1.3.2.I can't show the test page because i'm using
localhost. the generated html of that div is given below.
---In IE---
DIV class=ws_c7 sizcache=18 sizset=9 nodeIndex=7
jQuery1262891096843=258
SELECT id=source0 name=source sizcache=18 sizset=9
jQuery1262891096843=259
OPTIONSelect One/OPTIONOPTION class=selectedval0 selected
value=0Adobe Systems Inc. /OPTION/SELECT /DIV
--- in ff---
div class=ws_c7
select id=source0 name=source

  optionSelect One/option

option class=selectedval0 value=0Tech Data
Corporation /optioninput value=31 id=hidCode
type=hiddeninput value=3942.72 id=hidValue
type=hiddeninput value=C  id=hidName
type=hiddeninput value=0.0 id=hidMarkup type=hidden/
select
  /div


On Jan 8, 12:19 am, KeeganWatkins keeganwatk...@gmail.com wrote:
 at first glance, you may be expecting the :hidden selector to work
 differently than it actually does:

 http://docs.jquery.com/Selectors/hidden

 the original implementation, before 1.3.2, checked for either
 display:none or visibility:hidden, whereas the new implementation
 selects elements ...if it or its parents consumes no space in
 document. CSS visibility isn't taken into account.

 so, my first question would be, which version of jQuery are you using?
 anything before 1.3.2 won't even return hidden inputs with the
 :hidden selector.

 can you post a test page?

 On Jan 7, 12:48 pm, CreativeMind aftab.pu...@gmail.com wrote:

  Hi,
  I have a dropdown which diplays a companyname with 4 hidden inputs.
  these hidden input values are set in text boxes on selected index
  change of dropdown.
  like this
    var sourcedropdown = $(e.target).parent().parent().children(:nth-
  child(7)).children().eq(0);
     $(sourcedropdown).append($('option/option').val(val).html
  (sourcename).addClass('selectedval'+val));
     var priceval=text[1];
     $.each(priceval,function(leftval,rightval){

     $(sourcedropdown).append($('input type=hidden id=hid'+leftval
  +' /').val(rightval));

                              });

  but when i change the selected value in dropdown, I expect 4 as the
  length of inputs, firefox shows 4 in alert but IE shows zero.

  var sourcedd=$(e.target).parent().parent().children(:nth-child
  (7)).children().eq(0);
   $(sourcedd).change(function(){

                      var hiddenchildrens=$(this).children
  (input:hidden);
                     alert(hiddenchildrens.length);});
  }

  should i append the hidden inputs in some other way ?

  thanx,


[jQuery] Re: different lengths by IE and ff

2010-01-07 Thread CreativeMind
Actually this line
$(sourcedropdown).append($('input type=hidden id=hid'+leftval
+' /').val(rightval));
is not working in IE.. any alternative?



On Jan 8, 12:46 am, CreativeMind aftab.pu...@gmail.com wrote:
 I am using v1.3.2.I can't show the test page because i'm using
 localhost. the generated html of that div is given below.
 ---In IE---
 DIV class=ws_c7 sizcache=18 sizset=9 nodeIndex=7
 jQuery1262891096843=258
 SELECT id=source0 name=source sizcache=18 sizset=9
 jQuery1262891096843=259
 OPTIONSelect One/OPTIONOPTION class=selectedval0 selected
 value=0Adobe Systems Inc. /OPTION/SELECT /DIV
 --- in ff---
 div class=ws_c7
                 select id=source0 name=source

                   optionSelect One/option

                 option class=selectedval0 value=0Tech Data
 Corporation /optioninput value=31 id=hidCode
 type=hiddeninput value=3942.72 id=hidValue
 type=hiddeninput value=C          id=hidName
 type=hiddeninput value=0.0 id=hidMarkup type=hidden/
 select
               /div
 

 On Jan 8, 12:19 am, KeeganWatkins keeganwatk...@gmail.com wrote:

  at first glance, you may be expecting the :hidden selector to work
  differently than it actually does:

 http://docs.jquery.com/Selectors/hidden

  the original implementation, before 1.3.2, checked for either
  display:none or visibility:hidden, whereas the new implementation
  selects elements ...if it or its parents consumes no space in
  document. CSS visibility isn't taken into account.

  so, my first question would be, which version of jQuery are you using?
  anything before 1.3.2 won't even return hidden inputs with the
  :hidden selector.

  can you post a test page?

  On Jan 7, 12:48 pm, CreativeMind aftab.pu...@gmail.com wrote:

   Hi,
   I have a dropdown which diplays a companyname with 4 hidden inputs.
   these hidden input values are set in text boxes on selected index
   change of dropdown.
   like this
     var sourcedropdown = $(e.target).parent().parent().children(:nth-
   child(7)).children().eq(0);
      $(sourcedropdown).append($('option/option').val(val).html
   (sourcename).addClass('selectedval'+val));
      var priceval=text[1];
      $.each(priceval,function(leftval,rightval){

      $(sourcedropdown).append($('input type=hidden id=hid'+leftval
   +' /').val(rightval));

                               });

   but when i change the selected value in dropdown, I expect 4 as the
   length of inputs, firefox shows 4 in alert but IE shows zero.

   var sourcedd=$(e.target).parent().parent().children(:nth-child
   (7)).children().eq(0);
    $(sourcedd).change(function(){

                       var hiddenchildrens=$(this).children
   (input:hidden);
                      alert(hiddenchildrens.length);});
   }

   should i append the hidden inputs in some other way ?

   thanx,


[jQuery] Re: different lengths by IE and ff

2010-01-07 Thread CreativeMind
I resolved the problem by just removing $ from input type. means,
appended string rather a jquery object and it works in ie and ff.

thanx

On Jan 8, 1:01 am, CreativeMind aftab.pu...@gmail.com wrote:
 Actually this line
 $(sourcedropdown).append($('input type=hidden id=hid'+leftval
 +' /').val(rightval));
 is not working in IE.. any alternative?

 On Jan 8, 12:46 am, CreativeMind aftab.pu...@gmail.com wrote:

  I am using v1.3.2.I can't show the test page because i'm using
  localhost. the generated html of that div is given below.
  ---In IE---
  DIV class=ws_c7 sizcache=18 sizset=9 nodeIndex=7
  jQuery1262891096843=258
  SELECT id=source0 name=source sizcache=18 sizset=9
  jQuery1262891096843=259
  OPTIONSelect One/OPTIONOPTION class=selectedval0 selected
  value=0Adobe Systems Inc. /OPTION/SELECT /DIV
  --- in ff---
  div class=ws_c7
                  select id=source0 name=source

                    optionSelect One/option

                  option class=selectedval0 value=0Tech Data
  Corporation /optioninput value=31 id=hidCode
  type=hiddeninput value=3942.72 id=hidValue
  type=hiddeninput value=C          id=hidName
  type=hiddeninput value=0.0 id=hidMarkup type=hidden/
  select
                /div
  

  On Jan 8, 12:19 am, KeeganWatkins keeganwatk...@gmail.com wrote:

   at first glance, you may be expecting the :hidden selector to work
   differently than it actually does:

  http://docs.jquery.com/Selectors/hidden

   the original implementation, before 1.3.2, checked for either
   display:none or visibility:hidden, whereas the new implementation
   selects elements ...if it or its parents consumes no space in
   document. CSS visibility isn't taken into account.

   so, my first question would be, which version of jQuery are you using?
   anything before 1.3.2 won't even return hidden inputs with the
   :hidden selector.

   can you post a test page?

   On Jan 7, 12:48 pm, CreativeMind aftab.pu...@gmail.com wrote:

Hi,
I have a dropdown which diplays a companyname with 4 hidden inputs.
these hidden input values are set in text boxes on selected index
change of dropdown.
like this
  var sourcedropdown = $(e.target).parent().parent().children(:nth-
child(7)).children().eq(0);
   $(sourcedropdown).append($('option/option').val(val).html
(sourcename).addClass('selectedval'+val));
   var priceval=text[1];
   $.each(priceval,function(leftval,rightval){

   $(sourcedropdown).append($('input type=hidden id=hid'+leftval
+' /').val(rightval));

                            });

but when i change the selected value in dropdown, I expect 4 as the
length of inputs, firefox shows 4 in alert but IE shows zero.

var sourcedd=$(e.target).parent().parent().children(:nth-child
(7)).children().eq(0);
 $(sourcedd).change(function(){

                    var hiddenchildrens=$(this).children
(input:hidden);
                   alert(hiddenchildrens.length);});
}

should i append the hidden inputs in some other way ?

thanx,


[jQuery] jQuery AJAX Question

2010-01-07 Thread Matthew Maxwell
I was curious if there was a way to hit the current xhr object in the
success callback.  I've been tinkering with it, and have been unable
to figure out how to do that.

The reason I ask is because I am trying to debug an application I've
been working on, and sometimes the response XML is not formatted
correctly; however, the occurrence seems random, and still triggers
the success method, since there are no actual server-side errors.

I'm looking to do something like:

var data = $.param(myObj); // post data

// AJAX to val page
$.ajax({
type: POST,
url: myval.asp,
data: data,
dataType: xml,
async: true,
global: false,
cache: false,
success: function (objXml) {
$(objXml).find(ticket).exists( // see if the ticket is present
function () {
var ticket = this.attr(number);
if (typeof(ticket) === undefined) {
errorProcess({
fn: fnName,
detail: Ticket is present, 
but value is null,
page: myval.asp,
post: data,
responseText: 
xhr.responseText // need tp hit XHR object here
})
}
// do stuff
}
).absent(
function () {
errorProcess({
fn: fnName,
detail: Ticket is not present in 
response,
page: myval.asp,
post: data,
responseText: xhr.responseText // 
need to hit the XHR object
here
});
}
);
},
error: functon (xhr) {
errorProcess({
fn: fnName,
detail: Specifics on what's supposed to happen,
page: myval.asp, // page I'm trying to AJAX to
post: data,
responseText: xhr.responseText
});
}
});


$(selector).exists() and $(selector).absent() are functions I added.
Basically, if the selector is found in the DOM, the callback in exists
is executed, if it's not found in the DOM, the callback in absent is
executed.

I'm needing to hit the XHR object's responseText property inside the
success function of the AJAX call, but am not able to do so.

Any ideas?


[jQuery] error messages via remote validation

2010-01-07 Thread Kim
Hi,

I am fairly new to jquery,  jquery validation and competely new to
JSON. I was wondering if anyone could provide or point me to an
example of a use of the remote method of the validation plugin that
can display the error message returned by the remotely called php
file.

I have an input field wherein someone enters an id to a database
table, specifically an id called media_id. I have the remote method
set up to call a php script (check_database.php)  that looks for that
media_id in my database. There are a number of reasons that search
might fail: the id might not exist, or it might exist but have a
certain invalid status, etc. I would like to be able to display a
message specific to the problem rather than one generic That id is
invalid message. I read that my php script could return a json
formatted message, but I am not sure how to do that, or how to modify
the javascript to handle what it gets back. I would appreciate any
help!

my starting point in my javascript file:

 rules: {
media_id: {
   required: true,
   remote: 'check_database.php'
}
 },

summary of what I am trying to do in check_database.php:

database query with media_id
if no errors
   return true
else if  error 1
  return ???
else if error 2
  return  ???
etc.



[jQuery] Superfish 1.4.8 accessibility enhancement

2010-01-07 Thread Jason Denizac
Superfish is a jQuery plugin for progressive enhancement of suckerfish-
style HTML/CSS drop-down menus. It can be found at
http://users.tpg.com.au/j_birch/plugins/superfish/

The original Superfish plugin used jQuery's hide() method, which sets
an inline css attribute of display: none on the hidden menus. This has
the unintended effect of making screen readers skip over the submenus.
Since screen readers cannot easily trigger the hover event, this
effectively blocks them from accessing any of the sub menu items.

This modification changes the css technique used to hide the menus
visually while leaving them available for screen readers.

You can grab the updated code here http://jsbin.com/useku

(Apologies if this is the wrong place for this posting - the author of
the original Superfish plugin mentioned this list as the place for
support for the plugin. Thanks!)

Jason Denizac


[jQuery] Re: jQuery AJAX Question

2010-01-07 Thread Mike Alsup
 I was curious if there was a way to hit the current xhr object in the
 success callback.  I've been tinkering with it, and have been unable
 to figure out how to do that.

No, but you can access the xhr in the 'complete' callback.


[jQuery] Validation rules using alert() instead of message text

2010-01-07 Thread jasonk
I have done a lot of searching for this answer but I can't quite find
what I am looking for. I have a form with multiple fields - name,
address, email, etc. When you make a field required or email you can
specify the message to appear in a text summary or as text next to the
field. What I would like though is alert() summary of all of the
errors. I know you can get the numberOfInvalids() in the
invalidHandler but I would like to know the specific errors for each
of the fields. For example, I would like to be able to alert() a
message stating what caused the invalidHandler to fire:

Name is required.
Invalid email address.

Is this possible? Or am I only stuck with know the number of errors? I
know I could highlight the fields using CSS but I would really like an
alert() summary.


Thanks in advance!
Jason


[jQuery] click event is not working

2010-01-07 Thread CreativeMind
hi,
i'm appending a child div in a parent div. parent div has already
child div's which have classes ws_c1 and plus.

$('div/div').addClass('ws_c1').addClass('plus').appendTo($
('#'+'parentdiv'+counter));

but when i try to do this
 $(.ws_c1.plus).click(function() {alert('test');});
It works on other child div's but not on the appended div's. I've also
tried with Id's.
can you plz help me.

regards,


[jQuery] Re: jQuery and IE 8

2010-01-07 Thread Scott Sauyet
I don't get any error.  Have you fixed it since posting yesterday?

   -- Scott


Re: [jQuery] click event is not working

2010-01-07 Thread Charlie Griefer
http://docs.jquery.com/Events/live

On Thu, Jan 7, 2010 at 2:01 PM, CreativeMind aftab.pu...@gmail.com wrote:

 hi,
 i'm appending a child div in a parent div. parent div has already
 child div's which have classes ws_c1 and plus.

 $('div/div').addClass('ws_c1').addClass('plus').appendTo($
 ('#'+'parentdiv'+counter));

 but when i try to do this
  $(.ws_c1.plus).click(function() {alert('test');});
 It works on other child div's but not on the appended div's. I've also
 tried with Id's.
 can you plz help me.

 regards,




-- 
Charlie Griefer
http://charlie.griefer.com/

I have failed as much as I have succeeded. But I love my life. I love my
wife. And I wish you my kind of success.


[jQuery] Re: Go through XML nodes only 1 level deep

2010-01-07 Thread Jules
As suggested by Steven, set the ContentType to text/xml.  I don't
know how to do it in php, but here is the snipped from data source in
c# .

StringBuilder sb = new StringBuilder();
sb.Append(?xml version=\1.0\ encoding=\UTF-8\?);
sb.Append(Response);
sb.Append(Ip74.125.45.100/Ip);
sb.Append(StatusOK/Status);
sb.Append(CountryCodeUS/CountryCode);
sb.Append(CountryNameUnited States/CountryName);
sb.Append(RegionCode06/RegionCode);
sb.Append(RegionNameCalifornia/RegionName);
sb.Append(CityMountain View/City);
sb.Append(ZipPostalCode94043/ZipPostalCode);
sb.Append(Latitude37.4192/Latitude);
sb.Append(Longitude-122.057/Longitude);
sb.Append(Timezone-8/Timezone);
sb.Append(Gmtoffset-8/Gmtoffset);
sb.Append(Dstoffset-7/Dstoffset);
sb.Append(/Response);


Response.Clear();
Response.ContentType = text/xml;
Response.Write(sb.ToString());
Response.End();

On Jan 8, 2:42 am, Frank Peterson fictionalper...@gmail.com wrote:
 That works in IE8, but in FF 3.5.3 I get undefined in the alertbox.
 I've disabled adblock and flashblock, so its not those interfering. I
 dont get anything in the error console either.

 The code I had posted earlier doesn't work in FF 3.53 either. I'm
 accessing it by running it on my desktop with this as the URL
 file:///c:/xampplite/htdocs/DEVELOPMENT/geolocate.htm
 but even when I access it via a decent URL I still get undefined in 
 FFhttp://localhost/DEVELOPMENT/geolocate.htm

 On Jan 6, 10:13 pm, Jules jwira...@gmail.com wrote:

  Ahah, too much stale eggnog.

                  var option = {
                      error: function(request, status, error) {
                          alert(error);
                      },
                      success: function(data, status) {

                          var xml = $(data);
                          alert(xml.find('City').text());
                      },
                      dataType: xml,
                      type: GET,
                      url: your url here
                  };

                  $.ajax(option);

  This code works for me.

  On Jan 7, 2:50 pm, Steven Yang kenshin...@gmail.com wrote:

   just making sure

   you are not able to parse the xml at all right?
   i believe for IE you have to make sure you server returns the correct
   content type like text/xml to client inorder for you to parse

   hope this help

   On Thu, Jan 7, 2010 at 9:30 AM, Jules jwira...@gmail.com wrote:
For some reason, it works on firefox (3.5.6) and doesn't work in ie
6.0 and 8.0

On Jan 7, 6:39 am, Frank Peterson fictionalper...@gmail.com wrote:
 I'm grabbing an XML file with jQuery like this:

 $(document).ready(function(){
     $.ajax({
         type: GET,
         url: http://ipinfodb.com/ip_query.php?ip=74.125.45.100;,
         dataType: xml,
         success: function(xml) {
             //$(xml).find().each(function(){
                 var city = $(xml).find(City).text();
                 /*
                 $('div class=items id=link_'+id+'/div').html
 ('a href='+url+''+title+'/a').appendTo('#page-wrap');
                 $(this).find('desc').each(function(){
                     var brief = $(this).find('brief').text();
                     var long = $(this).find('long').text();
                     $('div 
 class=brief/div').html(brief).appendTo
 ('#link_'+id);
                     $('div class=long/div').html(long).appendTo
 ('#link_'+id);
                 });
                 */
                 alert(city)
             //});
         }
     });

 });

 The XML file looks like this
 ?xml version=1.0 encoding=UTF-8?
 Response
         Ip74.125.45.100/Ip
         StatusOK/Status
         CountryCodeUS/CountryCode
         CountryNameUnited States/CountryName
         RegionCode06/RegionCode
         RegionNameCalifornia/RegionName
         CityMountain View/City
         ZipPostalCode94043/ZipPostalCode
         Latitude37.4192/Latitude
         Longitude-122.057/Longitude
         Timezone-8/Timezone
         Gmtoffset-8/Gmtoffset
         Dstoffset-7/Dstoffset
 /Response

 But I can't get it to pull the data out.


Re: [jQuery] Can jquery do this? font-colour

2010-01-07 Thread Don Dunbar
The easiest way to do that is simply make the background to that area black.
Then the white text shows up no matter what. It would eliminate the need to
do extra work with scripts.
DED

On Tue, Jan 5, 2010 at 5:09 PM, annie anne.03gr...@gmail.com wrote:

 I'm very very new to jquery so please be patient with my questions.

 I have a layout that has white colored text.  When you turn images off
 the text disappears because the back background is completely white.

 So, with the scenario above is it possible to use jquery to do the
 following:

 font color is white
 when user turns images off on their browser
 then change font to color =black

 So basically its not 'how do I change the font color' but 'how do I
 detect that the user has images turned off, *then* change the font
 color'

 Your help would be much appreciated.

 Thank-you in advance.

 AnneG



[jQuery] Re: Go through XML nodes only 1 level deep

2010-01-07 Thread Frank Peterson
Well the xml file is not on my server, but I'll try to shoot them an
email and let them know, they should set the headers.

On Jan 7, 4:44 pm, Jules jwira...@gmail.com wrote:
 As suggested by Steven, set the ContentType to text/xml.  I don't
 know how to do it in php, but here is the snipped from data source in
 c# .

         StringBuilder sb = new StringBuilder();
         sb.Append(?xml version=\1.0\ encoding=\UTF-8\?);
         sb.Append(Response);
         sb.Append(Ip74.125.45.100/Ip);
         sb.Append(StatusOK/Status);
         sb.Append(CountryCodeUS/CountryCode);
         sb.Append(CountryNameUnited States/CountryName);
         sb.Append(RegionCode06/RegionCode);
         sb.Append(RegionNameCalifornia/RegionName);
         sb.Append(CityMountain View/City);
         sb.Append(ZipPostalCode94043/ZipPostalCode);
         sb.Append(Latitude37.4192/Latitude);
         sb.Append(Longitude-122.057/Longitude);
         sb.Append(Timezone-8/Timezone);
         sb.Append(Gmtoffset-8/Gmtoffset);
         sb.Append(Dstoffset-7/Dstoffset);
         sb.Append(/Response);

         Response.Clear();
         Response.ContentType = text/xml;
         Response.Write(sb.ToString());
         Response.End();

 On Jan 8, 2:42 am, Frank Peterson fictionalper...@gmail.com wrote:

  That works in IE8, but in FF 3.5.3 I get undefined in the alertbox.
  I've disabled adblock and flashblock, so its not those interfering. I
  dont get anything in the error console either.

  The code I had posted earlier doesn't work in FF 3.53 either. I'm
  accessing it by running it on my desktop with this as the URL
  file:///c:/xampplite/htdocs/DEVELOPMENT/geolocate.htm
  but even when I access it via a decent URL I still get undefined in 
  FFhttp://localhost/DEVELOPMENT/geolocate.htm

  On Jan 6, 10:13 pm, Jules jwira...@gmail.com wrote:

   Ahah, too much stale eggnog.

                   var option = {
                       error: function(request, status, error) {
                           alert(error);
                       },
                       success: function(data, status) {

                           var xml = $(data);
                           alert(xml.find('City').text());
                       },
                       dataType: xml,
                       type: GET,
                       url: your url here
                   };

                   $.ajax(option);

   This code works for me.

   On Jan 7, 2:50 pm, Steven Yang kenshin...@gmail.com wrote:

just making sure

you are not able to parse the xml at all right?
i believe for IE you have to make sure you server returns the correct
content type like text/xml to client inorder for you to parse

hope this help

On Thu, Jan 7, 2010 at 9:30 AM, Jules jwira...@gmail.com wrote:
 For some reason, it works on firefox (3.5.6) and doesn't work in ie
 6.0 and 8.0

 On Jan 7, 6:39 am, Frank Peterson fictionalper...@gmail.com wrote:
  I'm grabbing an XML file with jQuery like this:

  $(document).ready(function(){
      $.ajax({
          type: GET,
          url: http://ipinfodb.com/ip_query.php?ip=74.125.45.100;,
          dataType: xml,
          success: function(xml) {
              //$(xml).find().each(function(){
                  var city = $(xml).find(City).text();
                  /*
                  $('div class=items id=link_'+id+'/div').html
  ('a href='+url+''+title+'/a').appendTo('#page-wrap');
                  $(this).find('desc').each(function(){
                      var brief = $(this).find('brief').text();
                      var long = $(this).find('long').text();
                      $('div 
  class=brief/div').html(brief).appendTo
  ('#link_'+id);
                      $('div 
  class=long/div').html(long).appendTo
  ('#link_'+id);
                  });
                  */
                  alert(city)
              //});
          }
      });

  });

  The XML file looks like this
  ?xml version=1.0 encoding=UTF-8?
  Response
          Ip74.125.45.100/Ip
          StatusOK/Status
          CountryCodeUS/CountryCode
          CountryNameUnited States/CountryName
          RegionCode06/RegionCode
          RegionNameCalifornia/RegionName
          CityMountain View/City
          ZipPostalCode94043/ZipPostalCode
          Latitude37.4192/Latitude
          Longitude-122.057/Longitude
          Timezone-8/Timezone
          Gmtoffset-8/Gmtoffset
          Dstoffset-7/Dstoffset
  /Response

  But I can't get it to pull the data out.


Re: [jQuery] Replacing HTML Content for Elements of a Certain Class

2010-01-07 Thread brian
see here:
http://docs.jquery.com/Frequently_Asked_Questions#Why_do_my_events_stop_working_after_an_AJAX_request.3F
http://docs.jquery.com/Plugins/livequery

Essentially, you either need to deal with this in the load() success
callback or use live(). However, i can't remember if live() works for
the load event (the docs don't sem to spell this out).

On Thu, Jan 7, 2010 at 11:33 AM, nybbblesandbytes
nybblesandbytes...@gmail.com wrote:
 jQuery group,

 I've been using jQuery for my website, and have come up against an
 obstacle.  My page dynamically loads comments from DISQUS, and as a
 result the comments take a few seconds to load.  I need to make some
 jQuery code that runs a function once the comments (which are of class
 dsq.comment.message) are created.  I've tried using the load(fn)
 event, but it doesn't seem to work for objects that have not yet been
 created.  In essence, I need jquery to watch for new elements of a
 certain class to be created, then my code will make some mods.  Any
 idea how to do this or what event to watch for?

 Currently, I am running this code:

 $(.dsq-comment-message).load(function () { alert('A comment was just
 created'); } );

 ~ nybblesandbytes



[jQuery] SimpleModal (probably something really stupid)

2010-01-07 Thread polarwarp
I am using the jquery simplemodal code to display a div on a page.

I am pretty much calling .modal(); on the div, which has a class on
it, and I'm styling up that class - some issues though:

1. How do I add a close button.  Have seen that I can add a closeimg
style - but I can't get anything with this class to appear.  I figure
I need to set the closehtml property to something but haven't figured
out what.  As this is embedded in c# I might have stuffed up my string
escaping.
string termconditions = @$('# + pnlMemberAgreement.ClientID +
').modal({ closeHTML: ''});;
I also tried a href=#Close/a instead of just '' - but either its
making no difference or I can't figure out what quotations to use
within my c# string.

.simplemodal-container a.modalCloseImg {
  background:url(../App_Themes/Images/Ecommerce/x.png) no-repeat;
  width:25px;
  height:29px;
  display:inline;
  z-index:3200;
  position:absolute;
  top:-14px;
  right:-18px;
  cursor:pointer;
}

2. Whilst the div is made visible, it sits under my content - its not
being overlayed over the top, nor does it have a background colour
going on.  I grabbed from the sample site:
.simplemodal-overlay {
  background-color:#000;
  cursor:wait;
}

.simplemodal-container {
  height:400px;
  width:600px;
  background-color:#fff;
  border:3px solid #ccc;
}

Is this an additional option I need to set?

3.  The div is not acting like a modal object - I can still click
other buttons and stuff on the same page and leave the page!

4. I'm confused with the styling.
what do I need to put on my div so that the right styles get applied
to it - or should I be doing this in options?  ie. I have my tc
inside a panel, and I tried putting a css class on that for the
container part, but where do I put the overlay - or should I not have
to do this.

It sort of looks like the basic modal example does what I want it to
do.. but I can't figure out what I have missed in my implementation of
it :(

I pretty much have this in my c#
string termconditions = @$('# + pnlMemberAgreement.ClientID +
').modal();;

and want to apply some basic stylings so that the frontend guy can
take over but it will do what its supposed to

Thanks for any assistance!



Re: [jQuery] Drag and Drop and Remember Position?

2010-01-07 Thread West415

bump...


West415 wrote:
 
 Hi,
 
 I have a page where users can drag and sort a set of divs.  Each div is
 like a widget and the code below allows you to move divs around pretty
 easily.  The problem for me is I want to somehow store and retrieve the
 position each div is in so when the page reloads they appear in the same
 order or when the user logs out and comes back in, they are in the same
 order.  
 
 How can this be done?   
 
 I have the following code:
 
 script type=text/javascript
   $(function() {
  $(#sortable).sortable({
   revert: true
  });
  });
 /script
 
 div id=sortable
 
   div id=divA
 Panel A
   /div
 
  div id=divB
 Panel B
   /div
 
 div id=divC
 Panel C
   /div
 
 /div
 
 
 Thanks,
 
 -West
 
 

-- 
View this message in context: 
http://old.nabble.com/Drag-and-Drop-and-Remember-Position--tp27010297s27240p27072008.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



Re: [jQuery] Drag and Drop and Remember Position?

2010-01-07 Thread Chris Owen

West

The way that I was doing it was to store the HTML into the database.  
Once I get to work I can get an example if you would like?


Thanks

Chris Owen
Sent from my iPhone

On 8 Jan 2010, at 06:52, West415 malik.robin...@gmail.com wrote:



bump...


West415 wrote:


Hi,

I have a page where users can drag and sort a set of divs.  Each  
div is
like a widget and the code below allows you to move divs around  
pretty
easily.  The problem for me is I want to somehow store and retrieve  
the
position each div is in so when the page reloads they appear in the  
same
order or when the user logs out and comes back in, they are in the  
same

order.

How can this be done?

I have the following code:

script type=text/javascript
 $(function() {
$(#sortable).sortable({
   revert: true
});
});
/script

div id=sortable

 div id=divA
   Panel A
 /div

div id=divB
   Panel B
 /div

div id=divC
   Panel C
 /div

/div


Thanks,

-West




--
View this message in context: 
http://old.nabble.com/Drag-and-Drop-and-Remember-Position--tp27010297s27240p27072008.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com 
.




[jQuery] How can I create an element dynamically using jQuery

2010-01-07 Thread kimbaudi
Hi, I'm sorry if this question has already been asked, but I searched
for the term 'create element' on the jQuery Google Groups and didn't
find the answer. I basically want to create html dynamically and be
able to add it to my webpage. Suppose I have the following html:

html
body
pThis is the first paragraph of my webpage./p
pHere is some more stuff/p
pand some more/p
p id=fooand even more/p
pand even more/p
/body
/html

How would I be able to create the html ptext I want to insert/p
and append it into the p id=foo tag? I'm hoping the new html DOM
structure would look like this:

html
body
pThis is the first paragraph of my webpage./p
pHere is some more stuff/p
pand some more/p
p id=fooand even more/p
ptext I want to insert/p
pand even more/p
/body
/html

How would I be able to prepend it into the p id=foo tag? I'm
hoping the new html DOM structure would look like this:

html
body
pThis is the first paragraph of my webpage./p
pHere is some more stuff/p
pand some more/p
ptext I want to insert/p
p id=fooand even more/p
pand even more/p
/body
/html

Thanks.