jquery

can any one explain me what is JSONP in layman terms

I known JSONP is (JSON padding) . I Know what is JSON and using it in $.getjson in jquery is also known But using jsoncallback cannot be understood and what is JSONP ...

jQuery Live Get Div Text

I have some radio buttons that are created dynamically with javascript. I need to figure out how to reference the text in a div (also created dynamically) Here is sample html: <div> <div class="div_ceck"><input id="shipping_service_1" name="sid" value="1" type="radio"></div> <div class="free"><label for="shipping_service_1" id="shipp...

jquery live event for added dom elements

I want to add a class to any DOM element that is on the page now or in the future that has a specified class and meets some criteria so for some pseudo code $('.location').live('load',function(){ if($(this).find('input:first').val().substr(0,1) == "!"){ $(this).addClass('hidden')} }); of course this does nothing EDIT NOTE this ...

jQuery DatePicker how to disable auto day selection while browsing calendar?

In jQuery DatePicker there is one annoying thing, if you using it as a calendar and depend on selected date. While navigationg from month to month it keep selected day activated for all months. I know that this issue exist for more than 6 months and I have reported it to jQuery Team.However I would like to know is there any workarounds o...

remembering page state (checkboxes, show/hide panels) using cookies and jquery

I have a page that has panels that can be set to visible or hidden. There are also some checkboxes that need to be either checked or not. I want this state to be stored in a cookie, what's the best way to do this? ...

Wordpress jQuery filterable slideshow.

I have been searching for the past two weeks but haven't been unable to come across what i'm looking to do in WordPress. Explanation: In WordPress, I am looking to do something similar to this: http://stackoverflow.com/questions/1876767/how-can-i-build-a-filterable-jquery-slider-for-a-portfolio - but instead of having numbers, have thum...

Change Font Size to automatically fit Div's height/width

Hello Stack! I'm trying to make text automatically resize to fully fit inside a static 200 width 100 height div. Basically I want the maximum font-size available depending on the lenght of the content fed in the div. I'd like to use the least amount of Javascript/Jquery possible. Thanks in advance! ...

nested set and treeview control

Hi All, Given the following database tables and sample data: Locations Id ParentId LeftIndex RightIndex Description -- -------- --------- ---------- ----------- 34 2 85 104 Florida Region 73 34 94 95 Miami Products Id ParentLocationId Code Description -- ---------------- -...

Full Calendar Missing Events at the End of the week (after 7:00 PM) with gcalFeed

I have an implementation of full calendar pulling a Google Calendar feed for a Community Ice Rink. Everything seems to be working fine except the last two events of the week are missing from 7:00PM on on Saturday. I have tried deleting the events, adding a different event. Renaming events, removing other events to see if there are too ma...

Manual jQuery validation call after AJAX call not working?

I have a mixed client-side/server-side validation using jQuery validation plugin. The validation happens on both submit and for some fields on change. The form is being submitted via AJAX. There is another validation going on the application just before updating the DB. If the data changes are not stored to the database due to this vali...

a better way to swap values of text inputs?

I have an email sign up and search box that have the label inside the box, IE the email box says "sign up" inside the input. When you click in the box the value is removed allowing you to enter your email, if you enter nothing and click out, the "sign up" re appears. I am using the following code: $(function() { swapValues = []; ...

delete specific entries

I'm creating a jquery script that could create new form fields, i can create them but how can i delete the specific entries (referenced by class name class="inimene_'+count+'") <script> var count = 0; function add(){ count ++; var code = '<div class="inimene_'+count+'"><p>Eesnimi: <input type="text" id="eesnimi_'+count+'" /></br>Perenim...

Jquery hide error in Firefox

Hello, I'm working on a page with mutiple divs that hide via the following jQuery code: // Special Offers Page $(".details").click(function(){ $(this).parents("div.special-offer").children(".hiddencontent").toggle(); return false; }); Here's the page for who needs to see the entire code: http://www.daraayu...

jquery animate problem

I am creating a "simple" animated menu using .animate() to enlarge the menu item the user hovers over. This works almost right but it does some odd things if they user moves the cursor quickly. Plus the elements don't always animate simultaneously. Easiest way to show it is with the following link. http://jsfiddle.net/322c5/2/ or <he...

.NET date validation with jQuery

I need to do some basic validation on a date, things like validating that the date is greater than today, validating that the date is real (i.e. "99/99/9999"), etc. Basically, I need to emulate what .NET does with DateTime.TryParse. Is there anything like that in jQuery? Or would I be better off making an AJAX call to validate the date ...

Write Content To New Window with JQuery

Hello, I have a web page with a DIV element in it. When a user clicks "print", I want to print the contents of that div. Please note, I only want to print the contents of the DIV, not the entire page. To attempt this, I decided I would open a new window using JavaScript. I was then going to write the contents of the DIV into the new win...

Can I return data from an anonymous callback function in jQuery?

I'm sure this is simple, but I'm tripping up over a scope issue in Javascript. I'm doing the following: $.get(url, function (data){console.log(data);}); This part works fine - I see the string that I want appear in the console. But what I actually want is to take that data variable and place it in a string. Something like this (doesn'...

Apply styles with jQuery

Given this CSS: #gbox_MyGrid .s-ico span { display:none; } How would one apply this and unapply it programatically using jQuery? That is we'd dynamically set this style to none (hide) and "" (show) using jQuery. Not sure how you create a jQuery id representing #gbox_MyGrid .s-ico span For background on why you'd want to do this...

Using JavaScript, how can I reset all the select's in my form so that the first option for each is selected?

Hi, I have a form containing only select fields, a submit button and a reset button. <form id="search_form"> <select id="country"> <option value="-1">Select Country</option> <option value="22">USA</option> <option value="23">Germany</option> ... </select> <select id="regions"> <option value="-1">Select Region</option> .....

jquery tools / tabs, prev / next buttons, history

I'm using the Tabs from jQuery Tools to create a wizard. I have prev and next buttons successfully navigating between the panes, but they don't change the hash and don't contribute to the browser history (at least not in FF). Do I have to add something to my next & prev handlers? Maybe change the location.href of the buttons to #<next-pa...