Autocomplete to use php $row['names'] or similar then do something on select?
Hi guys, Is it possible to use jquery autocomplete in a PHP class file and use the php array it creates for a list of vales from a MySQL table? Once one of these values is clicked, can you help me to show an alert box? After that I should be able to continue my mini project. Thanks for any help you may have. Cheers, RJP1
automatic slide navigation button
demo page When you mouse over the letter, the content will move to the the position which the title is match the letter you choose, but if you use the scroll bar, the position will not move correctly, and I have know idea why is that happend.
Ajax, connection keep-alive
Is there a way using the jQuery Ajax function to set the connection to terminate immediately after it's finished as usually the connection is kept alive for several minutes (on my apache for instance) before it's terminated for being not active.
Bad smoothing in ff (v_3.6.6)
Hi. I made an animation using .animate() method and it's smoothing badly in FF of version that i've mentioned above. I tried this animation in ie 6 / ie 7, chrome, opera 10.53 (in opera 9.2 animation is also not the one in other browsers) and it's "flying". Here is an example. Does anybody know smth about this issue?
row number and column number of table cell
I need to find out what row number and column number when a cell in a table is clicked
Using jQuery with Visyal Studio
I have just been required to write asp.net mvc, which was nice. And have copied a bunch of jQuery code over along with it's html/css and when I build the project I get the error: 'get' is a new reserved word and should not be used as an identifier Does anyone know a way around this?
Drop down who change a picture to display
Hi all, I have a script who display 1 big picture and 3 thumbnail. When you click on one of the thumbnail pictures i display the big picture. Now im trying to use a drop down to change the big picture. The drop down allow the user to select a color. I would like for example when he click on "Pink" that the picture change to the right one (pink one). You can have a look here: http://www.smartshake.co.uk/purchase/ I tried to change the code but im just able to add a new picture instead of changing
undefined problem
Hi, i have a script here who assigns some functions to divs (if you click them). The thing is that if i call a site where i don't have this divs I get errors like option.back[0] is undefined. Is this script wrong written by the guy who made it?
Scrolling Testimonial Area
Good day everyone! Anyone got an idea about how I can make in jQuery a "scrolling testimonial area" like this: http://www.mikefearphotography.co.uk/testimonials.cfm http://www.personalgrounding.com/scrollingtestimonials.htm [I guess it may already exist and I'm using the wrong name?] Thanks a million in advance!
Image Animation in IE 8
First off, I'm not a jQuery expert so I'm kind of fumbling in the dark here. I'm trying to get a simple series of images to fade sequentially to create a slide show/image rotator effect. The effect works flawlessly in Firefox, Chrome, Safari and even IE 7 but for some reason nothing happens in IE 8. The slide show images don't display at all and the only thing that is visible is the default background image. If you go to www.dominicancoffee.net you'll see the issue in (in)action (in you're using
append() wont work with xml tags when ff uses the xml parser?
When i send a site header with php like this: <?php header("Content-type: application/xhtml+xml"); ?> jQuery works, but not allways the append function. Im using Firefox 3.6.6. Is this a bug? More examples: $("div#workbench").append("Test"); //<-- this works great $("div#workbench").append("<strong>Test</strong>"); //<-- this wont work :( It wont work with every type off html/xml tag. When the browser works in normal html mode allways is fine. What is the reason?
Multiple AJAX links on a page: rating articles
Hello! Here's the problem: we have a blog service at http://oire.org/ (unfortunately, you have to switch manually to English to see the pages displayed in this language). Each article or blog post can be rated by registered users, so they can get either a Plus or a Minus, increasing or decreasing the rating of the post. since we are in 2010 and refreshing pages after such a click is not a great thing :-), we decided to make it AJAX using $.get. Here is the code we use (it's definitively bad on my
toggle help
Hi I am trying to implement the toggle funtionality. I have a list of content headings and when the user clicks on a individual heading the content shows below the heading. I also have a button on the top of the page that when clicked all the hidden content under each heading is expanded. But when a user expands or closes a single heading content then decides to open everything the content already open will close. Or if the user closes a single heading content then chooses to close the rest, the
jquery tooltip in image map (links)
Hi everyone, My apologies if this has been asked before but my internet is VERY slow and it would take me near 15mins to perform a search :( I would like to know how to use a jquery tooltip within an image map. I have succesfully made the tooltip appear upon hovering over the link on the image map, however, it does not confine to the coords of the map... it goes to the centre of the image instead... How can i fix this problem?
jQuery Accordion
I have a bit of an issue. If you could look at the following image: http://img713.imageshack.us/img713/8475/jqueryhelp.jpg As you can see #2 and 3 have some of the header image above them and they don't act like a normal accordion in jQuery. And suggestions?
press down one button, the rest automatically bounce up
what i want to do is exactly same like this <!DOCTYPE html> <html> <head> <style> div1, div2 { width: 60px; height: 60px; margin: 5px; float: left; background: green; border: 10px outset; cursor: pointer; } p { color: red; margin: 0; clear: left; } </style> <script src="http://code.jquery.com/jquery-latest.min.js"></script>
How to get values from inputs
Hi there, I want to create a dynamic clickable color picker like this: When I click a square it has to select a color from the list - it's simple but... There are inputs with the same name="color_number" - I'm trying to get those values but it returns just the first one, so there's working just first color. This is my code: var color_number = $j('[name=color_number]').val(); $j('div.color-picker-'+color_number).click(function() { $j("#input_Kolor option:contains('"+color_number+"')").val();
combo box at run time-options generated by foreach
i have added html elements at run time using append function addFormField() { $("#inputss").append("<strong>abc</strong>"); } but how can i add a select element at run time that looks like this.. <select name="pre_req" id="pre_req" class="inputs" value=<?if($this->uri->segment(2)=='update') echo $results['pre_req']?>> <option value='None'>None</option> <? foreach($combo1 as $row) echo "<option value=$row[sub_name]>$row[sub_name]</option>";
Infinite Scrolling
So I've found a ton of examples of this online, but none have been related to what I'm hoping to do. I'm just trying to make it so that when I get near the bottom of the page, it automatically loads a block of HTML code (so you can't reach the bottom of the page). This HTML code loaded will be the same no matter what. All of the examples so far have been loading previous WordPress pages, so I haven't figured out how to just load a constant block of HTML each time. Any help would be greatly appreciated,
Can't get function to run inside if statement. Works find in click event though.
This is driving me a little insane because I feel like the answer is soooo simple, but perhaps I'm not asking the right question in google because I can't find the solution anywhere! I have a function that uses a template in the page and duplicates it for a form. $('#new_task_button').click(duplicateField);This works just great and does exactly what I'm wanting. However, now I need to constrain the date fields in this duplicated template, so the click function has changed to this $('#new_task_button').click(function()
delegate and live
Hi everyone, My understanding is that I need to use either .delegate or .live for what I want to do below. What I'm trying to do is hide elements based on a clear button click. I have a jsbin set up here: http://jsbin.com/akaco4/2/edit So using that as an example, I'd want all of 6A3.2 to be hidden if they selected the clear button below 6A31. There is code already in place that only shows 6A3.2 if a selection was made in 6A31. Now I want to do the reverse: hide 6A32 if they cleared the selection
find and hide li with same content
hi there, i´m looking for a way to check a list for equal content and then hide this li. f.e.: <ul> <li class="static"><a href="#">plakat</a></li> <li class="static"><a href="#">plakat</a></li> <li class="static"><a href="#">plakat</a></li> <li class="static"><a href="#">katalog</a></li> <li class="static"><a href="#">katalog</a></li></ul> should be changed to: <ul> <li class="static"><a href="#">plakat</a></li> <li class="static"><a href="#">katalog</a></li></ul> i tried .unique
Inserting <li> before class returns <li></li>
Hi, I'm working on a project that requires me to take numerous classes and put these within a list-item. I have been trying to do this with different methods, such as before, insertBefore and Prepend. All these methods have had the same result. Instead of inserting a single <li> in front of the class, a complete list-item has been inserted (<li></li>. this is the code I'm using: <script type="text/javascript"> $(document).ready(function(){ $('.ngg-gallery-thumbnail').insertBefore('<li>'); });
mixing functions such as .find() and .sibling() with selectors such as :parent and the '+' sibling operator
problem: I have this complicated search I want to make via jQuery, I realized that I will have to nest several selectors/functions and I don't know how the syntax works for that. example:I'm looking to find all input fields that exist in tab(i) that are adjacent (or a sibling of) labels that have a span with an 'asterisk' class. Then I want to change the class of that input into "required". I have potentially hundreds of such input fields and as such it's impossible to refer them by id or whatever.
Line break in html/css code
When I want to handle html/css code in js/jquery it seems that line breaks aren't allowed. This of course makes the code less readable. Is there a workaround to this or is it simply to accept? This doesn't work: $("head").append("<style type='text/css'> #table {table-layout: fixed;width:650px;text-align: left;border-collapse: collapse;} </style>"); This works: $("head").append("<style type='text/css'>#table {table-layout: fixed;width:650px;text-align: left;border-collapse: collapse;}</style>");
Set Focus After Submit with Form Plugin
Hello everyone, I have created a form with malsup's Form Plugin wherein it submits on change of the inputs. However, after each submission, the form loses focus, which forces the user to click on the next input element after each input change, which is a bit annoying. Is there a way I could set the form to automatically focus on the next input element after the submission depending on which input element the form was submitted from? Thank you in advance to anyone that helps me with this issue. Here
checking for "/" in document URL's before replacing?
I am trying to target all PDF document links on a website and add to the href URL. The problem is, some of the links are relative and some are absolute... Because all PDF's don't exist in the same DIR (or even in the root), how can I check for the "/" and then append? Currently I have: $(document).ready(function(){ var linkValue = $("a[href$='.pdf']").attr("href"); $("a[href$='.pdf']").attr({ href:"/myDir/file.htm?ref=http://www.mysite.com/" + linkValue }); }); ...which works fine
How to attach dialog to table rows?
Hello, I am a complete newbie and I am trying to learn jquery ui as quickly as I can (so please excuse any completely newbie question) I have a web page that has a table with rows in it (obviously). Each row in the table pertains to a large chunk of text that is displayed in truncated form using slice(). I would like to be able to click on a row of the table, and have that bring up a textarea in a dialog which would allow the user to view/edit the text. When the user clicks OK, it would then write
Updated from 1.3.2 to 1.4.2 and code doesn't work
Hi everyone. I'm speed up some jQuery code I have, so I just updated from jQuery 1.3.2 to 1.4.2. However, the code doesn't work anymore... It is a recursive ajax-request + page-update cycle. My function ajRequest is like this: function ajRequest(){ jQuery.post( myurl, {}, function( response ){ updatePageMessages( response ); ajRequest(); } ) } The code is fully functional in jQuery 1.3, but it just doesn't make the recursive call in 1.4. What can I do to make it work? Thanks
hyperlinks won't open in my gallery lightbox jquery
here is the gallery page http://www.iloveoffset.com/speakers.html so when you click on first link you can open hyperlink BUT when you go to next speakers it doesn't. It links to the fact that when the "previous speaker" button appears by default then the script won't work. Funny thing is that it work in IE but not firefox or safari. Any ideas anyone
send complete form in an .ajax() call
Hello there, Scenario: I have a form with around 125 input fields. I want to use .ajax() to send these form data to the server. Is there a way to send the entire form to the server? Like, the form is passed when we click submit button and url changes. But I want to achieve this using AJAX. Appreciate any help. Thanks, Moiz
delegate only finding
Perhaps I'm misreading the documentation on delegate, but placeText only ever finds sideBarInfo and not the actual element clicked. Any ideas what I'm doing wrong here? Thanks, Dean sideBarInfo.delegate('span.show', 'click', function() { var placeText = $(this).text(); $(".hide:contains('" + placeText + "')") .slideToggle('slow'); });
Can not choose the correct element using parents() or closest()??
Hello all. Please see below. In line 42 I am trying to select any of the divs within line numbers 9 to 14. If I code it like this $('div').closest('.slide_holder').children('div:eq('+RW_index+')').css({'background-color':'#000000'}); or like this $('div').parents('.slide_holder').children('div:eq('+RW_index+')').css({'background-color':'#000000'}); it works BUT selects the very first group of divs. I want to choose the first group ABOVE the class="slider_dot" div that is clicked. Here is the line
Animation is slerky and not smooth
Hi all, Is there any way to make a animation very smooth when its duration time is 5 seconds(5000ms) and the image is 900×300 px? Is this a browser problem or a jquery problem? my testing ground is: <script> $(function() { var first = 5000; var second = 5000; $('div').animate({ marginLeft:1000 }, first, function(){ $(this).animate({ marginLeft:0 }, second) }); }); </script> <div style="background:url(images/foto.png);width:920px;height:300px;"></div>
Closing a window after form submission.
I am trying to come up with a way to close a window immediately after a form in that window is submitted. I do not want to wait for the response from the server. The reason is that the response could take up to an hour and I don't want to have users waiting. Is this possible with jQuery? Here is what I am doing now: <script type="text/javascript"> function xSubmit (frm) { frm.submit(); alert("The request has been submitted."); window.close(); return false; } </script>
hit test - detect if two objects collide
Hey, I'm trying to find a method which takes two objects as arguments and returns true if they are overlapping and false if they are not. I know this is available in Flash and is know as a hitTest. I'm surprised i haven't been able to find this already, so i'm guessing it's out there, i just don't know how to find it. If i cant find it i'll write one and make it available. ultimately what i'm trying to do is detect when an object moves into view in the view port when it was previously off screen
jquery showcase
hello; does anyone know the URL to this site? It has a huge database of jquery/prototype scripts. Its like a showcase i suppose, y ou can download scripts etc. I just cant find it anymore. Thanks!
[jQuery] [validate] Option to NOT defer required validation?
Hello, I have a form that displays data from a database table, and makes some of the fields text boxes, so the user can edit them. These text boxes are required fields. But if the user deletes the text and then tabs out of it, the "required" error message does not come up, until some other validation is done or the form is submitted. How can I make the "required" error message appear immediately? Jamie
Using "slide" and addClass
I've got a table cell that has a default class that gives it a background colour. When mousing over that cell, I'm using addClass to change the class so the background colour is default. This is all fine and is working. Is there a way to add in a slide effect so the background colour slides down from the top? I've done something similar in the past by showing / hiding a DIV using the slide effect, but not sure if this can be incorporated using classes. Thanks, Ed Ludlow PS This is what I'm using
Inserting a List Element into an Ordered List
Hello all, first time poster here, new to jQuery. I'm working on a project that requires dynamic manipulation of an ordered list -- adding and removing elements in response to the user pressing buttons. I've run in to some odd behavior. Here's my code: HTML <ol id="track-list"> <li>Static Content Here</li> </ol> <input type="button" id="add-track" value="Add Track" /> jQuery: $("#add-track").click(function(){ var listEl = $("<li>Dynamic Content Here</li>"); listEl.hide();
Next Page