jquery

Problems passing jQuery $.post a variable as a parameter

I am trying to send a name:value pair to a php script using the $.post object in jQuery where both name and value are variables. I have sent the variables to the console in FF, so I know they are being set correctly, but when I view the headers being sent, only the value variable is being evaluated correctly, the name is being sent as a...

Is jquery ":contains" selector accepts this kind of value "Banking and Finance"?

Hello guys, I'm having problem with the contains in jquery. It seems that it only accepts one word. Not a phrase or two words. Example: $('#div:contains('Word')'); --> This is okay $('#div:contains('Just another word')'); --> This will return empty/this will not match. Have you experience this kind of problem? Your reply is greatl...

How to open a new window when clicking a hyperlink?

I would like to open a new window with height of 600px and width of 200px, after clicking on a hyperlink. How can I do that in HTML/Javascript? Do I use something like window.open? Is it compatible in IE also? Or should I use something in Jquery? Thanks in advance. ...

Jquery .serialize isn't including the FIRST SET at INDEX 0

My jquery looks like this: var as = $("input[name=as[]]").serialize(); var bs = $("input[name=bs[]]").serialize(); var cs = $("input[name=cs[]]").serialize(); but it's not serializing the first set at index 0. ...

jQuery Autocomplete: how to refresh list?

I have a form with a variable number of autocomplete fields that use the same select list. These fields are added and removed as needed. Whenever a parameter on the page is changed, I (try to) update the list for all the fields by first calling unbind() then autocomplete() with a new parameter added to the url. $('input.foo').unbind()...

How to proprly write string using jQuery

Hi, I have this bit jQuery with HTML. Unfortunately its not working correctly. Can anyone please advice how it should be please? var Bred =("<div class='TakeMeTo' style='width:" + width + "px; right: " + width + "'>" + whereTo + "</div>"); Thank you for your help in advance ...

jquery traversing - there has to be a better way than mine!

Hi Folks, I'd like to know if someone has a better way to access the elements #type and #type_new based on my html: <tr> <th>Type of Organization</th> <td id="toggle"> <select name="type" id="type"> <option>Church</option> <option>College</option> <option>Theatre</option> </select> <input name="type_n...

Unidentified problem with jQuery's .click() function

Hello all. I'm trying to add an 'onclick' function to an image with jQuery and for some reason it's not sticking. My code looks like: //create arrow icon/button for li var img = $('<img></ >').attr('id',i+5) .attr("src","images/16-arrow-right.png") .addClass("expImg") ...

JQuery: Creating boxed text that shows on top of a div on hover

Let's say that I have a div that is called mainDiv, and it contains a <p> element with some text inside. I want to create another element (a <p> or a <div> or something else maybe?) inside the same div that is displayed when you hover over the first <p> element, and is hidden soon after you move your mouse away from the first element. Pr...

Jquery works in Firefox, Safari & Opera but not IE?

This is weird. I am testing to see if JQuery is installed by adding an alert. This works fine in Firefox, safari, opera and chrome, but IE 6/7 simply do not show the alert. JavaScript is enabled. Has anybody ever come accross this? $(document).ready(function() { alert('Test'); }); UPDATE: Link here to code: http://tinyurl.com/yjm...

jQuery animate() deselects text in Firefox

Here's the code: $("#textyt:input").focus(function() { $(this).animate({width:"545px"},500).css("color","#614A3E"); $(this).select(); $(this).mouseup(function(e){ e.preventDefault(); }); }); If I take away the animate effect, this focus event selects the text (as I'd like). With the animate effect, the text deselects when the an...

how to make " tr" of a table visible using javascript for a checkbox event

hi, i have a check box when user checked that check box means. i need to make this tr visiable "true" on the page . if again unchecked make tr "invisiable" using javascript or jQuery intially during the page load i have binded the values for the drop down -- here i have a dropdown control where values a...

Sending alert message if user not logged in

What would be the best way to send an alert message to the user if it requires them to login, but at the same time avoid an ajax call? I might have code like <a href="#" id="vote"> which would trigger an ajax function based on the click. I was thinking I would check on the server side if a user is logged in and replace it with: <a href="...

jQuery accordion links do not work

I have no idea what I am doing, but I found some code, that I am using to create a accordion dropdown for a help page on my blog. Everything is working perfectly, but when I click on a link in the dropdown, it closes the accordion and does not go to the external site. I have no idea what I am doing wrong. Is there a way to fix this? Her...

Jquery - (re)wiring dynamically generated elements

Often times I have elements hooked to added functionality, like: $('.myfav').autocomplete(); $('.myfav').datepicker(); $('.myfav').click(somefunction); But when more instances of this class are generated dynamically through some code, the new $('.myfav') are dead and need rewiring, so I do this: $("#somelink").click(function(){ ...

Jquery -How to do to combined image drag-drop and image zoom?

For my jquery web-application I have a gallery of thumbnails on my page and i would like to be able to: Drag drop any image into a target div When single click on any image the image would expand and show the larger version of the image on the screen. I have tried to do this my self but it fails as when I drag it it also starts to zo...

Removing Dynamic JQuery UI tabs

I am creating a web application and I want to use the Tabs widget to replicate the tab functionality you find in most web browsers. I want the user to be able: to move (sort) the tabs around, create tabs dynamically, close tabs dynamically. I am having a problem deleting tabs that have been moved around. Lets say there are three tabs ...

how to zoom in an image using jquery

I was just wondering how it's possible to zoom in a pic using jquery, something like this web site, link text when you click on the big image it'll zoom in and you can move your cursor and see the other part of the pic while zoomed in, I'd appreciate it if someone could show me a link or put me in the right direction. thanks ...

jQuery animate elements while animating element they are contained in

i got div which contain 2 other divs, while i fade in outer div on page load i'd like to animate first inner div to slide in right and second inner div to slide in left, i know how do these things separately but i don't know how to put these things yo work smiulatanously together thanks for any help ...

jQuery Autocomplete - Error when user enters text in a textarea in new line

The Autocomplete doesn't seem to work with multiple values if the user presses the return key in a textarea and enters text in a new line. In such case, though the values are shown, pressing TAB or return key doesn't enter them in the textarea. The options set are as follows: $("#search").autocomplete(colls, { multiple: true, a...