Mouseover and Mouseout delay
I am building some video player controls and when I mouse over/out the volume icon, I want the volume slider to appear and disappear. On the mouseout, I want it delayed so what I did was this: $("#mutebtn").mouseover( function() { $("#slider").fadeTo("fast",1); } ); $("#mutebtn").mouseout( function() { $("#slider").fadeTo("fast",0).delay(2000); } );It delays but it puts the delay on the mouseover...so naturally
JQuery.each() and closures
Long question, but bear with me. Jquery.each() seems to behave differently than expected regarding closures. For instance, if I want each row in a table to print out it's inner HTML inside an alert box when I click on it, I could use the following code and html. HTML: <html> <head> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> <script> $(document).ready( function() { }); </script> </head> <body> <table> <tr><td>Row 1</td></tr>
Disable submit button on form submit [SOLVED]
Hi, I have a page with many forms that I need to change from a post to an ajax call. That part is working, no problem, but now I want to disable the submit button while it's waiting on the server response and then re-enable it when the response comes back. Here's what I have: $(function() { $('form').each(function() { $(this).submit(function(){ var $that = $(this); var $submitButton = $(this, "input[type='submit']"); $submitButton.attr("disabled", "true");
passing POST params to a PDF in a modal window
Hi, I'll try to explain my problem ... I have several form inputs with a submit link in a modal page, and when I click the submit link I call this function to download a personalized pdf with the GET params. function download(){ window.parent.document.location = "admin.php?controller=Cat&action=downloadPDF&title=" + $("#title").val() + "&author=" + $("#author").val() + "&coment=" + $("#coment").val(); }This works. Now, I need to pass an undefined number of params, and I prefer do this thru POST,
Passing parameter to click function from anchor
Apologies if this appears twice but my first attempt to post seems to either have been rejected or simply gone into the cyber void. I currently have a link on a webpage as follows: <a href="#" id="loadData"><img src="images/bookcase.png" alt="" width="114" height="167" border="0"></a> which is picked up by $("#loadData").click(function()which then executes: .load("subgenre.php" , function() etc What I want to be able to do, however, is pass a parameter to the php script, along the lines of:
changing Css property for textboxes (asp .net)
Hi, I need some help in creating a function that changes a specific CSS property for all 'asp:TextBox' type controls that have the CSS class of 'style1' this function should fire when I click the 'btnTest' button jQuery(document).ready(function() { $("btnTest").click(function() { ?????? thanks
$.getJson Trouble
Hello Out There, I'm having some trouble using this, seemingly simple, $.getJson method. I've been running some tests to see if I'm getting the proper information and I seem to be only getting 'undefined' back. My jquery is this: $.getJSON("http://myxpens.com/chart.php?SessionUserId=4", function (data){ alert("this is a test: " + data.TEST) }); and the corresponding result form the URL GET is this: [{" clothes":150},{" food":15},{" home":50},{" school":100},{" vanity":35},{" weddings":100},{"TEST":999}]
Custom Scroller is Choppy. Suggestions for code approach?
Hi all. I am making a scrollbar. It simply calculates the percentage it has moved within its width and then moves the larger object the same percentage of ITS width. Standard scroller logic I would presume. I think the issue is WHEN I choose to run the function that moves the larger element. Could you look at the code I posted at the URL below and see if you would do anything different? I will also post the snippet relative to this one function here. Here is the page: http://www.levlane.com/dev/scroll-port/
image fade on click
Hello, I'm new to jQuery. I'm looking for a little snippet that will fade a new image if you click on the image. So i have an image in a div, when you click on the image a new image will fade in, i have 3 images and and you can click as much as i you like, so it has to loop some way.. I've search everywhere but can't find a solution, it has to be that simpel right?
The (window.event.cancelbubble) command does not work with firefox, ---- can jQuery help? ----
Hi, I'm working on a little stand alone application in html and came across a compatibility problem. My problem is: I don't know how I would need use jQuery or if it even works to get this result : (window.event.cancelbubble = true;) <-- this only works in Chrome + Internet Explorer My code looks roughly like this: ... <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" > function toDo(input){ //do something fancy with the imput } ... ...
I just don't get how toggles work...
Hello all I've just recently dove into jQuery with very little experience in anything. I'm learning a lot quickly but I don't see to understand any of the toggle examples I see Here's simple code I'm using to move an image and resize it based on a click event: $(document).ready(function(){ var oWidth = $('img.resize').width(); var oHeight = $('img.resize').height(); $('img.resize').click(function(){ $(this) .animate({
Drag & Drop - issues
Hi, i need to do drag & drop like www.ziggo.nl, Actually i need to drag & drop the widgets. Normal drag & drop have done, but in the clone site you will see the bottom slideshow with icons of widget if you drag the icon and drop in top, widget will load. So this type of drag and drop i need. (screenshot attached) Can Help Me my development website is http://usatrans.design1host.com/ Please reply
How to set textbox timeout ?
Hi all, I want to set textbox timeout. if not complete insert data to textbox in 5 sec, textbox will empty. if complete insert data to textbox ( insert 15 charectors ), it will use data in textbox to other function. How did I do ? Thank you
Having issues with variable and click
Hi I am working on a world map thing for work, and basically this little bit of code just won't work, but if I replace the variable with text it does. This works: //outputs 'africa' $('.continent_africa').click(function() { var flagId = $(this).attr('id'); alert(flagId); }); However this doesn't, and I really can't see why because the variable is set and is global //does not blumin work! var continentClass = '.continent_africa'; $(continentClass).click(function() { var flagId - $(this).attr('id');
Can do jquery like www.ziggo.nl
Please can you tell me, can possible to do drag & drop like www.ziggo.nl using jquery We done Normal drag & drop, but am asking drag & drop in bottom of this website Pls see screenshot attached. Please help
accessing $.data() of another window
it seems to be a problem if I need to access data() of the elements from another window, like for example $(anyElement,window.opener.document).data() which returns null when in fact there is some data actually stored. I heard that data is stored in the $.cache, which is window-related, so that's understandable, but how can I work around that? Certain plugins that use $.data no longer work correctly because of that. E.g., I can't use linkselect methods on linkselects located in the window.opener.document.
Animate a container with an iframe in it
Hello I'm trying to do something, which I guess is prevented buy the way the animate method works. I have a DIV container, with an iframe in it. the iframe has a flash player. I'm trying to animate the container, but the player keeps stopping between the beginning and end of the animation. I'm guessing jQuery hides the iframe during animation for some reason. Any way to bypass that? Thanks, Evyatar.
Possible bug with undelegate & clone
var newNode = node.clone(true); newNode .children(".sibling").undelegate().end() .children(".wrap,.group").css("display","block"); inlay.append(newNode); I've tried this in a dozen ways now, both with append, appendTo and in different orders, but the outcome is the same: undelegate never removes the click function. Any idea why this code would not work or is this really a bug? Further testing with the exaples on http://api.jquery.com/undelegate/ reveals: $("body").undelegate();works just
Simple FAQ Show Hide DD DT Not Working
Hello, I am rather new to Jquery and have followed a tutorial on how to create a simple FAQ page that hides all answers on load (it does this succesfully) and then when you click on the speicific question it shows the response. The second part of the functionality is not working at all, i have tried adding an alert and remove the main bit of code to test the click and that is not working. Also the cursor does not change to a pointer it is a cursor indication typing/selecting text. Here is the script
Help Please!!!!
Hello Can anyone help me please, i am trying to make a news list scrollable and i am having no joy! below is my code i would be grateful of some guidance here. $('#buttonUp').click(function() { $('#newsScroller').scroller(); }); $('#buttonDown').click(function() { $('#newsScroller').scroller(); }); Kind regards Stuart
Ajax request to local XML file
Hi there, I'm busy making a project which needs to be ran locally. It has to work on Firefox only. I've ran into the problem I can't load local XML files from another directory then the html file is located. When I try loading XML trough an ajax request with the url "content.xml" everything works fine. As soon as I want the XML to be loaded from another folder, e.g. "../../../content.xml" it doesnt enter my success function. $.ajax({ cache: "false", type: "GET", url: "../../../content.xml?r="
Hide problem
I'm having a problem with the hide function in jquery. My markup code is very straight forward and looks like this... <div id="taskEditorContainer" class="hide"> Some content </div> <button id="taskEditorTool" class="button" type="button">Skapa ärende</button> The hide css class is simply to ensure that the div is hidden when the page loads... div.hide { display:none; } The jquery code looks like this... $(function() { $('button#taskEditorTool').live('click', function() { if ($('#taskEditorContainer').is(':visible'))
Jquery.Ajax Succes Function Return Null
Hi all, I have a litte problem with my jquery. Actually i was in build a e-commerce site. And i have one table called voucher. So when user when to check out it will be asked first, whether they have voucher or not. And i want to check this with jquery ajax function. So i have a form with id 'final basket', and code i was create is : $('#final-basket').submit(function(){ var voucher = $('input[name=voucher]').val(); if(voucher != '') { $.ajax({ type:'GET',
Using mouseover, slide, and toggle together--Can this be done with jQuery?
I am in need of some serious help. I need to have a group of images appear when you mouseover an icon and have the group of images clickable and linked to different web pages. I thought this would be simple, and since I'm new to jQuery I'm sure it may be my understaning of how everything works. To get an idea of what I'm trying to do, please go to http://www.babyphat.com. At the top right of the home page there is a "Get Social" image. When you mouseover, images for facebook, twitter, flickr,
Do serialize can serialize anything?
Hi All, I do read the the serialize function in http://api.jquery.com/serialize/ I saw through the method usage only apply to a form or id. Example var str = $("form").serialize(); I face a problem now when I manual combine the data ( default data which not in the form ) which will not convert the special character to the special HTML code. var data = "&" + "isDefaultSize=18',19'" ; May I know how to convert those special character to the HTML special code? Do serialize can do this? example (data).serialize();
How to load a js tracking image using Jquery
I'm having difficulty getting a js tracking image to display. In html you would use code like: <div class="taLogo"><script type="text/javascript" src="http://urltojsimage.js"></script></div> However if I want to load it using jquery I'm having no luck. $(element).append( $('<div class="taLogo" style="width:30%;"></div>') ); $(element).find(".taLogo").load('http://urltojsimage.js',function(){ alert('loaded');} );
.load()
Impatience got the better of me. For the fragment method using .load(), how can I load more than one fragment?
Using variable name in click, cant see why not working :-(
Hi I'm developing a distributor map thing on our company web site, and when a continent is clicked, it sets a variable called 'activeContinent'. However this works: // Outputs 'Africa' in message box $('.continent_africa').click(function() { alert(activeContinent); var currentId = $(this).attr('id'); }); This doesn't, and I can't see why: // Outputs sod all... $('.continent_'+activeContinent).click(function() { alert(activeContinent); var currentId = $(this).attr('id'); });I Really cannot see why
What release should I download to make intellisense working with vs2008?
What release should I download to make intellisense working with vs2008, v1.4.2 or v1.3.2? How to make it work?
Undefined Selectors
Is it common to use CSS selectors that are not defined in a stylesheet (or anywhere else) to identify HTML elements? When using jQuery in ASP.Net with controls that implement INamingContainer, all it's children's ID's are automatically generated based on the id of the child control and the id of the container control (such as the Panel control) so we couldn't simply use $("#myChildControl") for a child control with the id of 'myChildControl'. The resulting client id would be something like 'mypanel_mychildcontrol'
JQuery and redirects
Hi, I am clicking on an anchor tag which calls some JQuery code, which posts to an Action method that loads a different page. When I remove the JQuery and just call the Action method, the redirect works fine. But when I add the JQuery (I need this in order to pass some parameters on the anchor onclick event), although the action method gets called, the redirect does not happen. Can anybody tell me what is wrong with my code that could be causing this? $(".screenshot-link").click(function ()
Problem with id value!
I need save to my html page id path adress like id="#videos/fashion/test.txt" but if I want find this line like $("div").find("#videos/fashion/test.txt") it doesn't find it. I think it for the slashes. What is the best way to save into html page value and not to be seen on design view?
passing parameters through anchor tag
Hi, I am new to JQuery and trying to post some parameters from an anchor tag. But only my 'site' parameter gets passed. Here is my code : <a class="screenshot-link" href="#" site='dv2' num='1'>1</a> $(".screenshot-link").click(function () { var site = $(this).attr("site"); var num = $(this).attr("num"); $.post( "/Development/Main/Screenshot", { site: site, num: num } ); }); Any ideas what I am doing wrong?
Using .each() to make multiple posts
Hey all, I am working on a form that has multiple divs that have similar inputs. These are dynamically generated but have a structure similar to this : <div class = "item"> <input name = "name" class = "name" type = "text" /> <input name = "price" class = "price" type = "text" /> </div> <div class = "item"> <input name = "name" class = "name" type = "text" /> <input name = "price" class = "price" type = "text" /> </div> <div class = "item"> <input name = "name" class
how to make this menu ??
hello, i am trying to achive a effect/ behavior that is found in the menu on this page: http://www.canalplus.fr/ the menu that says: SPORT CINEMA SERIES/FICTIONS (the menu you can slide down ) basically when you click on a menu like SPORT , a div will slide down with the SPORT content then if you click on CINEMA , the cinema content will fadeIn and if you click again on SPORT it will fadeIn and only if you click again on SPORT the SPORT content div will slideUp, this is basically what i am trying
Selecting all anchor tags that contain images (to remove/change styling)
Hi, all I'm trying to do what the post title says and I ran across this article whose title is exactly what I'm trying to do, so I gave it a shot, but it didn't work. I'm just learning jQuery so I've gone over the documentation on selectors, and adding and removing classes and attributes. As far as I can tell I'm selecting the tags and setting the classes/attributes correctly. On one page I've got some images as links in a table: <td><a href="http://www.example.com"><img src="images/exampleSite.jpg"
How do I make this function behave as I want it to? (Select onchange problem)
I have the following function: $("#paamelding_form select").change(function () { $("option:selected").click(function() { if ($(this).hasClass("double_0") || $(":selected").hasClass("")) { var oldID = ($(this).parent("select").attr("id").match(/\d+$/)); var newID = ++oldID; alert("remove" + newID); $("#pulje_" + newID).removeAttr("disabled","disabled").css({ 'border-color' : ' #000', 'background-color' : '#ddd'}); $.cookie("pulje_"
Accessing table cells by rowindex
Hi, I'm dynamically creating an HTML table using JQuery. I'm not assigning id's to the tr or td tags in the table. The reason I'm not, is that it seems complicated, given that the table is initially loaded and then the user can add and delete rows. I'll also need to sort the table on demand. I maintain the current row the user has clicked on as a global variable (curRow) using this... $("#prodTable tbody tr").live('click', function() { curRow = $(this)[0].rowIndex; }); I want
Dynamic nested tabs
hi all ! Im trying to create dynamic nested tabs, but Im cant find the way to create them correctly. The problem is that I have 2 loops that run inside eachother. Im trying to do something like: <div id="tabs"> <ul> <c:forEach var="ano" items="${requestScope.anos}"> <li><a href="#${ano}"><span>${ano}</span></a></li> <c:set var="msg" value="meses_"/> <c:set var="msg2" value="${msg}${ano}"/> <c:set var="mes_f"
I am passing the ID of an element. At one point it no longer works. I think it needs to be forced to be seen as a string?
Hello all. I have the following code that works if I hardcode the variable as I do here: function rw_getPositionOfPortfolioTarget(DivTargetPassed){ // IF I HARDCODE THIS VAR HERE IT WORKS FINE var DivTargetPassed = "container_interactive"; var portfolioTarget = $("div[id*="+DivTargetPassed+"]"); var portfolioTargetPosition = portfolioTarget.position(); var portfolioTargetleftPosition = portfolioTargetPosition.left; var portfolioTargettopPosition = portfolioTargetPosition.top; alert("left:
Next Page