jquery

does $.getJSON can receiver default url value?

I use rails with jQuery. a scenario like that def method_1 respond_to |format| format.html {} format.json {return the calculate value} end the method recieve a couple of different params, and calculate different value. so when user browser method_1/1 and jQuery code in method_1 view can receive the format.json value, when user brow...

jQuery: fancybox if close

FancyBox jquery question If you close it by pressing X I would like to get an alert("you forgot something.."). How can i do this? $("a#uploadImage").fancybox({ 'titleShow' : false, 'width': 560, 'height': 620, 'autoDimensions': false, 'overlayOpacity': 0...

drop a draggable using jquery

Is there any way of dropping a draggable into the droppable by hardcoding and not by actually going into the browser and doing drag-drop?? Thanks in advance.:D ...

how to call javascript/jQuery when javascript is disabled in mozilla/ie ?

how to call javascript/jQuery when javascript is disabled in mozilla/ie ? ...

Gmaps v3 Change style of MapTypeControlStyle DROPDOWN_MENU

Hi, Can someone help me to change the style of MapTypeControl DROPDOWN_MENU without needing to build a complete new one. I searching to preserve localisations using the Default dropdown in place to build my own not localised when load. Thanks. ...

Disabling Hyperlinks

Some hyperlinks on my page have reasone to be enabled only when an element is selected inside a grid control. I have the chance to injects some code when a row is selected on the page and I would like to enable/disable these hyperlinks using jquery code. Any advice? ...

jQuery $get() - compare loaded data with each()

I have two lists .album and .favorites First I was using this each() loop to compare the .album items against the .favorites When there is a favorite copy in the .album list I append a favorite icon. $(".album li").each(function(index) { var itemSrc = $(this).find("img").attr("src"); if ( $(".favorites li img[src*='" + itemSrc ...

Calling WCF service with jquery and parameters synchronously

Hi, I am calling a .NET WCF service from Ajax like this: result = $.ajax({ type: "POST", // async: false, contentType: "application/json; charset=utf-8", url: BaseUrl + "Services/YucataService.svc/SetGameStatusSecure", data: "{'gameID':'" + gameID + "','pid':'" + pid + "','status':'" + newStatus + "','origStatus':'...

jQuery: Storing content of select-box to variable?

I have a select field at my HTML page that is populated with a few default items. With the help of AJAX, I replace the content (options) in the select field with appropriate options. How can I store the contents (options) of my select field into a variable and then load it into the select again? It would be helpful to be able to get bac...

jquery refresh the iframe but it is not permanent

hi $('#idOfMyButton').click(function() { $('#idOfMyIframe').attr('src', 'the new url'); }); this code works and it load new url but again it refresh and back to initial status which I set in design mode it happens in a second. ...

jQuery best way to get JSON with ajax

I am developing an eshop and the client wants ajax. I think that this is a bad idea because its going be slow. However while viewing the products there are some filters on the left. When a user selects a filter some other should be disabled. For example there may be jackets for both males and female, but the red colour is only availabl...

display visuallightbox jquery from iframe into parent

Hi all, On my website, I use the visuallightbox script. For info, see visuallightbox.com. My website contains an inframe, with the photo gallery. I want to display the photo's in the parent site instead of within the iframe. Then I have more space to use. the index.html contains a table which contains an iframe <td><iframe src="fotos....

Force immediate DOM update modified with jQuery in long-running function

I have a javascript that takes about 2 seconds to execute (complex optimization algorithm). I want to set certain span to "working..." at the beginning of the function. I observe that the span doesn't change until the end of the function. How can I force DOM changes propagation? or should I approach this differently all together? I cal...

$_Files[] array only showing first file uploaded

I currently have a form with a single file upload input on it. the original form input I've tried <input type="file" name="userFile[]" /> and <input type="file" name="userFile1" /> I also have a link to generate more input fields using If have tried methods of: a) counter = 1; function addInput(){ counter ++; $('#divName').app...

jquery datepicker CSS for next and prev problem

Hi, Jquery datepicker "prev" and "next" image not render properly. I suspecting issue with datepicker CSS but fails to resolve the problem. In normal view : Can someone point me to the correct path?? Thank you. -mike ...

Conflict with jQuery + Prototype + Opera / IE

Greetings, I'm using IPBoard CMS that comes with prototype and I use the latest jQuery. I've implemented a jQuery gallery picture viewer: - It works fine on Chrome and Firefox. - I have troubles with Opera and IE 8. I've created a minimal example here: http://www.warriorlabs.net/index.php?app=ccs&amp;module=pages&amp;section=pages&amp...

Getting keys from JSON

I've read through a couple of dozen of these questions, but I can't find this solution. I want to output the key of a JSON key:value pair. Assuming the JSON is like this: {"group":[ {"ed":"BDeveloper","st":"New","type":"B"}, {"ed":"BDeveloper","st":"Cancelled","type":"B"} ]} I want to scrape the "ed", the "st", etc. out of the pair u...

Beating jQuery addiction: Which jQuery methods are easily translated into pure javascript?

Being spoiled by jQuery I now include it into every project even if all I need from it is to call $("#div).hide() or $("#link").click() once. I know that jQuery often takes care of cross-browser issues for you, but sometimes it is just a convenient wrapper for a native javascript methods. So my question is which jQuery methods can be e...

How to change contents of a div based on timer

Hi , Is there any way in jquery to change the contents of a div based on timer. Assume i have module to give "tips". The contents of the tips should change every 5 seconds. Thanks ...

Is there an unobtrusive way to do make the condition of link_to_unless depend on the value of another form item?

I have this, and it works but it's pretty obtrusive. I am essentially mimicking tabs where each one holds one step in a 5 step process. If the previous step has been completed then I want the tab text to be a link, otherwise just text without a link. So the first step might be to select a service, which sets the service_id. If the se...