Scroll Thumbs on mouseover
Hi all, I've a problem with my gallery. I use ddblock with drupal 6. I need to scroll left/right my thumbs on mouseover in left/right edges, I've search everywhere but without results, can you help me, please? Regards, Marco.
how to get the nth sibling relative to one of the siblings
I have an unordered list element which has click events registered. What i want is to be able to find the nth relative sibling to the list item that is clicked. In prototype I can simply say $(elm).next(3) or $(elm). previous(3) for the 3rd sibling forwards or backwards from the current sibling. In JQuery there doesn't seem to be a way of getting a sibling relative to the current one, other than the immediate next() or prev(). So if I want the third previous I have to do this in JQuery $(elm).prev().prev().prev()
How to import two different version of jQuery?
Okay, I am running what is called "XpressEngine" on my website. It is a Korean CMS tool that is like Joomla and it loads jquery 1.3.2 as standard on its boards and etc. I have developed a new design website with jquery 1.4.2 and it works fine with by it self.. but it does not when it loads a board running by XE. I guess the reason is that the websites loads two jquery. So I tried to load the jquery 1.3.2 only so that it can run both my board and the website layout, but layout is not working with
link doesn't work on an animation
I'm making a soccer ball image bounce down on the left side of this page, using jQuery: http://gpysports.org However, the image is inside a link, but for some reason the link doesn't work at all. Looking at the ball in Firebug, the link looks perfectly valid. Is there any reason jQuery would interfere with a link? Here's the image within the link, right under the opening Body tag: <a href="http://gpysports.org/registration.html"> <img src="gpyball.jpg" style="position:relative" class="gpyball"> </a>
FadeTo mehod issue
I am stuck on a problem and thought I would ask here... I am using the fadeTo method as such tr = $("table tr.selected") // fade all selected rows tr.fadeTo("slow", 0, function(){ $(elem).hide(); }); doSomethingElse(); // gets executed before the callback function above runs (not what I want) I am running into an issue because I want to execute a method after all the animations have completed, but the callback executes with each iteration over my tr set. I found this in the documentation
issue with parseInt()
I am facing a strange issue with parseInt function. If i try to parseInt('08') or parseInt('09'), 0 is returned. However if I use parseInt('8') or parseInt('9') then values 8 and 9 are returned respectively. this issue only happens with '08' and '09' '88' or '99' are parsed correctly. Is this a bug or am i missing something?
Finding element in DOM after using load
I'm fairly new to jquery and I've been stumped on this one for a day now. I'm creating a lighbox type photo gallery on a page. The box is simply a hidden div that is displayed when the user clicks a link. When the link is clicked to launch a gallery I'm using the .load() function to grab another page and load it into the hidden div which is now displayed. The code looks like this $('#galleryBox').load('boxModal.php?ID=' + ID)); The issue I'm having is after I load up the gallery box with boxModal.php..
AJAX returning true in mid validation
This is the third time I have posted this and it is not showing...will try once more.. I have a form validation which I want to check if a few fields are empty and check if a number exists in the database before submitting. I must have everything out of order because most everything seems to work except that the form always submits even though I am trying to return false... $("#companyform").submit(function() { $.ajaxSetup({ cache: false, asynch: false }); $.post("ajax_v2Functions.cfm",
Navs, Divs and fadeIn + fadeOut callbacks?
For my website, it's just a plain simple bunch of divs, when you click the link in the navigation it hides all the divs, and then fades in the designated div in. But just to make it nicer, I would rather - I would like to fade everything out and when the fadeout is complete, the div you want fades back in but adding the callback to each hide didn't work. How can I make this work!
Using AJAX during form validation
I have a few cases where I would like to check an email or customer number before submitting a form and do it inline while validating the other form fields. The problem I run into is that it seems the AJAX request returns true or doesn't complete before submitting the form. I have tried this various ways like putting the AJAX request into its own function and having it return true or false to the validation function but that does not seem to work either...Here is a code example... $("#companyform").submit(function()
How to get object's parent?
Hi, please take a look at the following source, jQuery.fn.extend({ colorbox : function (option) { // do some thing; }; }); var cb = jQuery.colorbox = { c : {}, obj: { self: function(){ //get div object who called like this: $(div).colorbox(); } } }; This is a plugin Some uncertain div would call colorbox() to make a colorbox. Then, how to get this div object in self() function?
loop thru divs -- trigger event only when ONE div is shown..
hi, I have this pretty standard code to show and hide divs: $("#subNav > li > a").click(function(e) { $("#mainDivs > div").hide(); var divID = this.className; $("#mainDivs > div#" + divID).show(); return false; }); $("a.one").click(); // hide all but first div I need to say: when show div with such-and-such a class (that no other div has) THEN trigger an event, inside that div... how would I do that, please... $("#subNav > li > a").click(function(e) { $("#mainDivs > div").hide(); var divID = this.className;
How to navigate into an element?
Hi, For instance: <div class="toto"> <input type="text" name="info1" /> <input type="text" name="info2" /> <input type="text" name="info2" /> </div> <input type="text" name="info_global" /> <div class="toto"> <input type="text" name="info1" /> <input type="text" name="info2" /> <input type="text" name="info2" /> </div> Could you help me to get input in the div? I begin like that : $(".toto").each(function() { }); But I dont know how to get only the inputs in the
Superfish Template Problem - Menu opens behind wraper and can´t see
My menu appears behind wraper, can anyone help me?
json table onmouseover for every row problem
hi all, i have this code: <style type="text/css"> .oddtr { background-color:#EFF1F1; } .eventr { background-color:#F8F8F8; } .trover { background-color: #0099CC; } .trclick { background-color: #00CCCC; } </style> $(document).ready(function() { var $table = $('table.paginated'); $.ajax({ url: 'pjson_form.php', data: 'action=get_json', dataType: 'json', type: 'post', error: function() { alert("Failed to submit");
JQuery .submit function will not submit form in IE
Hi,Im very new to JQuery and have a problem. I have a form that submits some values to JQuery code,which then which sends off an email, with the values from the form.It works perfectly in Firefox, but does not work in IE6(surprise!) or IE7. Has anyone any suggestions why? greatly appreciated?I saw on some blogs that it may have something to do with the submit button in my form but nothing Ive tried seems to work. Here is the form html(note that there will be multiple forms on my page with ids of
Prevent Text Selection In Button
If you have an anchor and apply the button widget, text selection in the button is still possible.
Special caracter is appearing in combobox like a "?"
Dear friends, I have here a jquery code that load one combobox to another with data from mysql. The point is, the combobox that receive the data from mysql, if I have a name with special caracter like "~" or "^" any other accent in the mysql, the combobox that receive this data appear a strange simbol like as in the file attached in the place of the letter that is with accent. The code that I have here is $(document).ready(function(){ $("select[name=Empresas]").change(function(){
loading json feed from google (crossdomain permissions problem ?)
I searched and searched... unfortunately I'm just not knowledgable enough to work it out on my own... how do I load google's picasa album JSON feed from my site? In the browser I can enter this URL http://picasaweb.google.com/data/feed/base/user/default?alt=json&kind=album and it works (returns the expectd JSON). Notice I use "default" as username, which is the currently authenticated user for google, as I have successfully authenticated like this: https://www.google.com/accounts/AuthSubRequest?scope=http://picasaweb.google.com/data/&session=1&secure=0&next=http://mywebsite.com/googleauth
Delegate without events - call function when selection is matched
I tried to use delegate, but it is bounded with events. I don't really want to execute a function on a standard event. But I would need to change the elements that match a selector, when they appear in dom. Is possible to "unhook" delegate from events? like for all existing and new elements with class ".red" to add to the "data" a new key "initiated:true". Thanks!
1.4 Breaks existing code using html() for XML data island
The change in 1.4 to check for nodeType==1 breaks working code that wants to get an xml island as a string using the html() method. Skipping please the esoteric responses that one should not use xml islands, what's the reasoning behind it? Nothing in the change log or blog release notes talks about it. We upgraded to 1.4 last week and this is the 4th case of working code that no longer works! -= Jab
Show me the way
Can someone please take a look at the following code sample and show me a better approach? I know there has got to be a much cleaner way to write this. $('a.all').click(function() { $('#filter-by a').removeClass('current'); $(this).addClass('current'); $('#results .video').fadeIn(); $('#results .article').fadeIn(); }); $('a.articles').click(function() { $('#filter-by a').removeClass('current');
How to add text on first td when click <a> tag inside other td...
Hi All I am trying to make a shopping site and when a user click "add to cart" button, a "this item has been added" text will show up next to the product title. My html code <div id="product"> <table width="594" border="0" cellpadding="5" cellspacing="0"> <tr> <td><img src="<?php echo "$brandImage"; ?>" width="100" height="40"/></td> <td colspan="3" valign="middle"><strong><?php echo $productName; ?></strong> //place to show the text "item is in the cart" </td>
How to clone a row from a table exactly ... including styles
How do you clone a row in jquery exactly, i.e. including styles and width, clientWidth etc? I am successfully using clone to clone the row, but am then having to loop through the cells from the source table and copy the styles individually. There must be a better jquery way. Any ideas?
new image on page load?
Hey guys, I am new to jquery and having problems with a part of my code. I need to shuffle the images in a particular div, once with each page load. (one of six images) the images fades in and then fades out....all of which I have working beautifully. my link is here: http://dev.redefinedfitness.caracdennis.com/ the HTML: <div id="intro"><img src="bin/images/intro0.jpg" alt="" title="" /></div> <div class="homeBg"> ........ </div> the WORKING js: /*background fade
How to get the number parts and compare from these div tags
<div class="product-info product list"><span class="uc-price-product uc-price-list uc-price"><span class="price-prefixes">List Price: </span>$34.00</span></div> <div class="product-info product sell"><span class="uc-price-product uc-price-sell uc-price"><span class="price-prefixes">Price: </span>$34.00</span></div> I have list price and sale price like above. What I am trying to do is to compare list price and sale price; if sale price is lower than list price then display it as Was: $34.00 Now:
Superfish menu slow in IE7?
I recently installed the Superfish menu which uses JQuery. It works great but it's damn slow in IE7. Is this a known problem?
jQuery.ajax and page refresh in Firefox
Couldn't find the answer on the forum. So my problem is that i can't send form data in FF without page refresh (though in IE7-8 everything works smoothly). My code fragments: <input id="f_submit" type="image" src="submit.png"/> ... $(document).ready(function(){ $("#f_submit").click(function(e){ e.preventDefault(); $.ajax({ async: true, type: "POST", url: "http://../callback.php",
google map like application using Jquery ??
I used my own map image in the world map sample application provided along with shiftzoom Plugin download. Its working fine wih zooming and panning capablities. but the problem is i don't know how to mark my locations on the map using the geodata.js file. secondly is it possible to display dynamic data(from external file) on the tool tip(where it is showing the capital and other data.). Is there a tweak i can used to achieve it. Please help me its really urgent. any help would be grateful.
Problem with loading and autorefreshing div with IE7-8
Hi, I have a function count_new_messages which returns a string like 'you have (2) messages' <script> var auto_refresh = setInterval( function() { $('#show_new_messages').fadeOut('slow').load("<?=base_url()?>ajax/count_new_messages").fadeIn("slow"); }, 3000); </script> <div id="show_new_messages"></div> And the problem is, that it's not working properly with IE7-8. Any ideas? Thanks in advance.
Superfish behaviour in mozilla when you press BACK button (history -1)
Hi, The link to website: http://tiny.cc/h8sbg The problem comes up when you use top navigation in mozilla, and then press back button. The page gets loaded from cache, but with menu item selected, and submenu dropped down. I tried to add on dom ready events to clear that, before and/or after the menu is loaded, also with page loaded, but nothing seem to happen. it just gets rendered open. Thanx anyone for the help. Goran
How to solve this conflict, pls help me
Hi, how to handle conflict, when using 2 js libraries, Prototype(validation purpose) and Jquery <!-- start :: Prototye :: JS --> <script src="v/scriptaculous/lib/prototype.js" type="text/javascript"></script> <script src="v/scriptaculous/src/effects.js" type="text/javascript"></script> <script type="text/javascript" src="v/fabtabulous.js"></script> <script type="text/javascript" src="v/validation.js"></script> <link rel="stylesheet" type="text/css" href="v/style.css" /> <!-- start :: JQUERY::
jquery: two submit-buttons, but only one should release validation
Hello, I have a form, that uses validation with jquery, it contains 2 submit-buttons: one is 'back' the other is 'forward' How it should be: By clicking the 'forward'-submit-button, jquery should validate, if clicking the 'back'-submit-button, jquery should ignore validation but the problem is: jquery validates at each submit Now my question: How can I get it, that there is no Validation, when I click on 'back'-submit-button, or in other words, that jquery can differentiate on whitch submit-button
jQuery("[id^='xxxx']") has a bug?
Hello , there are two checkboxs groups on the one page. the 'cc_8e3287fc-a81d-4761-a64b-62dd037b7fb7_' is prefix of property "id" in the second checkbox items. and i have checked some items in the first checkbox group,but i didn't checked any items in the second checkbox group, after i run below code: --- var isChecked2 = false; jQuery("input[id^='cc_8e3287fc-a81d-4761-a64b-62dd037b7fb7_']").each(function(ind1,obj1){ if(this.checked){ isChecked2 = true;alert(jQuery(this).attr('id'));return false;}
Best practice for fading-in an image?
Hi, I have a photo blog (http://www.the-ninth.com) and want to create an effect that fades-in the displayed picture when the page is loaded. An important requirement for me would be that the page also has to work without Javascript. Currently I am using the following small plugin: jQuery.fn.fadeInOnLoad = function() { return this.each(function(){ $(this) .hide() .load( function() { $(this).fadeIn(); } ) .each( function() { if(this.complete)
How to wrap text inside textarea?
http://stackoverflow.com/questions/1712417/jquery-wrap-selected-text-in-a-textarea I want to wrap some html code to user's selected text inside the textarea, I tried the code in above url but it seems not work in IE, is there a plugin of any way to make it work?
textarea toggle with id
Hi, I've this html page: <tr><th><label for="id_form-1">Carriera:</label></th><td><textarea id="id_form-1" rows="10" cols="40" name="form-1"></textarea></td></tr> <tr><th><label for="id_form-2">Corsi:</label></th><td><textarea id="id_form-2" rows="10" cols="40" name="form-1">aaaaaaaaa</textarea></td></tr> ecc...... I'm trying to toggle the textarea relative to specific label, like this: $(document).ready(function() { $('textarea').hide(); $('label').click(function() {
Jquery Image Fade In on Rollover
Hey everyone, I wrote a couple of lines of code to simply fade in an image when a user rolls over a link: http://www.jickpictures.com/preview/preview.html The only problem (which you probably already noticed) is that when you rollover the links quickly, the image appears below the other for a quick second until it completely fades away. I want each image to appear on top of each other when the user rolls over a link fairly fast, so it doesn't change the shape of the website like that. In other words
Fade In Image Rollover
Hey everyone, So I wrote a code to simply display an image when a link is rolled over: http://www.jickpictures.com/preview/preview.html The problem (which you may have already noticed) is that when you rollover the two links fast, the images appear below each other. What I want to do is find a way to make the images appear on top of each other so it will look more like they're crossfading without changing the shape of the site. If anyone can help me with this it would be greatly appreciated. Thank
change-handler fires twice in internet explorer
hi, i've a problem using the change-handler in a simple html-formular. the change-handler fires twice when the input-field already defines an onChange-Event. Example: in head of html: <script src="jquery-1.4.2.js" language="javascript"></script> <script type="text/javascript"> $(document).ready(function() { $("#abc").change(function(event){ event.srcElement.style.borderColor='red'; }); }); function test() { alert('test'); } </script> in body
Next Page