jquery

Is it possible to stop redirection to another link page?

I have already searched a lot, but it seems this can't work. At the program, there is a jquery ready function to make the click event redirect. if($.isFunction(link.attr('onclick'))){link.click();return false;} else{document.location.href=link.attr('href');} so in the hyperlink, there are 2 events can make this page redirect to new p...

Getting a specific line using jQuery

Hello, Is there a way to get, let say, the 5th line ( the offset of its first letter ) of a block's content using jQuery ? I mean the visual line, the browser computed line, and not the line in the source code . ...

DOM Navigation problem,

Hi guys, please help me select c.. Here's the HTML code: <div id="a"> <div id="b"></div> <div id="app7019261521_the_coin_9996544" style="left: 176px; top: 448px;"> <a href="d.com" onclick="(new Image()).src = &#039;/ajax/ct.php?d_id=;action_type=d;post_form_id=6b; return true;"></a> </div> </div> And here's my Javascr...

How can you use jQuery measure how far down the user has scrolled?

I need to change the style of an element after the user has scrolled down beyond a certain number of pixels, and then change it back once the user has scrolled back up. I'm using jQuery already so I'd like to use jQuery if possible. Can anyone provide an example where you add a a classname to a div once the user has scrolled beyond 200 p...

JQuery .click() event troubles

Here's a snippet of my code: $(".item").click(function () { alert("clicked!"); }); And I have (hypothetically; in actually it's far more complicated) the following on my page: <a href="#" class="item"><img src="1.jpg" /></a> However, when I click the image, I do not get an alert. What is my mistake? ...

jcarousel slideshow problems

This question has been discontinued. ...

Is there a native Javascript implementation of jQuery's document.ready()?

$(document).onload() it's internally implemented by window.onload event then what about $(document).ready() what's the native javascript to implement it? ...

jquery subgrid with json

I am working with jqgrid. i have need to implement subgrid of grid. my code is as follows: <div class="ww90p"> <!-- class="sheet"--> <div class="" > <table id="setcols" class="scroll"> </table> <div id="psetcols" class="scroll"></div> </div> </div> $("#setcols").jqGrid( $.extend( {}, jqGrid_normal, { url: "/account/c...

about json file direction ???

hi all, in jquery.subgrid.js --> for json request this term $.parse(JSON.responseText) showing undefined. what return JSON.responseText???? ...

How to add a class to body tag?

I want to add a class to a body tag with jquery. For example if URL is http://www.mywebsite.com/about_us.asp , I want add the first five letters, in this case 'about', to body tag <body class="about"> . Can anyone help me please? ...

jQuery AJAX: How to append a "SAVED" message and make it disappear after a second

Hi, this is probably really simple for a jQuery expert. I have <div id="form23"><form><textarea>blahblah</textarea><input type="button" value="save" onClick="saveCaption(23)"></form></div> I want a SAVED message appear and disappear. But I DO NOT want to make the form or its elements disappear. I have a AJAX call that is like the foll...

is jquery subgrid plugin work for json?

hi all how are you? I am working with jquery subgrid its not working... note that in jqgrid 3.5 demo there is a qoute..... Note: Currently subgrid can work only with xml data. Json is in progress. so plz tell me that is it really work for the subgrid??? ...

jquery event.target is changed to show an irrelevant element inside ajax post callback?

I have two types of links that are event-bound. If the clicked-on link has the class 'flagged', the event handler calls recallFlag, else doFlag function. $(document).ready(function() { $('div.flag-link, span.flag-link').bind('click', function(e){ if ($(e.target).attr('class')=='flagged') doRecall(e); else doFlag(e); return false; }...

How to manipulate appended content? Jquery.

Hello! I'm with Jquery. I appended html to a div like that: $('div#byletter').append(createLettersHtml()); The createLettersHtml function creates a list of letters (links) all wrapped in 'div.ln-letters'. Then I want to call a 'onclick' event like that: $('.ln-letters a').click(function(){ alert(123); }); but nothing happe...

ASP.NET user control and jQuery dialog

On my page I got the following user control: <div class="editFormDialog" style="display: none; font-size: 12px;"> <mm:Form ID="editUC" ShowCreateButton="false" ShowEditButton="true" runat="server" /> </div> This UC has a public property that takes a DataSet, and updates some fields in the UC. So when I push a button on my page, i...

Is event bubbling supported by all browsers?

jQuery uses event bubbling strategy to handle events. And it claims to be cross browser, but is "event bubbling" supported by all browsers? There is another strategy: event capturing, which is reverse to event bubbling,is it extinct? Or my question could be re-stated as: Can Javascript decides on whether choosing "event capturing" s...

jQuery Traversal Question

Quick question about jQuery and DOM traversal. Look at the code below and tell me why would someone do one over the other? Is there any reason? this jQuery("div.section").click(function(){ jQuery(this).parent().parent().parent().next().find("div.section2").css("color","#fff") }) instead of this. jQuery("div.section").click(func...

jQuery - Hiding elements not working

I'm new at jQuery (just picked up a book this morning!) and I'm trying to hide an element; it doesn't seem to be working. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"&gt; <html> <head> <title>Test</title> <script type="text/javascript" src="javascript/jquery-1.3.2.min.js...

Conceptual: bookmarklet to create a header form and remove it again after submit

Hi So I've been pondering this for some time and trying out various strategies. Basically I'm trying to create a bookmarklet that, when clicked, pops up a header on whatever page you happen to be on. In this header, there is a small form, the contents of which are submitted to a server. Once this is submitted, the header should disappea...

jquery IE Fadein and Fadeout Opacity

Hi Guys, I am getting this weird problem in IE with a CSS Overlay I am applying for a lightbox. Basically, I use fadein and fadeout for jquery - the problem is that everything works fine EXCEPT in IE. In IE - I get no fadein - rather it just goes straight to opacity background. On fadeout - it removes the "opacity" for < 1 sec second ...