jquery

How to select perticular part of image and zoom that part using jquery?

Hello friends! I have two images layered on each other using z-index. I just want to zoom a particular part of those images but this zoom is such that I will select a area using mouse i.e. clicking on a part of image and dragging mouse and releasing the mouse button and that much part will get zoom. So please tell me is such thing is pos...

jquery count div that has a display:none attribute

I want to count the div that has a class name "items" and has an attribute "style=display:none". <div id="skills"> <div class="items" style="display:none">1</div> <div class="items">2</div> <div class="items">3</div> <div class="items" style="display:none">4</div> <div class="items" style="display:none">5</div></div> the output should...

jQuery: value() and text() not returning table cell's text

I must be missing something basic here. Enlighten me. I'm trying to grab the ID (289 in this example): <tr class="header"> <th>ID</th> <th>2</th> <th>3</th> </tr> <tr class="highlight"> <td class="">289</td> <td class="">field a</td> <td class="">field b</td> </tr> ... more rows I'm using this selector: $("#requests :n...

jQuery Validation plugin: checkbox groups and error message issues

I've put together a form using the jQuery Validation plugin, and all inputs are fine with working validation and error messages – except for checkboxes. I have two checkbox problems. The first is that the Validation plugin API doesn't seem to handle checkboxes in grouped contexts (I'm using fieldsets for grouping). Found several approa...

How do I pass a textbox value to jQuery .ajax method?

Here's my jquery method: $.ajax({ type: "GET", url: "Home/GetSocialMentionBlogs/" dataType: "json", success: function (data) { var obj = JSON.parse(data); $.each(obj.items, function (i, item) { $("<strong><p>" + item.title + "</strong></p>").appendTo("#blogs"); if (i == 5) return f...

jQuery show requested tab on page load

Hi! I am using the following code for tabs on a site... $(document).ready(function(){ $('.tab').click(function () { $('.tabs > li.active').removeClass('active'); $(this).parent().addClass('active'); $('div.tab_contents_container > div.tab_contents_active').removeClass('tab_contents_active'); $(this....

Passing parameters to the Javascript code on a page using django templates?

I have a simple Django app that has a variety of views of various different asset types. I have various jQuery functions that key off the asset type name and so when I generate the page using the django template I use a template variable to fill in the asset type parameter in the javascript code... $(document).ready(function() { $...

jquery, Scroll to

Hi, Can somebody help me, I want to use in jquery somethink like "ScrollTo". When I click something , --- > scroll to some div Like in HTML with anchors Thanks !!! ...

Store variable based on if statement with jQuery selectors

I'm new to both Javascript and the framework jQuery. Basically I'm trying to say that if the quantity is greater than 1 then don't charge a fee. However if it is equal to 1 charge a fee. But I don't know how to store the variables while using jQuery. My thought was... (is this correct?) var qty = $(".qty_item"); var price = $(".price_...

Look for div# in the response, if data is 1

I am using this script to insert comment to the database: var http = createObject(); var nocache = 0; function insert() { document.getElementById('insert_response').innerHTML = "To Sek .. " var fID= encodeURI(document.getElementById('fID').value); var kommentar= encodeURI(document.getElementById('kommentar').value); nocache = Math.rando...

jQuery.find() IE7 bug?

I have a few lines of code where I use this function, but it seems to only find the 1st element in IE7. Works in IE8/FF/Chrome. $(document).find("#JobID").attr('checked', $('#CheckAll').is(':checked')); I also have a similar line which only finds the first element. $(document).find("#JobID").each(function() { ... } Does anyone know...

slideToggle height is "jumping"

Hi guys! My jQuery slideToggle() experiment Can anybody tell me why my boxes "jump" when i open them? The first half they slide, the rest they "jump"?? Thanks, Johannes ...

local storage and session storage

I'm taking my first step of a thousand miles with the new local storage and session storage found in html5. http://www.w3.org/TR/offline-webapps/ Q: Is there a code example of using either session storage or local storage, where the user enters a value, the value is saved locally, the user then connects to the Internet on his 56K modem...

jQuery: finding previous div

<div class="a" style="display:none">Content 1</div> <div class="a" style="display:none">Content 2</div> some other HTML... <span id="b">foobar</span> How can I match the first div class="a" above the span id="b" to show() it? The id="b" is the only thing I konow before. ...

JavaScript: Navigate to a new URL without replacing the current page in the history (not window.location)

I know how to use window.location. The problem is that, (at least in FF) it erases the page you are on from the history. e.g., I'm on page A, I navigate to B and window.location is used to send me to C. If on page C, I click back, I end up at A, not B. Is there some other way to navigate to another page without erasing the current page ...

jquery, session, cache

Hi, I have a problem and I want to resolve it with jQuery. I have a some Links on the page, and want to get the "text" from the link what was clicked. But I need this text to use on another page. Because when I click this anchor I leave this page , and I go to another one, and I need to use this "Get link text" on the second page. I ...

jquery-ui grid Create Read Update Delete

Using the jQuery library, not any other JavaScript library, if you were to create a grid input for your users, one that allowed users to insert new data, change the description of existing data and delete data, would you do that using an html table with html tr and td tags, or is there some other method of displaying a sheet of data? ...

Execute jQuery function on expanding fieldset in Drupal

I have some very simple jQuery hide/show logic called on a change in select list value in a Drupal form. $(document).ready(function(){ $("#field_id").change(function() { my_hide_show_function(); }); }); I'd like to call this same function when the form is set up, to respond to the default (or previously submitted) value, but ...

Calling URL parameters within a .js file.

Hello! I am calling a .js file within a HTML file. On the URL to the .js file I want to include a parameter that will be accessable to the code INSIDE the .js file. For example: I want to be able to pass the ID value to a function within the jquery_widget.js file, with the help of jQuery. How is this done? Thankful for all help! ...

How to use jQuery to extract a URL parameter from a string

i hat one task, and know i have to continue but have a bad experience with regexp ... :( can somebody help me : i need to take a sting from "domain url" with jquery : This is the address name : http://mydomain/Our-Company/default.aspx?txt=James D. Perrlo I want to take with jquery la string after "?txt=" in this case "James D. Pe...