How to get readyList without modify jquery code ?
As title: $.readyList is not exposed after 1.4. but it is very useful for our projects. we save this list and call all method in it after doing some ajax operations.
fadeOut after a certain amount of time after page reload
Hi, Can anybody tell me how to fadeOut a Tag's innerHtml after a certain amount of time? Because I would like to display a confirmation massage after page reload, but I want this confirmation message to fadeOut after let's say 5 seconds. Thanks, Stephan
Dinamic checkbox
Hi all, my page create dinamically... For example... I click "this" I add 5 checkbox (a,b,c,d,e) to page. If I click "that" I add others 3 (f,g,h) checkbox to page. Then i checked first one checkbox i get correct checked item... but second, third... I get undefined because my page create dinamic html. //add checkbox to page: html += "<input type='radio' name='idTipoScommessa' id='idTipoScommessa' value='...' />"; //get checked item var idTipoScommessa = $("#idTipoScommessa:checked").val();Help me
Correctly applying the same function to multiple div's
Hello, I'm trying to get something to work that sounds simple and it worked great until I had a second item to apply it to. This works fine, with one div. When you hover over the link with the class 1slide, it loads the div with the class panel1. The problem is I can't get it to work if I use a second function for .2slide to load the div .panel2. <script type="text/javascript"> jQuery().ready(function(){ jQuery(".1slide").hover(function(){ jQuery(".panel1").slideToggle("slow"); });
fadehover does not revert on back-button
hello, i've just started working with css and jquery and really like it. i recently redesigned my homepage using the jquery fadehover. however, i have a small problem. allow me to illustrate: 1. go to www.travelhead.com 2. you'll see the fadehover effect. it works. :) now go to the grey (bio) icon and click on that link. 3. now use your back button to go back to the homepage. you'll see that the grey image is now permanently changed to the secondary image. it WILL go back to the primary
Collapsible Div
Hello, I'm trying to implement a collapsible sidebar. I got a script for this and its working fine. But the side bar is expanded at the page load and I need the div to be collapsed at the page load. How can I fix this ? Here is the custom.js code $(document).ready(function () { var f = true; var g = true; var h = true; var i = { handles: 'e', minWidth: 70, maxWidth: 70, resize: function (a, b) { var w = $(this).width() + 10;
Problem with jquery fadeto()......prototype.js...in IE
Hi every1 !! This little problem which I just cant figure to sort out has done my head in from couple of days now and at last I am posting it here I am using fadeto() function for fading effect for a <div> which contains <img> inside it..the lil code is like this: <head> <link rel="stylesheet" type="text/css" href="styles.css"> <script type="text/javascript" src="signout.js"></script> <script type="text/javascript" src="prototype.js"></script> <script type="text/javascript" src="jquery-1.4.2.js"></script>
Display the users day with jQuery
Hi All, This is such a simple question I feel stupid for asking. However I've dug around on the web for almost 30 mins and I can't get to the bottom of it. All I want is to display the day of the week based on users PC settings - not server time. Example: "News item of the day for [insert day of week]" Sorry for my noobishness, I'm new to jQuery and what I have learned so far has been more in the realm of effects for designers, etc. Also Google is beeing annoying, every search for anything to do
Add min number of characters in string validation help
Hello I have the following code that validates my form prior to saving...among other things, it checks to make sure the field "claim_num" is not blank. How can I change this code so I can verify if the field "claim_num" has a minimum of 7 characters? Thanks Paul if ($('#claim_num').val() == "" || $('#loss_date2').val() == "" || $('#ucr').val() == "" || $('#loss_type2').val() == 0 || $('#causecode2').val() == 0 ||
correct ' if ' statement
hi there, can anybody tell me why these statement doesn't work? i'm getting mad if ($(this).is ('.active, .colore') && $(this).parent().is('.selectedLava')) { $('#navigazione ul.nav_secondolivello:visible').fadeOut(0, function (){ $(attivataA+'_sez').fadeIn(400)} ); }and not even in this way var attivataA = $(this).attr('href'); var paragone = $('#navigazione ul.nav_secondolivello:visible').attr('id'); if ($(this).is ('.active, .colore') && $(attivataA != '#'+paragone)) { $('#navigazione
Pass ID # to function in order to use one function instead of separate ones
I am trying to minimize the amount of script that I use on my website. I have sections of each page; each section has the same basic layout. The divs and images that I want to make appear and disappear all have nearly identical ids, the only difference is the number at the end of the id. Is there a way to get one script to automatically detect which id number has been clicked and then show all elements with the same number at the end of the id? I would also like it to hide the elements in the hide
Looking for a better way to make a FAQ page with fading objects
Hi all I'm kind of stuck here. I wanted to build a FAQ page with about 20 questions. To show the content of the questions I have a list with all questions and when you click on one question the answer is showing. Now I use the animation function (opacity:toggle) and a if/else to check which answer to fade in or out. I also use variables to know the status of the layer. But since I have about 20 layers the JS will be huge and repeats itself. And if content is added I would have to change all code.
IE8: Line: 54 Error: '_11.left' is null or not an object jQuery?
I'm using the min jQuery loaded dynamically from Google In IE8 I keep getting this error: Line: 54 Error: '_11.left' is null or not an object It says that it's in the "eval" code but doesn't give a filename! Anybody seen this or know what it's about? I am using 4 other scripts. One is packed, one minified, and the other two uncompressed. Could it be these other files too? Again, it's just IE8. Firefox, Chrome work great.
Access Denied Error with jQuery .load in IE 7 and 8 NOT CROSS DOMAIN
I have a page that loads a div from another page from same domain on successful submission of a form. It works in all browsers except IE 7 and 8 where I get the following error: Here is the error code: Error: Access Denied my code: $("#formTwo").validate({ groups: { asset: "trade_futures trade_fx trade_equities" }, errorElement: "em", errorPlacement: function(error, element) { error.appendTo(element.parent("li")); }, submitHandler:
Multiply values from a cell with jquery
My problem is that I have a table where I show products and costs, then when I entry the amount other cell be updated with the overall for example product price amount overall eggs 100 300 The amount is entried for the user, it's a textfield for example I have this code, but doesn't work good $('#tabla tr td').click(function(){ var precio = $(this).text(); var tr = $('#tabla tr').parent().parent(); var cantidad=$("td:eq(2)", tr).text(); var total=precio*cantidad;
Transparent PNGs and jQuery animate()
I'm using superfish which uses jQuery's animate() method to fade in a submenus for my nav. The problem is my submenus have transparent pngs with a drop shadow in the background and IE isn't capable rendering two filters at the same time. That is it can't rending the animation and the png drop shadow so I get a weird flicker effect. If I just remove the animation it would fix the issue, but when I pass in a null value it gives me an error. # $('ul.sf-menu').superfish({ delay:
Problem getting the text from a <label>
I have a php-based form with radio-buttons with following labels - I've been trying to get the text-value of these labels, but I keep getting empty variables - it seems it doesn't pick up the value at all. Here's some of the code: <li><span class="radioinput"><input class="crirHiddenJS" id="this_pulje_<?php echo $pulje['pv_ID']; ?>" type="radio" name="<?php echo $pulje['p_subname']; ?>" value="<?php echo $pulje['pv_ID']; ?>"></span><label for="this_pulje_<?php echo $pulje['pv_ID']; ?>"><strong><?php
makeArray generates 2-dimensional array when 1-dimensional would do
Hi, I have some PHP that generates some Javascript including the conversion of a PHP array into a javascript object. I need to use the javascript .shift() method on this object so I thought about using the $.makeArray utility. However it seems to add an extra dimension.... // The javascript that I'm given... var ay1 = new Object(); ay1[0] = "ee"; ay1[1] = "dd"; // I convert into an array.. ay2 = jQuery.makeArray(ay1); //A dump of ay2 reveals it is this... ay2[0][0]='ee'; ay2[0][1]='dd'; // Why did
Jquery for 5 or 6 random images to switch to color 1000 milliseconds after the scroll effect has stopped
This is the page the script will be written for: http://www.loop-logic.com/portfolio.html The pictures on this page are in a div called <div id="portfolio">. This div will have many many more pictures in it with overflow hidden. I want to use the little orange navigation bar in the upper left called <ul class="portnav"> to scroll to different hash links within the div. I'd like for scripts to be written that accomplish the following tasks: 1) Pre-loads all of the images in the directory: http://www.loop-logic.com/images/lightbox/
When several $(document).ready functions are called, and one contains a JavaScript error, jQuery stops processing the rest of the queue
I searched all around the forums and the Internet in general and could not find this topic. It could be that the keywords just don't lend to good searchability. We had a bug that was hard to find. On some pages our $(document).ready functions were firing and on some only a few were firing. Our pages are on an enterprise site and several of the loaded scripts use the $(document).ready function. This creates a queue of functions that are fired. It was found that on these "odd" pages we had forgotten
Object doesn't support this property or method
I need a little help guys. function FindSelectedType(){ var objChecked = null; if (oneCheckBoxMode){ objChecked = ''; $(fields['PercentComplete']).find('input').each(function(){ var checkbox = $(this); if (checkbox.attr('checked')) objChecked = checkbox.next().value(); }); } else{ var objChecked = {}; $(fields['PercentComplete']).find('input').each(function(){ objChecked[$(this).next().value()] = $(this).attr('checked'); }); } return objChecked; }It is breaking at objChecked
Check Checkboxes?
Hi, I have an ajax call that returns a comma delimited list of ids (3,5,7,25). When the response comes back from my ajax call, I want to preselect the checkboxes in my form that match the ids. The checkbox html looks like below. I'm using ColdFusion and just looping over a server-side query and creating my checkboxes dynamically. <div class="personCheckBoxes"> <cfloop query="qPersons"> <input type="checkbox" name="personId" id="personId_#person_id#" value="#person_id#" /> </cfloop> </div>
addClass question
I don't know if this is the right forum to post this in, but I have a question about the addClass code in jquery. I just looked through the code and noticed it doesn't use a regex to check for classes so I'm assuming that the string checks it does is faster. But I don't understand why it uses indexOf... isn't that slower than just doing a comparison between the currently looped class and the new class? This is the snippet of code I'm referring to (line 1244): if ( !elem.className ) { elem.className
Clean up Multidimensional array
Hi Everyone, I have a multidimensional array which shows each individual array value on the screen. Whenever a user clicks on the "next person" button, it will show the next array value. Everything is working fine and dandy. You can just copy the code and fire it up in your webbrowser to see how it works. I just think that it's a bit cluttered IMO. There has to be a prettier/more concise way. Any suggestions/comments are welcome. Thanks in advance! - Jermaine html> <head> <script type="text/javascript"
Accordion confirm
Is there any way to popup a javascript confirmation on clicking an accordion header to confirm the change of section?
Menu animation chopped when implementing .stop() feature.
Hey everyone, I've only been using jQuery for about a month now, so my apologies if this seems rather n00bish. I'm in the process of creating an animated drop down menu for a website using slide animations. I added the .stop() command when the mouse leaves the drop down while its animating. Everything works fine, but the next time you mouse over, the menu animation doesn't expand all the way. It freezes at the point the last .stop() command was issued. Is there something I'm missing in using
Need help with Scroll Follow
Im trying to accomplish this exact effect: http://store.apple.com/us/configure/MC511LL/A?mco=MTg1ODA4MDM Im using this code: http://kitchen.net-perspective.com/sf-example-4.html ,http://kitchen.net-perspective.com/open-source/scroll-follow/ Is there any way to modify the code to work exactly like the apple website, i want the scroll div to stay at the top of the when the page is scrolled, no animation. when i asjust the animation from 500ms to 0 it just bounces into polace and looks gittery.
Jquery for images
This is the page the script will be written for: http://www.loop-logic.com/portfolio.html The pictures on this page are in a div called <div id="portfolio">. This div will have many many more pictures in it with overflow hidden. I want to use the little orange navigation bar in the upper left called <ul class="portnav"> to scroll to different hash links within the div. I'd like for scripts to be written that accomplish the following tasks: 1) Pre-loads all of the images in the directory: http://www.loop-logic.com/images/lightbox/
remove() multiple elements
I have this query that does what I want it to do, find the class and remove an extra element within its parent: $(".emptyTopNavOption").parent().children().first().remove(); But when there are multiple classes, it only deletes the first element in its query. As a successful test, I appended some CSS to ensure the query selected all classes and added a border to each element. So why does remove() not work? Is it a bug or is my query missing something?
gotta be a shorter way to animate in and out twice....
can someone please tell me the more logical repalcement for this code: $('#my-cart').animate({ opacity: 0.1 }, 500, function() { $('#my-cart').animate({ opacity: 1.0 }, 500, function() { $('#my-cart').animate({ opacity: 0.1 }, 500, function() { $('#my-cart').animate({
Uncaught TypeError: Object #<an Object> has no method 'createDocumentFragment'
13 line causes this exception. Function is called insied of ready() handler. function renderGridSystemRecursively(scheme, container){ if ('children' in scheme && scheme.children.length > 0) { scheme.prm.gridPrm.subGrid = true scheme.prm.gridPrm.subGridRowExpanded = function (expandedRowContainer_id, parent_dataitem_id) { var hiddenAtStart = (scheme.children.length > 1) ? true : false for (var i in scheme.children) {
JQuery Dialog Not Working Well If Page is Scrolled down
Hi, I have a page which has large contents.If I open the dialog when page is has been opened , the dialog is fine and it closes well.Now, If I have opened my main page and scrool down to page and at the end there is a link for opening dialog, then the dialog opens to current window position and page is scrolled up to top. Now dialog has been opened but it is too below that i cant see it. I have tested that when we scroll down the jquery function takes the scrooled position as its top position and
callback in slideUp does not know the end-state from slide up
Simplified example; $('#el').slideUp('fast',callback()); function callback() { alert($('#el').css('display')); } //alerts 'block'. I was expecting 'none' as this is the final state after the animation. It seems that this is likely because the application of the 'style:none' attribute is asynchronous with the callback. is this correct or am I missing something? Thanks Justin
Problem with Firefox
Hallo everyone, this is my first post on this forum, my name is Lorenzo and I enjoy programming.Recently I met jQuery, and I loved it. Now I am writing to seek help. I am creating a web page with a photo gallery and to achieve it I use jQuery. To optimize the loading time of page javascript files are loaded to the end. JQuery also charged through a small utility called nbl. together with jQuery I load xLazyLoader, another utility that can dynamically load css and js file type. In the start function
using live with datatables is it possible
Hi, When I use ajax to add a new record to my table and ajax updates the html inside the table holders div I loose my datatable and have to refresh the page. Is there a solution to prevent this happening? Thanks for any help Simon
Opera and 'select' value changes after DOM manipulation
Hi, I have made a quick test page to show a problem - http://dev.fancybox.net/opera_select_test/ Summary - if page has 'select' element with default selected option and user changes then after DOM manipulation this new value is lost. Janis
Modify html so there are 2 items per li tags?
How can I modify the html on my page so I have 2 items per li results? I need the following; <li>Image1 Image 2</li> <li>Image3 Image 4</li> <li>Image5 Image 6</li> As a starring point I can either have an unformatted series of images, or I can have each image in its own li tag; <div>Image1</div> <div>Image2</div> <div>Image3</div> <div>Image4</div> <div>Image5</div> <div>Image6</div> Or; <li>Image1</li> <li>Image2</li> <li>Image3</li> <li>Image4</li> <li>Image5</li> <li>Image6</li> I want to use
If Statement Radio Button Help?
The function below hides and shows the rest of my form fields (when I don't use the if statement). I wanted to try to make an if statement so that when I reload the page, I don't have to reselect the radio button when it is not null. I want to have an if statement that says, if the radio buttons are null, hide the form fields. If it is not null, just maintain the current state. Unfortunately, I couldn't get the function below to work. $(function (){ if ($('input.radioalign[value=""]')) { $('fieldset[id$=Form]').hide());
jquery hotkey
Hi, In IE 7 the following script worked: <script src="/include/utils/jquery.hotkeys.js"></script> <script> function docHotKeys(){ jQuery(document).bind('keydown', 'left',function (evt){top.previousDocument(); return false; }); jQuery(document).bind('keydown', 'right',function (evt){top.nextDocument(); return false; }); } jQuery(document).ready(docHotKeys); </script> But, in IE 8, this seems to be broken - the left and right arrow keys only function as hotkey only once. After that it needs to
Auto Installer for Internet Explorer
Hi, I developed a small framework based on the open source jQuery library (and on its child JQuery-ui) that can be used with FireFox using GreaseMonkey. Although the most handy option is using grasemonkey, but the procedure for installing and configuring it is not straightforward for every user. Hence I want to provide a .exe for windows (as windows is the most common OS) which would automate the process and set up the browser to use. But I really don't know the process? How to proceed? Thanks!
Next Page