jQuery .load() and Hyperlinks
I use .load() to import html. If the html contains hyperlinks they do not appear in IE but do appear in Chrome. Any explanation?
jQuery chaining function syntax
Hi everyone, just a quick question about syntax. What's the difference between the following functions? $("#menu li").hover( function(event) { if ($(this).is(".active")) return; $(this).addClass("hover").stop().animate( { marginTop: '-30px' }, 500); // animation here }, function(event) { if ($(this).is(".active")) return; $(this).removeClass("hover").stop().animate( {
Mock accordion buggy in IE browsers
Hey guys, I have bashed up a very simple accordion mock type script (I do not want to use accordion, I don't like the effect). The problem is it's buggy in IE as you'll see if you try it - Link Code is there also Thanks Dave
Annoying 'drop-down' message box
I've been asked top implement one of those annoying dropdown message boxes that asks something like "would you like to take a survey?" on our corporate portal. I see them often-- I think Its a <div> that flies down from the top of the browser window , out of nowhere, and then stops in the middle of the browser and asks "would you like to..." While they've always annouyed me, i've been asked to implement this. Is there a plugin or soemthing I can use for this.? I had some luck with the jquery
Bad ajax POST
I have an error when I POST to a page. Whatever monetary choice of donation that is made, the POST does not work to send the values to the next page and the default value of $20.00 is registered. After looking at my code for a day I don’t see the error so I am hoping that someone else’s eyes can see it. Here is the code [code] <div id='pageHeader'>FURI Donation</div> <div id='fSeparator'> </div> <br /> <br /> <p class="paragraph"> Contributions are tax deductible for residents of the United
swfobject / flash . how to pause flash file when any link is clicked.
What I want to do is tell my flash movie to stop as soon as any anchor tag is clicked. I want to do this for a number of reasons, but one is to test is this will help me by pass a Firefox issue right now with a very high cpu usage from the flash player. I can see that Firefox receives the click, but response slowly due to the high cpu usage by flash. I also now that javascript is running in front of this since I can activate other jquery elements while the flash movie plays. In any case, what I need
How to process several asynchronous http requests at once
Can I do the following without my program crashing? var urlArray = // several URLs for(var i = 0; i < urlArray.length; i++) { jQuery.get(urlArray[i], function (data) { // do something with data } }I have created an application that does something similar to the code I just posted. However, my program crashes intermittently. Sometimes it will crash after calling jQuery.get() a few times (with several http requests still pending). Other times it will get through all
Code not working, using live, :checked
This code is supposed to find all table rows with a class of "selected", remove that class, then find all checked inputs that are descendants of a tr and give its tr a class of selected. The problem is, that even radio boxes that are not checked are being returned by $(' tr input:checked', '#deviceSelection') and everything is getting a class of selected. Anyone know whats wrong? I'm using jQuery 1.4.1 <script> function updateSelectedRows() { $(' tr .selected', '#deviceSelection').removeClass('selected');
jQuery Slide - Multiple Nav Links
Hi Guys, I have just made use of jQuery slide for the first time on a site im currently working on. I have used it for the main navigation and all is well, however I would also like to navigate directly to certain pages from a seperate link, for example I would like the 'Sponsor Our Show' graphic to go straight to the show section. Any ideas? You can take a look here http://www.fd18.co.uk/ Thanks for your help!
Fading Image Wall - jQuery Slider?
Hi Guys, I would like to make my website banner using some sort of jQuery slider rather than flash. I would like to make a wall of images, similar to this and have each image automatically fade to another, but not all at the same time. It would be good if I could have a different image fade every now and again. So far I thought of using jQuery Cycle Plugin as their fade demo is perfect, although I would have to lay a bunch of them out and then change the timing of each one. I just wondered if
Outputting user-customized datasets efficiently with XML or JSON?
Hi All: I run a site that outputs customized data based on a user's input. That is, a customer puts in custom multipliers and it runs those multipliers against a database that I have and outputs the results in a table. Right now I grabbing the data from the database (I do the calculations in the query itself), putting it into an array and then looping through the data to output a table, I'm wondering if using JSON or XML would be easier/more efficient. If I were to go this route, could I /
scrolling an iframe from the parent window and access denied
Given that a user can manually scroll the content of an iframe regardless of the domain of the page loaded within it, why, when using something like the scrollTo plugin or .animate() to scroll an iframe, do browers give an "access denied" error (or fail silently) when the domain of page loaded in the iframe is different to the domain of the page executing the javascript (and containing the iframe). I understand there are some limitations in accessing cross-domain iframe content, but this specific
jQuery selector is not working for Ajax
I have added <Table> dynamically to my page. No selector for this added table is not working. JSP Code =============== <div id="empData"> <table id='empDataTbl' border='1'> </table> </div> JAVAand jQuery code to populate Table $('#search').click(function () { var empId = $('#empId').val(); var empFName = $('#empFName').val(); var empLName = $('#empLName').val(); var empDob = $('#dob').val(); var data = 'empId='+empId+'&empFName='+empFName+'&empLName='+empLName+'&dob='+empDob;
Help with Condensing Nested getJSON Calls
What I'm making is a product selector where the product has multiple options. I'll add the code at the end if you need it because the code is getting long. I think there has to be a more elegant way to do this. Here is the basic process: User searches for an item. The search returns a select box via getJSON. User makes a selection. This selection returns up to 5 select boxes (call them 5-1,5-2,etc.) via getJSON. User makes selection from 5-1 select box. Horizontal option 5-1-1 is returned (if exists)
[SOLVED] Possible to make really slow animations?
I am trying to use animate() to scroll text, but find that even using very large duration numbers does not slow it down very much. It scrolls out of view too fast. It appears that the duration values get normalized to some fixed range, so that "slow" and "fast" are the endpoints. Am I wrong? Is it possible to make animations go much slower than "slow"? SOLUTION: I went back to the test script I was using the other night and this time it worked. I suspect that some caching was being done and I needed
Multiple animations with .animate()
Hello, today I was working on my new project and I noticed a problem using .animate() method. For example: I have something like: <div id="container"> <div id="element1">...content...</div> <div id="element2">...content...</div> <div id="element3">...content...</div> etc.. // here is more elements </div>And: $('#element1').animate({ left: "+=32", top: "+=32" }, 500); $('#element2').animate({ left: "+=32", top: "-=32" }, 500); $('#element3').animate({ left: "-=32",
jQuery Accordion Help
Hello, So, on this page (http://ssi2.dev.businesscalcium.com/grease_gator_testimonials.html) I would like the most important sentence of each testimonial to be peeking out when the page loads. Then, when a specific tab is clicked, the whole testimonial would be shown. Any ideas on how I can achieve this? Thanks in advance
Using .post but need to serialize the data
Hey all. I am using the .post function and creating the URL by serializing the data needed but the seriazlized data is going through as a GET, not POST. Any ideas on how to make the serialized data to go through as POST? var url='http://mydomain/pm.jsp?mode=1&' + $('.defaultParms').serialize() + "&" + $('.jsonParm').serialize() $.post(url,{ mode99: "1" }, function(data) In the above code, the mode99 is sent as a POST, the url value is sent through as a GET.
Element 'Mysteriously' reappearing
Hopefully this is not a duplication... I have created a login screen that uses jQuery.post for validation. During validation it shows and then hides a #loading div to denote that the data is being validated. The problem I am having is that,on some occasions (more often than I like), the #loading div appears to blink and does not go away. You can test it yourself at test link, The css code for this div is: #loading { clear:both; position:absolute; display: none; background: url('/images/wait.gif')
create an array of names from a jquery selector
I'm having an issue where i need to get an array of names from an ajax page so that i can insert them into the page i did the ajax request from. something like this: <p><span class='childName'>Eric Steinborn</span></p> <p><span class='childName'>Paul Steinborn</span></p> <p><span class='childName'>Sean Steinborn</span></p> and grab it with jquery like this: $.ajax({ url: 'http://wwwdev:84/missing/active_alert/currentalert.html', success: function(code){ var childName = $(code).find('.childName');
jquery validity
Hi I was if someone can see something that I am not seeing with my code. Basically, I noticed that only form 1 is able to be submitted whereas form 2 and form3 cannot. Actually I only have 1 form and I show parts of each form using fieldsets and divs. Any suggestions greatly appreciated. I am using jquery.validity and formmail 1.92. // global flag variable var remain_anonymous; /* form validation section*/ $(function() { $("#phone").mask("(999) 999-9999"); // add input mask to phone field
Icon position on button in IE
If set the width of button by css the icon will be positioned in center of button (in IE 8). But in FF it looks good.
Visual Studio jQuery Project Template
I created project template for Visual Studio, where you have a only basic stuff - html page with inclueded jQuery library and external javascript file, where you can write your own jQuery code. Read more on my blog, where you can download project template: http://shelastyle.net/blog/jquery-project-template-for-visual-studio/
Element in a fixed position...help!
Hi All, I have a div containing a logo that I want to be always in the bottom left corner of my browser window. How do I achieve that? Thanks in advance! Maurizio
clone upon page load
Hi, I have this: $('input:checkbox:checked').each(function() { $(this).parent().css('background-color', 'red'); $(this).parent().clone().appendTo('#selected_items'); }); or this: $('input:checkbox:checked').parent().css('background-color', 'red').clone().appendTo('#selected_items'); In both cases the css works and the cloning doesn't. I also have this working just fine: $('#test_kit .two_thirds .kit_item input:checkbox').click(function() { if ($(this).is(':checked'))
Reload/Refresh Page & Fancybox
Hi guys, I have the following problem: In wordpress I wanted to popup the login-page (wp-login.php) and i used the fancybox to generate an iframe. after clicking the "login" button i want that the fancybox is closing (thats not the problem) and i want to reload the whole page so that it recognizes that i'm logged in. Now that is the problem .. I cant reload the index page when clicking the login button, because (i think so) the login document is in a iframe and is not able to reload the whole screen).
Problem with $.POST and $.GET in 1.4.2
Hi guys, i'm using a version 1.3.2 with $.get and work fine, but when i used a 1.4.2 version, whole code stoped. Don't have any change im my code, except the version of JQuery. $.(document).ready(function(){ $("#projeto").change(function(){ $.get("supervisores.asp",$("#form").serialize(), function(data){ $("div#reldados").html(data); }); }) })i'm using a simple function ...
Stucking animation
Edit: All questions answered Hi, One of my animations is stucking and if i activate it fast again and again the animation is not finished. The trubbeling Code snippet: if (direction === top) { $('.main:eq(2) > *:first').clone().insertAfter('.main:eq(2) > *:last'); $('.main:eq(2) > *:first').animate({ height:"hide" }, 300, function() { $(this).remove(); }); }The full script you can see/test here: http://crossword.nielswestphal.de/ Thanks, Niels PS: Sry for my English^^.
Change Image weird problem
Hi i have the following problem: I have a navigation (ul) with buttons that change img src on mouseover / mouseout - this works fine so far. this is the code: $('#navigation img') .mouseover(function(){ var rsrc = jQuery(this).attr('src').replace('_on.png','_over.png'); jQuery(this).attr('src',rsrc); }) .mouseout(function() { var rsrc = jQuery(this).attr('src').replace('_over.png','_on.png'); jQuery(this).attr('src',rsrc);
triggering default behaviour of <input type="file" />
Hi, We are working on some big project which has a lot of forms, some of them have file upload fileds which I would like to style with CSS, but of course it is impossible without a trick. Therefore I figured out that I will use a technique presented on quircksmode.com http://www.quirksmode.org/dom/inputfile.html but instead of using an image as a "browse" button I would like to use regular <input type=button /> with our css class (.btn - because it is done for other inputs already, and it has :hover
Cross Domain Security
I'm developing a feedreader type app on Appcelorator's Titanium platform which allows cross domain ajax requests. The app relies on ajax calls to a third party site, selecting html from those pages and rendering it. I'd like to sanitize data from the untrusted 3rd party source in the data returned by the ajax call by removing all javascript. Can regex take care of this for me? Does anyone have any good references or plugins for this? What else should I know? Thanks!
How to make colour slider working?
How to make colour slider working? I enclose files.
Problem with jQuery append(). Any help please !! It's urgent!!
Hi All, I definitely need someone to come to my rescue ! My problem is this: I'm coding a web site which needs some effects. I dynamically append a div to another with the following function below. and the next load some external content , again with jQuery's load() function unto it. All works fine and all's displayed correctly when the page's displayed. I use an onclick event on a link to fire these functions and it does so as required. But I realized after a keen analysis of my page with firebug
jQuery stopped loading script in 1.4.2
Hey! I recently tried to upgrade from 1.3.2 tot 1.4.2, but I'm having some issues. I'm not sure this should be in the 'Using jQuery Plugins'-section... At the moment I'm using jQuery 1.3.2 and the plugin Ajaxify 2.00 (this one: http://max.jsrhost.com/ajaxify/). The script I'm using is this: $('.link_ajax').livequery(function(){ $(this).ajaxify({ tagToload:{'#AjaxText':'#middle_ajax', '#AjaxTitle:'#top_ajax'}, loading_fn: function(){ cmsMessage('loader',loaderMessage);
[jQuery] Superfish: Force menu to collapse
Hi Joel and everyone else on this channel, I would like to close/collapse the superfish menu with a JavaScript call, something like: $("ul.nav").superfish().collapse(); Is this possible with Superfish? Is there a way I can call the "out" function somehow? Thanks in advance, Stefan
Key events stops working
Hi, I have this code in a website I'm making: $(document).ready( function () { $('body').keyup(function(event){ console.log(event.which); if(event.which == 46){ $('#delete').click(); } }); ( more bindings ) });But the event isn't working all the time. It stops working after I change to another window and come back to the browser window. Someone has any idea of what I can try to get it work all the time? Thanks, João Proença
[jQuery] Issues with Truncate and Expander
I just started playing with these two plugins, but have encountered odd issues in both, and was wondering if anyone could help me. I searched around a bit and was unable to find anything. The issue in truncate is that it is breaking the first word after the first so many characters in the opening paragraph, then inserting the after them, rather than leaving it before them. The issue in expander is that is shows up properly at first, but then when you expand it, it closes the at the expansion point,
Selecting letters
Is there a way to use jQuery to select single letters (or characters)? For instance, say I want to select every third letter in a paragraph of text? I realize this is sort of a long shot but thought I'd ask.
Background showing through jquery slide panel
Hello i'm using web-kreation tutorial/example for a slider for wordpress and I am having some problems with the background showing through on a portion with it closed and open. I am not a web designer so you may have to speak a lil slow to me lol but I can follow code directions and know the basics. Any help/advice as to where the problem lies or general site improvements would be greatly appreciated. http://www.p2fitness.com
Getting previous and next element when iterating with each()?
Hi all, I'm creating a simple gallery as a way to dip my toes into jQuery. I have thumbnails, each of which link to an image file, and when the user clicks on them the main image in the center is swapped. This works fine. I'm now coding the "previous" and "next" buttons. They will work the same way -- they just link to a photo, and when clicked the main photo is swapped. However, the link needs to update whenever a new image is displayed. The way I am doing this now is to: 1) Go through the list
Next Page