Image slider problems
Hi Guys, I'm a beginner in Jquery but trying to learn some things. Having some problems trying to develop a image slider with buttons. This is a slider for the header of a building company website. The 8 buttons and the images that are linked to that are some services my costumer can give. See my slider here: http://www.jsprdesign.nl/slider/ The problems are: *Because the active image first fades out before the new image fades in you see the background. I would like the image to flow over in each
[jQuery] Making a Sliding Tab Menu
Ok so im trying to make a sliding tab menu, The menu is already made with animations and such, however now im trying to integrate the menu with the Divs i have for each menu item. Would anyone know of any tutorials that would help accomplish this? I really just need something to start me off.. Basically on click i want the current selected item and div to fadeOut to the left and the newly selected to fadein from the right... any help would be appreciated thanks JQUERY $ 'span' .click function event
jQuery .load() method
I tried using .load() method in jQuery. I face the following issues: 1. Once the html is loaded into the div, it displays the html contents but events written for the controls inside the loaded page does not fire. 2. If the loaded page has a server control and clicking on it will clear the loaded html content and displays as a fresh page (ie, The loaded html content in the div is cleared). Let me know if my question is appropriate as I'm a beginner in jQuery AJAX.
replaceWith does not seem to be working as indicated.
When I transitioned from 1.3.2 to 1.4 I ran into an issue with replaceWith. According to the docs it should replace each matched element with provided "newContent". But in practice it appears to be replacing all matched elements with a single instance of the "newContent". Here's a test case: http://jsbin.com/osado3/edit
Animate opacity of li contents - problems in ie.
Hello, I'm having a problem animating the opacity on the contents of a list element in IE8 (haven't tested the others yet). There's a big grid of li elements, each holds a link that wraps up a color palette built by span tags. The plan is that when you rollover one li, all of the other li's fade out. It works correctly in Firefox and Chrome, but in IE8, the li element itself fades, but the contents of the li do not. It makes it pointless. Any tips? The html: <ul class="cl_results"> <li>
ie8 and dom update on mouse move
Hello, I'm experiencing a very odd behavior under ie8 only: I have a radio switch which calls a function within which I run a $.each() loop in order to update some dom elements by means of: $(this).html('some value'). In ie8, some of the elements looped upon fail to update their contents until if I leave the mouse cursor without moving it, just where I clicked the radio button. I have to move the cursor way below the header, then the remaining elements update instantly. see http://awd.live.selfip.net/bmw_alloy_wheels/1_series_e87_alloys/17_alpina_softline_wheel_87
Upload files and use SimpleModal Basic Modal
Hi, I have a web site where the user uploads music and other media files. I would like to block access to the page where the submit button is until the upload is complete using a basic modal window. The uplod works fine, and redirects back to the uploading page; and the basic modal window works fine in a dev environment. The problem is I don't know how to get them to work together. Any ideas? Thanks, MontereyBill
Problem in Google Chrome using the fadeOut()
I would like to implement a fadeOut effect for a new web project and so I decided to append a layer-div via javascript to lay over the real content and wanted to fadeOut this element at the top of my $(document).ready() function. I did choose the JS solution in order to make the project work fine even if JS is not activated. So at first I had this code snippet: var over_main = document.createElement('DIV'); overmain.setAttribute("id","over_main"); document.body.appendChild(over_main); And in my
Overcoming limitations of live events and stopPropagation
I am trying to accomplish something like this: <p> text <a>link</a> </p> ---- $("p").live("click", ... something cool...); $("p a").live("click", function(e){e.stopPropagation();}); //so the link is still followed but the click event on the P is not triggered. This fails since live events bubble differently than bound events. So, what I have to do instead is $("p a").live("click", function(e){return false;}); but then the link is not followed. So, I do $("p a").live("click", function(e){location.href=this.href;
Main differences between $(this) and $(e...)
Hey all, What are the main differences you've found between using $(this) and $(e.target)? It sounds like event delegation is useful with e, but I'm curious if others have found speed boosts, or other tricks to use either / or.
Importing a large file using PHP and jQuery
I am working on solving a task to import a large CSV file into a database using PHP and MySQL. I assume once the CSV file is on the server I could use jQuery's ajax capabilities within a loop to send a request to the server to process X amount of lines from the CSV, once done the onComplete part of the ajax call runs and we could update a counter or something similar. Then the loop continues and sends another request to the server to process another X rows, and so on. Does anyone have a quick example
determining which element is clicked
In my html head tag i have a script like as below $(function() { $('img').click(function() { .... $.ajax({ url: 'somepostusrl, data: dataString, beforeSend: function() { $.loading({ text: 'Wait!', pulse: 'working', mask: true, max: 2500, delay: 20, align: 'center', img: '{{=URL(request.application,'static','ajax-loader.gif')}}' }); }, complete: function() { location.reload(); },
Focus() inside a blur() handler.
Hey guys, I'm having problems with applying focus() to an element inside a blur() event handler. I get different results in different browsers. Specifically, IE and Opera seem to work fine, Firefox doesn't seem to do anything, and Chrome and Safari only do half of the job. Basically, I have an <input> with a blur() event handler attached to it. The event handler contains the code to apply focus to that same input, effectively disallowing the user to remove focus from the input. $(function() {
Strange behavior when passing jquery an html string containing a script tag
Hello, The easiest way to explain this is probably just an example. var content = $('<div><script type="application/json">{ "some":"json" }</script></div>'); alert(content.length); // 2 The issue is that any script tag contained in the html string, no matter how deeply nested, is pulled out of it's containing element & appended to the jquery object. This is causing a problem for me because the html string I'm passing is the response to an ajax request, and the script contains json data relevant
Selectors question
Hi all, I know some basics of jQuery, but I have not been able to figure this one out with only the basics. Suppose I have the following, a container div that has a number of h3 tags in it, each followed by miscellaneous other HTML: <div id="container"> <h3>Product Name</h3> <ul> <li>info</li> <li>more info</li> </ul> <p>More information, in a paragraph</p> ... any number of h3 combinations can occur here, I won't know this until the page is rendered and I can count them ... <h3>Another
Difference between onunload and onbeforeunload (for synchronous ajax)
I perform a synchronous ajax request in my "onunload" handler. Is there any reason (browser performance, unload limitations, etc) that I should be using "onbeforeunload" instead? (I do not need to prevent the page from unloading.)
Is it possible to select a hidden radio button
Ran into an issue today I wasn't able to sort out on my own or through a Google search: I have this form where I wanted to select a radio button when the containing div was clicked. So, on the click of the div, I would say that the radio's attribute of checked was set to checked. It all worked fine until I put on the document.ready to hide all the radios. Thus, with a hidden radio input, I was unable to manipulate the checked attribute. Did I miss something? Example code for reference: $(document).ready(function(){
[ask] resize on image
Hi, im new to jQuery I have a question to ask here: the code below, the " $(document) " $(document).ready(function() { $("div.slide").supersize(); });how to make it into array of objects ? because I found that this line only fired once to a single object/element. I try to tweak a sliding gallery contain of 4 buttons and 4 images - each image is assigned into buttons and supersized them to fill the browser window and i noticed that the line above affecting the 1st image only - not the 2nd - 3rd
Why is unbind('click') not working?
Hi all, I have the following piece of jQuery: $("img[alt='47767']").unbind('click').attr('src', '../images/icon-tick.png').attr('title', 'Printed');Which I am trying to use to manipulate the following piece of HTML <img alt="47767" title="Mark as printed" style="cursor: pointer;" onclick="mark_printed(this)" src="../images/icon-printer.png">The attribute changes for 'src' and 'title' get applied, but the unbind('click') doesn't stop the image from firing the 'mark_printed(this)' function. Why is
Sortable Serialize with Connected List
I've been working on this for the past 2 days and I cannot get sortable to return the list order, I'm probably doing some really silly, can someone help me please. Here is the code. <style type="text/css"> #available, #selected { list-style-type: none; margin: 0; padding: 0; float: left; margin-right: 10px; background: #eee; padding: 5px; width: 143px;} #sortable1 li, #sortable2 li, #sortable3 li { margin: 5px; padding: 5px; font-size: 1.2em; width: 120px; } </style> <script type="text/javascript">
How do I pass a parameter when I set the function for an event
Ok this is my first day with JQuery, so I know I'm probably asking a stupid question; But, given the following code, how do I pass a parameter when I set the function for an event. var url = $("#deleteBlog").attr("href"); $("#deleteBlog").click(deleteBlog); Thanks, Lee.
If i use Jquery plugin iam not able to use window.addevent('domready',function()). Is there any way to rectify this?
If i use Jquery plugin iam not able to use window.addevent('domready',function()). Is there any way to rectify this?
What variables are available inside a .click(function(){}) function?
Hi folks, I think I'm fundamentally misunderstanding either JavaScript or jQuery .click handlers? I had assumed the function assigned to the click event could only see global variables and those inside the function. However it appears to be able to see those around it when the event is created? I have function addAssessmentClick(courseID, assessmentID) { jQuery("#assessment" + assessmentID).click(function() { console.debug("clicked courseID:"+courseID+" assessmentID:"+assessmentID);I
"$" isn't being recognized in AJAX
Hi all, fairly new to jQuery. I read a similar post here this morning, but it wasn't quite the same as my issue so I opened a new post. Here's what I'm trying to do: I have a page with 4 tabs. Clicking a tab invokes AJAX so the tab content changes. This works. In the first tab which is called "Featured", I'm using the jQuery cycle function to rotate through 3 featured articles in DIVs. Only on this tab though. The other tabs don't use the cycle function, or any other jQuery feature. When the page
mutliple ajax calls
Iam new to jquery but it seems there should be something in the ajax api documentation about making multiple calls with $.ajax(). Are there potential problems. What if second call comes back first is this a problem? I guess each ajax call creates a new REQHTTRQOBJ or does it? Maybe someone could answer these questions but i do believe multiple ajax calls should be at least mentioned in the ajax() function documentation.
.load() not updating hidden div
I have a page that has a a two part div system bioTop (top div) and bioBot(bottom div). The bioBot is hidden (.hide()) and shows with the click of the more text. Also there is clickable text to change the text in the divs from english to spanish and vice versa. The click for the top divs work just fine. The issue presents its self when the english or spanish text is clicked the bottom div does not take the new information or the text int the bottom div does not change. Can a hidden div have
jquery 1.4 restoring page state on back button?
In Mac Safari 4.04 & Firefox 3.6, I am seeing page state being persisted on back button to page. I couldn't reproduce on jquery 1.3.2. Here's a simple example: <html> <body> <script type="text/javascript" src="jquery-1.4.js"></script> <a href='#content1'>tab 1</a> <a href='#content2'>tab 2</a> <div id='content1'>content 1</div> <div id='content2'>content 2</div> <script> $('a').click(function(){ var href = this.href;
import JSON data in real-time via getJSON using AJAX
How can import new items in JSON and append them to document in real time using jQuery/AJAX? Basically, new JSON items from the feed be appended to document asynchronously in real-time. If you would like to see a similar concept in action, see What are people buying right now? on blippy or recent activities on cliqset . Also, is it possible to only fetch/render certain number of returned JSON items at a time and fetch the next number of items via AJAX so not all of the JSON items data is loaded when
Execute function on input change
Hello, I have a select form with id=px I want to make the select execute a function every time an option is selected. I took the Change function and my code looks like this: $("#px").change(function () { var str = ""; $("#px option:selected").each(function () { str += $(this).text() + " "; }); // $("div").text(str); - this line is changed with my function $('#selectable1 span.cica').css('font-size', str + "px"); }) .change(); It looks that srt variable is not working with my .css function.
Inserting a row into an empty table?
Hi, I have a need to use jquery to insert a row into a table (individual cells within row include images, input box, radio buttons; each with their own attributes). So far i've only been able to append rows to existing rows, or clone an existing row. Is it possible to insert a new row? The table html is already present. I have searched high and low for examples of this to no avail. Here is what the empty table looks like: <!-- sub table for answer options --> <table id="white_background"
Hiding a div on page load but it shows for a split second.
I have a div which will show when javascript is disabled, and I turn it off using: $(document).ready(function(){ $("#noscript").hide() }); However, it is appearing ont the page in Firefox for a split second when the page loads. Is there a way to stop this? The site is on localhost at the moment but I can easily upload it if need be. Cheers.
why does my page jump and can I prevent it?
I have been working on a horizontal accordion effect for my client's new home page. It works fine except that the whole page seems to jump when you click the buttons to make it scroll... http://www.eaglevideo.net/hdemo.htm using: jQuery 1.4 & jQuery Easing 1.3 Note: only tested in Safari & Firefox on Mac so far - but the problem is present in both. Does anyone have any suggestions that will help me keep the page from reacting this way?
Trying to understand how document fragment works and why it is being attached to only one element
I am trying to understand how document fragment works. Here is html and jQuery code. <h2>one</h2> <h2>two</h2> <h2>three</h2> value = jQuery('<p>hello world</p>'); $('h2').each(function(){ $(this).before(value); }); After the jQuery code the html looks like this. <h2>one</h2> <h2>two</h2> <p>Hello World</p><h2>three</h2> With the help of debugger I was able to detect that p element was added before first h2. Then it was detached from there and added before second h2. And then p was detached
.load() not loading
OK, so last night this all worked fine, but now when I load another page on the same domain, it will not load. Response Headers HTTP/1.1 200 OK Date: Fri, 22 Jan 2010 18:11:34 GMT Server: Apache/2.0.52 (Red Hat) X-Powered-By: PHP/5.2.12 Cache-Control: no-cache, must-revalidate Content-Length: 501 Connection: close Content-Type: text/html Request Headers GET /test/nothing/ajax/dash.php?q=/test2.php HTTP/1.1 Host: biometemerge.com User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2)
help with $("a").click(function(){
Hi, I hope someone can help me out but this is the questions. I have a list of sites that are approved, all other sites will need to prompt the user that they are moving outside the "approved" sites Now I posted this question a while back and I got a response that does what I want but with one problem, it still takes the user to the page even if they say cancel. Below is my code. <a href="#">link one</a> <a href="http://yahoo.com">link two</a> <a href="http://msn.com">link three</a> <script>
about .load() function
why when i try use load() with internet URL like google.com it's result nothing ex: $("#result").load("http://something.com"); but it work's when code like this ex: $("#result").load("http://localhost/application"); and when i try using load from internet using getJSON() on flickr.com it's work ex: $.getJSON("http://api.flickr.com/services/feeds/photos_public.gne?tags=cat&tagmode=any&format=json&jsoncallback=?", function(data){ $.each(data.items, function(i,item){ $("<img/>").attr("src", item.media.m).appendTo("#images");
loading stylesheets on the fly?
Hi Folks, is it possible to load a .css file via .ajax() or .get() ? if so, are those stylesheets just available or do I have to "register" them somehow?
using JQuery
Hello All, I am having webpage where I am loading data to the repeater control in run time. The page is having 2 sections. Whenever I do new search, entire screen is refreshing. I would like to use JQuery- Ajax and want to refresh only repeater control area, Can anyone please guide me on thsi or give me links where I can learn basic JQuery. Thanks
Odd behavior onChange event
I'm currently facing a weird issue with the onchange event. I have a web application where each blur event makes a call the webserver to store the value of the textfield. I only want to trigger that ajax call when something has changed, so i track the onchange event on each textfield to set a flag if something has changed. The onchange event always fires to first time when i click outside of a textfield even if i didn't change anything in the field. I narrowed it down to the following: A prefilled
jquery 1.4 live and an event to be notified when a new dom element is created
As per the subject. I have live focusin and focusout bound for form validation. But if some content is created dynamically (either via a templating system or via ajax) it doesn't seem possible to initialise those elements (i have placeholder text that i might want to add inside the element for example). Is there an event that is fired when an element is added to the dom? I hope this make sense! many thanks paul
Next Page