Setting properties in a 'parameter list' delimited by {}
Hi, I want to set opacity parameter value before calling: $('x').animate({opacity:1},v1); ...of course, other than setting a switch case line for each possible expected value. Thanks.
.hover and .click issue in IE.
Hi guys and girls. To start with please excuse my noob status and I will apologise in advance that my code is probably written in the longest way possible. I'm having an irritating issue with IE (not surprisingly) that I just cannot seem to fix. Basically, I have a div that when hovered over shows pop out menu to the right. After that div is clicked it disappears and allows the div underneath to animate and expand to show content. This all works absolutely fine in FF and Safari, but as soon as I
mouse position in viewport
The mouse position tutorial has an example of how to find the click position within an element. How do you find the click position within the viewport? http://docs.jquery.com/Tutorials:Mouse_Position Thanks.
AJAX get returns empty string - why?
Here must be something in my code which I have overseen - but I can't find it... Using the following line: $.get("http://api.jquery.com/api/",function(data) {...}); data is always an empty string when called from within Firefox 3.6. Everything works fine in Internet Explorer 8 ... What might be my mistake here? I'm using jQuery v1.4.2
Wrap two divs in one container
I'm having trouble wrapping two adjacent divs in one parent container. For example take the following html: <div> <div class="line"> hi </div> <div class="line"> hi again </div> <div class="line"> hi </div> <div class="line"> hi again </div> </div>I need every pair of ".line" divs to be wrapped in a parent div, so it will look like this: <div> <div class="new"> <div class="line"> hi </div> <div class="line"> hi again </div> </div> <div class="new"> <div class="line"> hi </div> <div class="line">
Attribute selector us not workign properly or is it a bug?
I have following code. I am expecting all div to have green border when I click the button which is not happening. I believe as per JQuery Documentation for selector [name|=''] following code should make all div's border green.. <!DOCTYPE html> <html> <head> <script src="http://code.jquery.com/jquery-latest.js"></script> <script> $(document).ready ( function() { $('button') .click ( function() {
MADAL - MySQL Ajax Database Access Layer - A framework that uses jQuery
MADAL is a MySQL Ajax Database Access Layer that uses PHP, jQuery, and jQuery ui to allow one to quickly generate ajax enabled database driven web-pages. MADAL generates PHP and Javascript/jQuery source code that is well documented, so you can use your IDE's auto-completion against database tables and fields. The documentation was designed with PHP Eclipse in mind, but should work for any IDE that recognizes PHP doc. You can check out MADAL at it's Google Code project here: http://code.google.com/p/madal/
Dynamically setting tab title/name
I would like to dynamically set a tab title/name depending on the ajax content returned to the page when it loads, is there a way to do this? example <LI><A href="lookup_return_data.php" title="result"><SPAN>set this content when page loads ie results:6</SPAN></A></LI> It can be done perhaps with reg expression, but I assume there is a simple jquery solution. Thanks
Two objects
Hello. Here is my problem: var a = $('<div>Something</div>').appendTo('body'); $(a).click(function(e) {if(e.target == a) do something;}); if(e.target == a) isn't working. What's wrong with it?
Problem with .stop()
Hi mates, i'm having trouble using the stop() function. I'm trying to make a dynamic menu using jquery library. This menu is now working pretty corretly but i can't manage the problem of multiple queued animations. My menu is made in two parts. The first one contains buttons. When they're hovered over, the second level of the menu appears just underneath. But when several buttons of the first menu are hovered over, i can't stop the second level to appear and disappear anarchically. So i hope someone
Trouble with .attr and flash
Hello everyone, I'm having a... I'm guessing a compatibility issue with .attr. My goal is to replace a youtube video's source with another when a link is clicked. So far it works great in Firefox 3.5+, but Chrome, IE8 and Safari aren't doing it at all. This is my code for the player: <div id="vidPlay"> <object class="vidTest" width="640" height="429"> <param id="vidPlayParam" name="movie" value="YOUTUBE LINK 1"> </param> <param name="allowFullScreen"
Folder Tree submenu not functioning properly
Hello everyone, I have been working on a folder tree and have it just about completed. The only issue that I have is that the sub-menu does not function properly. When I open it and then click on one of the main menu options and then go back to the sub-menu it is still open. What should happen is that it closes when any other main menu option is clicked. Could someone review the code below and help me to understand what I need to do? Thanks. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
Enable next input field when not empty
Hello, I am looking for some help with the following function. I have disabled a file input field which has a textbox above it. I am trying to make it so that when there is text in the textbox the file field is enabled and disabled when it is emtpy. I do not want to assign id's to the file inputs so im trying to use the current jQuery selector. $('.disable').click(function(event){ var $this = $(this); var file = $this.closest('input[type=file]'); if($(this).val()
Two objects
Hello. Here is my problem: var a = $('<div>something</div>').appendTo('body'); $(a).click(function(e) {if(e.target == a) do something;}); e.target == a isn't working. What is wrong with it?
Problem with attr('id')
Hi, I'm trying to get the id of an element into a hidden text field. Here is my code: $('span.textHolder').click(function(){ temp = $(this).html(); $('#parentname').val(temp); parentli=$('li', this.parentNode); //alert(parentli.attr('id')); $('#parentid').val(parentli.attr('id')); });parentid is my target field, parentli the element which I want to get the id. I tested using alert, I can display the inner html using html,
Folder tree submenu not working properly
Hello everyone, I have been working on a folder tree and have it just about completed. The only issue that I have is that the sub-menu does not function properly. When I open it and then click on one of the main menu options and then go back to the sub-menu it is still open. What should happen is that it closes when any other main menu option is clicked. Could someone review the code below and help me to understand what I need to do? Thanks. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
click event not firing when attached to elements that are inside of the hidden element when the page loads
i am working on a custom drop down list that has hidden #options DIV which is shown when the user clicks on a button. the problem i am having is that the click event does not seem to be attached to the LI elements since they are hidden when the page first loads. if i show the #options DIV when the page loads everything is working as expected. i've tried to attach the click event after i show the hidden UL but that didn't work either. here is the code and if anyone could help i would be appreciative.
.live("change") on a checkbox + IE not working completely
Hello, I have some code and it wasn't working at all in IE and then I found that there was a bug relating to it. So I downgraded to using 1.4.1 and the code works, but not completely. When I first check the checkbox in IE it does nothing, it's only when I check it for the second time (uncheck and then check again) that it changes the values accordingly. The select form elements do work in 1.4.1 so I did not post the code. Code: var base = 0; var buiten = 0; var binnen = 0; var bagage = 0; jQuery("#i_bagage").live("change",
Problems with keydown-Event when pushing ESC
Hello, I want to send an Ajax-Request, when the Esc-key is pushed. (keycode == 27) The code is shown below: $j(this).keydown(function(event) { switch(event.keyCode) { case 27: if(wp_active() && ready_to_submit) { $j(".wp_cancel").click(); } break; ...The strange point is: The request gets fired and canceled immediately. When i try the same thing with any other key, it works fine. (request is not being canceled) Any idea whats the problem?
jquery 1.4.2 - $post - memory and handles grows up on IE 7/8- memory grows up in firefox and opera
Hi, I've switched to the new version of jquery and get trouble with ajax ($post). I see in the taskmanager of windows on every ajax call there are 2 handles lost and the memory usage of the browers grows up. With jquery 1.3.2 there are no problems. Is there a solution? Regards Dirk I'm using apache 2.2.14 (win32) php 5.2.13 (cli) jquery 1.4.2 code: 1) test_post.html 2) test_post.php <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head>
How to dynamic call property on javascript object with jQuery
Hallo all. I got a javascript object with some propeties let's say function Animal() { this.id; this.name; } I need to call id function in a dynamic way to get and set its value: something like this Animal animal = new Animal(); var propertyName = "id"; animal.+propertyName = "name"; I tried like this: $animal = $(animal); $animal[propertyName](); but i receive animal.propertyName is not a function. Is there an elegant way to do it with jQuery? Kind regards Massimo
Toggle function in Safari
Hi there, i`m pretty new in jquery and i`m trying to make a button to toggle the background image. It works fine in Firefox but not in Safari. I hope someone can help me to get it working.... <script type="text/javascript"> $("#togglebutton").toggle( function () { $("#pagewrapper").css({"background":"url(images//bg_wrapper_2.jpg"}); }, function () { $("#pagewrapper").css({"background":"url(images//bg_wrapper_1.jpg"}); } );
Find next class along?
Hi all, I am struggling to find out how to select the images based on the following code: <div class="content-1"> <h3>Title</h3> <p class="instructions">blah blah</p> </div> <div class="content-2"> <h3>Fixed</h3> <div class="field"> <input type="checkbox" id="box11" class="toggle" /><h5>Delete this screen</h5> </div> </div> <div class="content-3 box11"> <img id="thumb4" src="/images/doctors/thumb4.jpg" width="183"
Calculatorish problem using form elements
Hello all, I am pretty new at jquery and don't know much javascript either. I've been handed a calculator function that calculates a taxi price to multiple airports depending on the location of the client. This has already been created by a former employee. But now there is a need to add some extra functions to the calculator, and I have no idea and not much time to solve it. So I hope someone could point me in the right direction. So I will just post the working code and I have already started to
[jQuery] Cycle plugin - set up multiple containers with same options
Playing with the wonderful Cycle plugin. Rather than using container ID's and having specific options for each, I want to use the same settings for multiple containers of the same class. In other words, rather than: $('div#containerName').cycle({ fx: 'scrollHorz', speed: 'slow', timeout: 0, next: 'a#next', prev: 'a#prev' }); I want something like: $('div.containerClass').cycle({ fx: 'scrollHorz', speed:
Highlighting a radio button wrapper div (or element)
Hi, I'm fairly new in my adventures with jQuery and I'm a bit stuck on this. I have a set of radio buttons that are wrapped in divs and I want to highlight the wrapping div (by adding a class) of a radio button that is clicked while removing the highlight from any previously selected radio button (by removing the class). I've got it working to the point where it only works on one set of radio buttons but I need to be able to do this on multiple sets. I did find this but was not able to figure out
.click function
Hi, i hope somebody can help me. I'm sending some information to a php file using jQuery.Ajax. In the meantime i add a button to the page called delete_0 for the first element, delete_1 for the second, .... The php generates a unique ID and I need it back in the JS Therefore i tried to let the php run a js function in the end: addItemToQueue ( ID ); function addItemToQueue(ID){ jQuery("#delete_" + ID).click(function (){ alert(ID); }); } The whole system works quite well for the first element; but
Moving table rows to another table?
I'm creating an app for sorting people in different groups. How would I create a button on a row so once that particular row gets hit it jumps to another table on the site? I'm not exactly sure what to Google for. Could you help me? Thank you, Egill
HELP! Having trouble with live() function
Ok I have a page divided up into two tabs using jQuery. The problem is that I want both of the tab "pages" to have similar functionality. The problem is that one of the divs is initially hidden with display none. Well when the hidden div is finally displayed and the original div that was shown is hidden it has none of the functionality I wanted it to have even though the elements that I wanted to be edited with jquery the same name. I thought live was supposed to automatically be able to update as
load() working by class, but not id.
I am trying to load content using the load page fragment feature from a div in another page and insert into the current page of the same id. Frankly, I'm quite stumped. :P Examples: This is what works: $("#content").load(''+url+' .right'), function(data) {}; This is what I need to work. $("#content").load(''+url+' #content'), function(data) {}; Using the second example ends up loading nothing. Here is the function. function loadPage(url){ if(!isWorking){ scroll(0,0); document.getElementById('blogcontent').innerHTML='<center><img
Event handler for element repositioning via browser layout change?
Ok, so the title might not be the best, I'm not quite sure how to word it but, effectively what I'm wondering is if it's possible to bind a function to an element that is fired if that element is 'moved'/repositioned via the browser. For a more specific example what I have is a function that calculates height and width of certain elements to allow them to all fit nicely on the page without having scroll bars, and this is bound to the window onresize event. It works nicely most of the time but occasionally
How to add content to elements as they are created by a plugin?
I'm using a plugin (asmSelect) that dynamically generates list items as the user chooses options from a select. I want to add additional dynamic content to each of the list items as they are created. How is this best accomplished? I thought I could delegate a 'load' event for the list items, but it looks like load events don't fire for content that's generated by JavaScript. (Delegating a 'click' event works, so I know I've got the code correct.) What I want to do is basically equivalent to: $('#testform').delegate('.asmListItem',
autocomplete not working on one page but working perfectly on another
Both pages have the same header info since they both use include to echo the header with the required jquery and jquery ui references. include("includes/header.php"); if ( !$_SESSION['logged'] ) { header ("Location: index.php"); } $db = db_connect(); echo ' <script type="text/javascript"> $(document).ready(function(){ $("input#provider").autocomplete(function(){ source: ['; $providerlist = mysql_query("SELECT * FROM users"); while ( $provider = mysql_fetch_array($providerlist)
[ANNOUNCE] iRocket launch
This kinda falls into the "sites using jquery" category, but I don't see any specific forum for that, soo... We (iHwy) launched this site today and it's fully loaded with jquery stuff. Plugins used include: blockui, jqModal, cookie, qtip, url, validate, alerts, easing, idtabs, metadata, scrollto, timepicker (customized). Trimpath templates (non-jquery) are also used extensively. http://www.irocket.com/ Much thanks to the great jquery community and plugin authors. I can supply free trial links if
IE error on execution time
I don't know what to do, I'm new with jQuery... I want to do a simple (very simple) photo gallery, I have thumbnail at right and the amplified photo at left all inside a transparent table... So, the code works perfectly with Chrome and Firefox, but our friend IE didn't like my code. Here it is: $(document).ready(function(){ $('#thumb').click(function(){ var thesource = (this).src; $('#large').empty(); $('#large').append('<img src='+ thesource +' >'); }) }); Do you have any idea of what is happening
css width auto
Will we be able to use 'auto' for .css() width or height at some point? I need to know because I cant use .width or .height in .animation
setting css left as percentage doesnt work in chrome/safari
Hi, I'm setting position left to 100% and it works except in Chrome/safari. These browsers set it about 100px from the left not 100% obj.css('left', '100%'); Any one know about this? -- Setting the css by itself <img src="" style="left:100%;position:absolute" works fine. I don't know if this is a browser problem or a jquery problem.
CSS/jQuery: Help w/ Tabbed Slide-Out on Right Side (Not the Plug-In)?
I'm trying to use a jQuery script to create a tabbed slide-out on the right side of the screen. At this point, the slide-out plug-in is not an option. Here's the script: $('#sideTabMain .button').toggle(function() { $('#sideTab').animate({right:'0px'}, {queue:false, duration: 500}); }, function() { $('#sideTab').animate({right:'-650px'}, {queue:false, duration: 500}); }); The issue is CSS-related. You can still see the slide-out div when you scroll over to the right (off the screen). How do I hide
What is the difference between Firefox and IE on event binder
$j("#forwardcurveclose").bind("keypress", function(event) { alert('hello'); var key = event.keyCode || event.which; if (key == 9) { .....; } } ); Upper code, working well under firefox, but never been triggered in IE8. please let me know if you have any experiences with it, thanks.
CSS hover properties not available in jQuery hover event under IE8
With the following html: <!DOCTYPE HTML> <html xml:lang="en-US" lang="en-US" dir="ltr"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> <title>Test</title> <script TYPE="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> <script type="text/javascript"> $(function() { $("a").hover( function() { var spn = $(this).children("span"); spn.html(spn.html()
Next Page