Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [jquery]

jQuery is a JavaScript library. jQuery is a popular cross-browser JavaScript library that facilitates Document Object Model (DOM) traversal, event handling, animations, and AJAX interactions by minimizing the discrepancies across browsers. A question tagged jQuery should be related to jQuery, so jQuery should be used by the code in question, and at least jQuery usage-related elements must be in the question. Consider also adding the JavaScript tag.

3 votes
1 answer
14k views

Background image at 100% of window (and resizes with it)

Duplicate of: Stretch and Scale CSS Background How do I stretch a background image to cover the entire HTML element? background image doesn’t stretch full page width I've got a webpage background ...
Gerrit's user avatar
  • 1,599
0 votes
1 answer
284 views

Problems toggling link text with JQ

I try to use this code for toggling text on the link: var showText="<span>Open</span> &darr;"; var hideText="<span>Close</span> &uarr;"; $('h1').before('<a href="...
certainlyakey's user avatar
1 vote
2 answers
1k views

Update Two DIV's on AJAX success - Combine JavaScriptResult & PartialViewResult?

At the moment I have a jQuery do a POST to a Controller which returns a ContentResult. When the OnSuccess event fires from jQuery it updates a div with the returned data. I now want to update ...
Jon's user avatar
  • 39.7k
2 votes
2 answers
2k views

Asp.net jquery post to ascx: This type of page is not served

When I'm trying to call an ascx with Jquery post I get: "This type of page is not served" I think it's something to do with the IIS not allowing calls directly to ascx. Is it possible to allow posting ...
SirMoreno's user avatar
  • 1,107
4 votes
3 answers
4k views

dynamically loaded js function does not appear in Firebug js debugger

There is a page1.html (I open it in browser): <div id="content"> </div> <script type="text/JavaScript"> jQuery.ajax({ type : "GET", url : 'page2.html', ...
braz's user avatar
  • 159
0 votes
3 answers
2k views

jQuery advanced selector

Can I use comparison statements within a jQuery selector method? eg. I have a list of divs generated by php that all use the same CSS class but have value attributes of 1, 2, 3 etc. I also have a text ...
musoNic80's user avatar
  • 3,698
11 votes
3 answers
42k views

How to get the keypress value from an event object in jQuery

I want to disable users from entering a character into a HTML text input field that isnt a letter or number. This exact functionality can be seen on the Twitter signup page (username field) https://...
Jon's user avatar
  • 299
1 vote
2 answers
3k views

How to change title of some text input depending on a radio with jquery?

As you can see on http://jsbin.com/erivi/ I'm using Jquery to change some image (and image attribute) depending on radio button selected, I'm also removing form text when clicking inside it. And now ...
Mark's user avatar
  • 165
0 votes
1 answer
971 views

jQuery and Rails

I'm writing a Rails app and need to plug in this little bit of jQuery code, but I don't really know how to get it to work. Here's my controller code: class ChatroomController < ...
alamodey's user avatar
  • 14.7k
1 vote
2 answers
5k views

How to retrieve the value of a text area in javascript

I have a form with a text area input. I'm using JQuery to submit the form via an AJAX request in order to update a database. My problem is that I'm having difficulty retrieving the data from the text ...
musoNic80's user avatar
  • 3,698
6 votes
7 answers
64k views

How can I use fancybox using onclick?

I am trying to make use of JQuery and Fancybox. This is how it should be used: http://fancy.klade.lv/howto However, I can not generate many ids for "a href" and I do not want to make many instances ...
Abs's user avatar
  • 57.3k
0 votes
1 answer
763 views

How to access main window element from iframe

I hope someone can help with this issue. I have a popup iframe using lytebox. I would like it that when I click a link in my iframe with the class mylink that it executes the AJAX call and update a ...
user avatar
0 votes
1 answer
2k views

outerHeight() and inner pictures

I've an issue at the first load of a page with outerHeight. The value returned by outerHeight() is a multiple of 27. jQuery $('.entries').each(function(r) { $(this).attr("value", $(this)....
bdo334's user avatar
  • 398
0 votes
3 answers
5k views

jquery toggle hide show question

what is the most efficient way to shorten this? $('.img').click(function(e) { if ($(this).attr('id') == 'myid') { $('#a').hide(); $('#b').show(); } else { $('#a').show(...
Subliminal Hash's user avatar
0 votes
1 answer
261 views

Sumbit form with Enter key and search for the cursor

I have a text box in my page which the user will type something to submit. However, I do not want to have a submit button but instead I want to listen for the Enter key press in order to submit. The ...
Subliminal Hash's user avatar

15 30 50 per page