jquery

Google maps (V3) - Map container selector (using jquery)

I'm trying to solve a tricky problem in Google Maps (api V3) Works nicely: var map = new google.maps.Map(document.getElementById("map_container"), myOptions); Doesn't Work if I try to use a jQuery selector var map = new google.maps.Map($('#map_container'), myOptions); I made this EXAMPLE Thank you in advance Cheers Pedro ...

How can I use jQuery to create a div absolutely positioned next to another element?

I have a search box on a page that's hooked up to an AJAX script that returns HTML based on the contents of the search box, via GET. In order to display the results directly below the search box, I need to create a div in a position relative to that box (the box's position is variable depending on screen resolutions). How can I use jQue...

Jquery Check for selected option ignoring one option

I have an page with a selection box, the first option of which is please choose, I need to ensure the user has made a selection ignoring the first option. ...

jquery ajax reloading html of entire page

I'm trying to load a simple success or failure message from the server upon submission. I am reaching success on the Ajax call. However $('#some_div').html(data) is having the whole originating page being returned to it. Is there something I'm missing? $(document).ready(function() { $('a.favorite').click(function() { ...

jquery formatting only occurs when document ready, so when web page first loads the user is presented with an ugly page

This is only very briefly, while the loading of elements and jsp includes occurs. However it is rather annoying. Any tips to remove this ? To be more specific what is the css equivalent of hide() and show(). ...

How to get height of <div> in px dimension

Hi, I have used jquery library to find out height of div. Below is my div element with attributes : <DIV id="myDiv" style="height:auto; width:78;overflow:hidden"> Simple Test</DIV> Below is my jquery code to get height of <div> var result = $("#myDiv").css('height'); alert(result); After executing above statement I am getting res...

Stopping rotate when a tab is clicked when using jQuery UI Tabs

I am using the following : $("#roottexts").tabs().tabs("rotate",5000, true); to let the tabs display their contents in turn. However , I would like the rotation to stop as soon as the user clicks one tab (or hovers over a tab). Does anyone has code to do this ? Thx in advance, ...

jquery draggble does not worked

i am doing the jquery draggable it work fine in the initial case but it does not work when a new same div is created with jswhat is the actual problem with my code please help me http://galtech.org/testing/drag_new.php Drag me old worked fine But new draggable div is created with New element (red anchor in bottom ) it does not have drag...

Setting focus to a button next to a text box

I have a question that is very similar to this one: http://stackoverflow.com/questions/286690/setting-focus-to-a-button-from-from-text-box On my page, there is a text box, with a button next to it. It is an ASP.NET page, but the button is just a standard input tag, and when clicked, there is a client side function called. I want it so ...

javascript testing if value is in array

Is there a function in javascript to do this - test if a given value (a string in my case) exists in an array (of strings)? I know I could just loop over each value, but I'm wondering if js has a shorthand for this. ...

my jquery button doesn't work when I click the first time

Hi I'm trying to use javascript and jquery to do some plotting, here is the code that I define the button, but the first time I click it doesn't work, the second time it works well, I don't understand why. $('<p><input type="button" value="Plot Data" /></p>').click(getData).appendTo('#plot'); Could someone help to explain it? Thanks!...

function as parameter to $ in jQuery...

...what does it mean? I have almost no experience with jQuery, and need to work with some existing code. All the tutorials talk about is using $() with pseudo-CSS selectors, but what would be the meaning of something like this: $(function makeFooWriteTooltip() { if($("div[name='txttooltip']").length>0){ $("div[name='txttool...

jQuery Selector Question

I have a quick question about jQuery selectors. Is doing this: $('.class_el_1, .class_el_2').hide(); The same as just looping through each element using jQuery's .each function? ...

jQuery - Lose labels text on Postback

Hi I'm filling some labels using jQuery AJAX and it's working properly (i'm getting the values through webservices). But after that, i'm firing and Button click to get that values but in debugging the labels are empty. I think it's because the values are losing in PostBack. Is there anyway to keep those labels values on Postback? ...

Use field name variable in JQuery validation rules

I am a jquery newbie. I could get the validation rules working in my form. I am using a Java framework and for some reason, when it converts from .xhtml to .html, all the ui component's id/name were prefixed with the form that containing it. I would like to reuse these validation rules for two other forms but because of the prefix issue,...

Minify & Gzip vs Google CDN

Should I minify/gzip my Jquery with my other scripts on my page, or use Google CDN for Jquery & JQuery UI and gzip my own stuff. From what I can see its more likely to be faster to deliver from Google and there is a better chance the files will be cached already on the users machine, however its a couple of extra http request and atleas...

Click event fired twice

I don't know if this is to do with Raphael, ColorBox or jQuery. Here's my the relevant code: var image = paper.image(p.url_, tx, ty, img.width, img.height); image[0].style.cursor = "pointer"; image.node.onclick = function() { $.colorbox({ title: "Some Random Title", href: function() { $.post("test.php", {...

calling asmx web service from jQuery

Hi All, I am not able to call web service(asmx) from jQuery function. It is saying "access denied" error while calling web service. It is working in the dev and local machine but I am getting the same error. Here is my ajax call $.ajax({ type: "POST", url: "http://server.com/calculator.asmx/calculus", ...

Fancybox with Facebook markup - Doesn't load

Why I try to load a fancybox, the content isn't loaded. The problem only occur when I use facebook markup. I also try with colorbox and got the same result. Is there anything I missing ? I got the following : <script type="text/javascript"> $(document).ready(function () { $("#shareWithFriends").fancybox({ 'titl...

jQuery hide/show

Hey guys, I have created a slide-show using jquery cycle, this contains play and pause controls, tabbed navigation and fade transition between slides, now I've been asked to hide the play and pause controls once the slide-show hits slide number 6 but to have this controls back on when the slide-show starts all over again, I need help cre...