jquery

Posting on twitter/facebook from my site using jQuery

I want to display some text on twitter/facebook when a link is clicked on my website. Is there a way in jQuery to do that? ...

Serialising POST requests jQuery/Javascript

I am working on an application which sends an AJAX POST request (I'm using jQuery currently) every 1500ms. I have noticed that most of the times, these requests succeed within 350-450ms and are sent to the server nicely in the same order as they are generated. However sometimes, one or two requests take nearly 3-4 seconds and they are ...

How to loop through table cells with jQuery and send the data to database

What's the best method for looping through a table, grabbing all the data in the cells, but skipping the <th>? Do I put the data in an array? ...

do something when scroll up and somethin else when scroll down in jquery

Hi there :) I want to add a little down arrow on my website when users scroll down and an arrow pointing up when they scroll up. The only thing I managed to do is this $(document).ready(function(){ $(window).scroll(function () { $("#bottomArrow").show(); setTimeout(functi...

Jquery Ajax paging Next/Prev -- dynamic data

Hi, I am new to ajax and also jquery. I am building a search page and that needs to be paged since it will have many records. I found many tutorials where we can do that. But all one which I saw has page numbers on it. I mean if we have like 9 pages, 1 2 3 4 5 6 7 8 9 ... I may not need something like this but I need like first prev ...

jquery - targeting hovered element on mouseLeave

I'm currently using .hover to handle a hover tab. I'm having to get a little creative because I have a code freeze on the markup. My initial plan was to share a class between the hovered tab and the element which contains the targeted content. In other words, if the tab has class "review" the content element has class "review" as well. T...

Creating conditional statements for JQuery

Hi folks, I have a very novice question, so apologies if the answer to this is obvious. I am using JQuery to toggle the contents of items based on whether the item has been clicked. I have been able to successfully implement the toggle feature. I now need to have it load with the first two items set to show() with the rest set to hide...

Plugin for jQuery Text-editor style selection?

What I'm trying to achieve is to use jQuery to mimic the behavior of the text-selection functionality you see in a typical text-editor, except instead of selecting text, I want to select multiple rows of <div>s. However, so far the only "selection" plugins I've found for jQuery operate based on a rectangular lasso model. In particular, I...

jQuery resume setInterval timer on keystroke

I have a jQuery setInterval function named "timerIncrement" that times out (stops incrementing the variable [licount]) after x-seconds. to resume this interval I have a .mousemove function which looks like this: $(this).mousemove(function(){ licount = 0; timerIncrement(); }); what I'm looking for is a way to do this exact thing (res...

$("#but0_0").attr(...) works but $(hid).attr(...) does not work when hid === "#but0_0"

On Safari 4.0, I have a check that prints "????" if hid === "#but0_0" Works: $("#but0_0").attr("onmousedown",function(){alert("Aha!");}); Doesn't work: var id = "but"+y+"_"+x; var hid = "#"+id; if (hid === "#but0_0") console.debug("????"); $(hid).attr("onmousedown",function(){alert("Aha!");}); The console shows "????" so the code ...

How can I execute multiple, simultaneous jquery effects?

I am animating some error/validation elements on a page. I want them to bounce and be highlighted, but at the same time if possible. Here's what I'm currently doing: var els = $(".errorMsg"); els.effect("bounce", {times: 5}, 100); els.effect("highlight", {color: "#ffb0aa"}, 300); This causes the elements to first bounce, and THEN be...

Where can I find advanced jQuery/JavaScript resources/tutorials?

I'm reading some tutorials now about jQuery.. function creating,plugin creation etc. but these tutorials are missing some basic explanations like they mention things like function prototype, anonymous functions, umm putting (jQuery) after the }); .. and stuff like that .. is there a tutorial/website/book that explain these I'm not sure...

jquery slider detect end of scroll?

How will I know if jquery slider is at the end of the scroll? I'll call an ajax function to load a page when I reach it. ...

RedirectResult not working with jQuery.post()

Hi Guys I'm trying to do an asynchronous login. When the user is authenticated I want to redirect to the user's originally requested page. The problem is that the Action Method is returning a Redirect type of ActionResult and the jQuery doesn't seem to know what to do.. I'm using the following jQuery: $("form").submit(function(event) ...

resizing text of whole document using jquery

i want to resize the font of all elements of a page like user can click increaseFont or decreaseFont this will decrease the fonts of all elems iam doing doing as writen below please suggest some better way $.fn.ChangeFont=function(ratio) { return this.each(function(){ var _elm=$(this); var currFontSize = _elm.css('fontSize'); var final...

initiating a function after window resizsing finishes

i want to initiate a function when user finishes resizing of his browser window. please suggest how to do in either pure JS or jquery. Note: i want to raise the event only once and after user has done browser resizing. ...

Linked List Dependent Select Boxes

So I haven't been doing this for long but I'm completely stuck on this. I have a model which looks like this (simplified for brevity): class ReqBreakdown < ActiveRecord::Base belongs_to :next_level #nil if lowest level belongs_to :previous_level #nil if highest level belongs_to :requirement_level end I need a way to build these...

Using Ajax and jQuery to login a user through a PHP-script, is it secure?

Hi there, quick question, is it secure to use the jQuery.post function in jQuery to pass a users login information to a PHP script? Im thinking about using a piece of code like this: $("#login_form").submit(function() { var unameval = $("#username").val(); var pwordval = $("#password").val(); $.post("backend.php", { username: una...

Prepending unclosed tags in jquery

Due to some limitations on the place files are being placed I would like to prepend and append page structure just after the opening body tag and just before the closing body tag. <script type="text/javascript"> $(document).ready(function() { $('body').prepend('<div id="header"><div id="title"></div></div><div id="wrapper"><div id="cont...

jQuery 1.3.2 and IE 8 problem with hide() and show()

Can someone tell me please why the following example work in Firefox but not in IE 8? Only content_1 work correct in IE 8. Thx vijey. <script type="text/javascript"> $(function(){ $("#sortable").sortable({handle: '#dragable'}); }); $(function(){ var v; $('div[id^="content_"]').hover( function () { v = $(...