Uncertain about implementation of Values method in Slider
Heya, I have already looked through the knowledgebase and searched around, yet I couldn't find a working solution. I'm guessing I'm missing something simple yet I'm not sure what. I use the Values method of Jquery Slider to set a range of values. I adapted the demoscript, I edited the names, but I'm not sure why the second slider (with the values in it) is not showing. I appreciate it if you can point me in the right direction. Code below: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"
toggle function breaks when using jQuery UI
We are using toggle as described here http://api.jquery.com/toggle/ with .toggle( showOrHide ). After we added jQuery UI the .toggle( showOrHide ) isn't called any more, but the .toggle(effect), which breaks our code. Because Javascript doesn't support function overloading, i think this 'overwriting' is not a good way and very error-prone. This should at least be mentioned in the documentation.
Possible to simulate a keyboard shortcut being pressed by clicking on link using JavaScript?
Hi, I'm creating a touch application in the "Itunes LP" format which uses html, css and javascript within Itunes to create a "digital LP". The application will have several LP's to explore through a touchscreen. In fullscreen mode (within Itunes and the LP) you can press the "esc key" to exit the LP and enter "coverflow view" where you can choose another LP to explore. I will have no keyboard or mouse so I need to create a button/link that do one thing when the user clicks on this link and that is
How can checkboxes to be automatically checked when $(document).ready??
for example, i have 3 checkboxes with values of 1,2,4 respectively and a varible use to store their summation value, How can checkboxes to be automatically checked when the web page initialized? when form initialise, if a variable has value of 1, that means the first checkbox need to be selected at the first, if value is 2, then 2nd checked, if 3, first 2 boxes need to be checked, value is 4, the third one checked, if 7, all the checkboxes need to be checked...
Submit form and display form on the same page.
Hi, I am currently working on form which let the user submit a small (max 300 char) message.. Now I want the message to display on same page under the form, something like twitter.. I tried a lot using jquery but it is not working. Can someone please give me idea where and how can I solve this? -Thanks in advance
Filtering results like travel site
Hi, I am working on some travel related site, User can modify his/her search by criteria in the left bar. Can anyone give me idea from where I can start this? I am a starter in JQUERY. -Thanks
how to refresh a div after a period of time AND only if the div is in view
Hi. I have a situation where I want to rotate content every x seconds but my app often sits in another tab out of view for a period of time. Basically after a period of time, if the div is viewable by the user, I would like to refresh it. How can I do this? The time part is easily. How do I also detect the div is in view? Thanks. J
Finding spaces in a string variable and replacing it with "%20"
I need to pass a variable into a URL but need to replace the spaces with $.ajax({ beforeSend: function(){$('#loading').show();}, type: "GET", url: "http://server/cgi-bin/findwhoisonduty.pl?host="+groupName, dataType: "text/xml", What's the best way to do that?
delay in hover
I did a very straightforward hover script which replaces a map with a different map when the user hovers over a link and goes back to the default map when the user mouseleave's. There are several such links on the page and they all behave exactly as I programmed. jQuery('a.roll').hover( function(){ jQuery('div#mapp').css('backgroundImage', 'url(/wp-content/images/' + jQuery(this).attr('id') + '.jpg)'); }, function(){ jQuery('div#mapp').css('backgroundImage','url(/wp-content/images/blank_map.jpg)');
Post a validated form to a php page via POST method
Hi All, this is my first post, and I'm only just learning jqury/JavaScript. i have a form I'd like to send via POST method to a second php page, i have all the validation etc working fine, I'm struggling with the on Submit handler.. once the form is validated... can anyone please tell/direct me how i can post this form to a php page that will do the data insertion? my code is in 2 parts: the html (which can be a php page) and the javascript i have used... many thanks in advance... the html.... <!DOCTYPE
problem with table after removing a row
I have a table with a number of rows in it each with a delete link which calls $("#" + id).remove(); of course passing in the right table row id each time. I also have a row at the bottom that has divs with totals of columns in each row. After I add a row to the table I call a function that goes through each table row, gets the values that i need and keeps a running total. I finally update the divs in the last row with these totals. However, when I do the row.remove() and then call my calculate
jQuery.each problem
Hi, I'm looping through a set of invoice figures trying to calculate totals for tax. I have this snippet of code in my loop to create an array/object on the fly and calc the total :- ivaRates[(ivaRate)] = (ivaRates[ivaRate]===undefined? 0: ivaRates[ivaRate] )+ ivaValue;When type ivaRates in the console, I get what I expect:- 7.00% 35.179200000000044 16.00% 0.5760000000000001 I was hoping to use $.each() to extract the key,value pairs, but my statement:- $.each(ivaRates,
[Jquery][1.4.2][hover] different behavior in firefox and Opera
I'm using this code with jquery 1.4.2. The code works correctly in IE 6,7,8 and Chrome build #(who knows)..... But it doesn't work in Firefox 3.6.3 or Opera 10 The page validates 100% perfect to the dtd and there are no client errors. The desired behavior is that the gallery will scroll to the right or left when I hover over the respective arrow divs, and when I take the mouse off the div the scrolling should stop. In Chrome and IE the behavior is perfect. In Firefox, there is no scrolling at all,
show/hide UL LI problem
Im trying to do a simple show hide UL/LI nested list, and i have the following code. $(document).ready(function() { $('#nav>li>ul').hide(); $('#nav>li').click(function(event){ var $target = $(event.target); if ($('#nav ul:animated').size() == 0) { $heading = $(this); $expandedSiblings = $heading.siblings().find('ul:visible'); if ($expandedSiblings.size() > 0) { $expandedSiblings.slideUp(300, function(){
problem with syntax updating hidden form field
I have a number of table rows in my table and each has a hidden form field which I'm trying to update using the syntax below. When I run it I get back undefined for the alert. Can anyone let me know what I'm doing wrong? The table row id is tw_cjid_10775_4. Thanks. $("#tw_cjid_10775_4 > input[name^='hf_lineitemid_']").val(lineitemid); alert($("##tw_cjid_10775_4 > input[name^='hf_lineitemid_']").val());
The 7 undocumented jQuery methods?
It seems that there are seven undocumented jQuery methods: init() pushStack() push() sort() splice() extend() domManip() I am not talking about members of the jQuery object as in $.member, but about members of the object returned by the jQuery factory function as in $("div").member. I don't have the motivation to figure out how exactly these methods work, but a quick Google search didn't return much info... I'd be happy to find out more about these methods... -- Šime Vidas http://www.w3viewer.com
capture click event and append to end of a form's action via Ajax
I need to capture the click event, edit form action then re-submit the form with the captured input value appended to the end of the action. Anyone got any ideas? Been messing around with the following: so I would like the end url action to be google.com/tada <html> <head> <script type="text/javascript" src="http://code.jquery.com/jquery-1.4.2.min.js"></script> </head> <body> <script type="text/javascript"> $(document).ready(function() { $("form[class='ajax'] input[type='submit']").live('click',function(e)
jquery-1.4.2.min.js Exception thrown and not caught
Hi, I was using jquery-1.3.2.min.js to show a modal dialog on a button click event handler and this worked fine. The same did not work with jquery-1.4.2.min.js and yielded the following script error on my IE -8 broswer. Message: Exception thrown and not caught Line: 75 Char: 399 Could somebody help me on this please! Durga B
Chrome & Safari - Not answering inArray correctly
I'm using inArray() to check an XML tag against an array called status[]. If the result != -1, then do one set of instructions, else, the item is 'available' so do another set of instructions. Each entry of my XML document has a <status> tag, which will contain one of 3 values, or a 4th option 'available'. I have an array setup called status['sold', 'pending', 'reduced']. If the <status>.text() is one of these 3 values, then we'll get the array position, if it's 'available' we should get -1. When
jquery each and animate
Hello, i use jquery since some months, and find it great... now i faced a problem i never had, so i need someone to help me. i'd like to "build" a page using jquery. In my code i put part of the content in a ul and set every li to display:none. Then i'd like to do something like: $('ul#portfolio li').each(function() { $(this).show(1000); }); expecting every element to display one by one... but it doesn't work. please, help. thanks a lot!
random image order with jquery
Hi all i wanna make random image with jquery this is the code: $(document).ready(function () { $("img#wrapper").random; }); <div id="wrapper"> <img src="dog.jpg"> <img src="cat.jpg"> </div>My Problem is what i write in red. I see a tutorial for use :random but i dont know if that is good. Example on Load page: <div id="wrapper"> <img src="dog.jpg"> <img src="cat.jpg"> </div> or <div id="wrapper"> <img src="cat.jpg"> <img src="dog.jpg"> </div> this for
Json, node and numbers
Strange problem: I have the following json data: { "UB": { "Y1": { "A1070": "750000.00", "A1079": "-750000.00", "A1211": "206755.00", "A1219": "-114757.00", "A1220": "448934.00", "A1229": "-313549.00", "A1230": "123904.00", "A1239": "-24781.00" } } I can easily access the data by for instance: $.each(data.UB.Y1, function(i,item){ etc But if the json data instead is like below it is not possible
[OK] .show() question
hi all, I'm working with jquery and i have a question about jquery .show()! So I've an image with 3 areas, and when i click on a specific area I display another image and text! Everything is going on smoothly =) But the .show() function display the new image from the top left corner every time (normal), and I'd like to display it from the clicked area... I mean, that if we click on the bottom right area, can the new image appears from this area(or from the bottom right corner) and not from the normal
<style> element in IE
Hi, Is there a way to get the style element text ("body { background-color...") in internet explorer? The following example works in FF but in IE it gives the following error: Unexpected call to method or property. <html> <head> <script type="text/javascript" src="http://code.jquery.com/jquery-1.4.2.min.js"></script> <script type="text/javascript"> /* $(document).ready(function () { $('body').prepend('<div id="styleHolder"><style></style></div>');
problem with super-fish buttons and sideshow
Hi, I have a problem with the buttons in IE 5 and IE 6 they don't open at all and in IE7 the buttons hide underneath the slide show I need urgent help please I am only a biginer in Web design Thanks Adam My email is webdesign@adamlisik.co.uk
$.post() problem
i have this code var ret = null; $.post("my_url.php", { my_data : "hello"}, function(data){ ret = data; alert("server returned " + data); } ); alert("server response = " + ret); my_url.php will returned a random value of integer. when i call alert("server returned " + data); within the callback function of $.pos() its completely work... but when i call alert("server response = " + ret); its doesn't work... i think its because ajax setting "async" is true. but i dont
preventDefault() not stopping default browser behavior for Ctrl-PgUp and Ctrl-PgDn
I'm trying to implement WAI-ARIA keyboard controls for an accordion, and I'm stuck on getting Ctrl-PgUp and Ctrl-PgDn to work correctly. I've written the code to handle the correct behavior for the accordion, but I can't stop certain browsers from continuing their default behavior of switching between browser tabs. Both Firefox 3.6.4 and Chrome 5 insist of switching the browser tab, although Firefox still performs the scripted accordion behavior. Chrome does not. Safari 5 and IE 7 both behave
Check Box Counts
I know this topic has been discussed before, but I didn't find the precise problem I'm having. I'm trying to count the number of checked check boxes with a class of "selected-track" in a form named "giveLocaForm". The statement below, though, always returns zero. Can anyone tell why? $("form[name=giveLocaForm] :checkbox:checked.selected-track").size()
click event is falled on a loop when clicked on a dynamic table cell
$('.ListTable').find('tr').not('.HeaderRow').find('td:last').prev().click(function() { var vEditIndex = $(this).parent().parent().children().index($(this).parent()) - 1; var vRowForEdit = $('.ListTable').find('tr:eq(' + (vEditIndex + 1) + ')'); var vContainerId = vRowForEdit.find('td:eq(0)').find('input:eq(0)').val(); var vBatchNo = vRowForEdit.find('td:eq(0)').find('input:eq(1)').val(); GetBatchDetails(vContainerId, vBatchNo); GetContainerDetails(vContainerId); }); I have use the above function
1 button for sliding up and down
hi there, i have two buttons one YouTube and a GoogleMaps. When you click the YouTube button the content is loaded into a div (class: extra) and it will be shown on the page with a slideDown effect. The same function is added for the GoogleMaps button. So when the content div is filled with a googleMaps and you click the youTube button the extra div will slideUp, filled with a movie and then it will slideDown. This is working fine with the code below. But i need one extra functionallity. When you
Collisions
Hello, Wanting to know if this is possible. I am using jquery to move a box i want to know if jquery or javascript can tell if it is going to hit another object or it can just stop moving if it hits another object. currently have a ajax php and mysql solution for this but is quite heavy just to check if an object is in the way or not thanks
problem with jquery ajax and php
I recently started learning jquery and I'm frustrated with a problem i got. I use the following code in the html page: <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> <script type="text/javascript" src="jquery-1.4.2.min.js"></script> <script type="text/javascript"> $(document).ready(function(){ $("#texty").keyup(function(){ $.post("http://localhost/test/test.php",function(data){ $('.try').html(data);}); }); }); </script>
problem with jquery $.ajax and french characters when inserted in database
I get french characters who look like this é but are é for example. I am using jquery ajax and making a form validation with php then inserting in the database, code: $('#submit_maj_password_email').click(function(){ var _data= $(this.form).serialize() $.ajax({ type: 'POST', contentType: 'application/x-www-form-urlencoded;charset=iso-8859-1', url: 'validation_profil.php?var=maj_password_email', beforeSend: function(){}, data:_data, cache: false,
Newbie question; placement of jquery code
Is there any reason why I can't place Jquery code pretty much anywhere in the page or does it have to go in the header area? I ask because I've tried it, obviously, and i works in Firfefox but not in chrome. Basically I'm wrapping $(document).ready(function(){ .... } in a function, which is declared in the header then called further down the page in the body. I'm doing this with good reason but if it's not going to work then I need to find a way around it. Any help appreciated. K.
getting value from select list
I know that normally you can get the selected value of a select list by using :selected. But in my scenerio I have a number of rows in my table that are added dynamically and the inputs all have prefixes through which I select them. But once I select them I'm not quite sure how to get to the values of the select list. Here's what I have already and I get undefined for the list value. var lst = $("input[name^='lst_item_']" , this ); var lstVal = $('#' + lst.attr("id") + ' :selected').val(); alert(lstVal);
Script help!
I have a webpage that calls a different image gallery everyone a user clicks on a tab. The problem is IE is having issues calling galleries that are hidden until a user clicks on a tab. I need a script that calls the gallery when a user clicks on the tab. Website is here: http://www.rgb.net/index.php?id=10 It works great in Firefox and Safari. Thanks in advance for any help.
how to select checkbox and textbox in each table row
I have a table to which I am dynamically adding rows to. When a user clicks a link I need to select a checkbox and a textbox in each row to do some validation. I have this but it's not working and I'm not quite sure what I need to change to make it work. Thanks. $("#tblWorksheet tr[name^='tw_cjid_']").each( function(){ var chkbx = $(this).("input[name^='chk_approve_']"); var txtbx = $(this).("input[name^='txt_comment_']"); } );
Test if Jquery is loaded
I am building an app for a CMS that sometimes loads Jquery already. Is there anyway to test if I should load mine if it isn't loaded? I am using smarty templates for my app if that makes any difference. Sorry, sorta a noob about this.
How to change a whole stylesheet.
Hi! My code seems to work perfectly, but i wanna ask if there is another way to change a stylesheet in a document. My code is simple: <head> <link rel="stylesheet" href="../css/main.css" type="text/css" /> </head> <body> <h1>BIG</h1> <button type="submit" id="btn" value="ok">change</button> <script type="text/javascript"> $(document).ready(function(){ $('#btn').click(function() { $('link').attr('href','../css/second.css'); }) }); </script> </body> after clicking a button new attribute is setting
setting url variables...
hi am new here i want to know is it possible to set URL parameter after apply any action like .post .load .get thanks in advance
Next Page