jquery

jQuery.html() gets inner html. but i need the entire html

if i call jquery("a").html() i get what is INSIDE of the "a" tag if i want the entire html, what do i call? <a>xxxx</a> ...

filtering jqgrid based on user input

hi, everything is working fine with my jqgrid except a small issue. i have defined postData below: $(document).ready(function() { $("#ctl00_ContentPlaceHolder2_drpUSite").change(function() { site = ($("#ctl00_ContentPlaceHolder2_drpUSite").val()); loadusergrid(); }); var usrparams = new Object(); var site = ($("#ctl00_Content...

What's the cross-browser way to capture all single clicks on a button?

What's the best way to execute a function exactly once every time a button is clicked, regardless of click speed and browser? Simply binding a "click" handler works perfectly in all browsers except IE. In IE, when the user clicks too fast, only "dblclick" fires, so the "click" handler is never executed. Other browsers trigger both eve...

How to make a self contained jQuery plugin that finds the tallest image height?

I have been trying to make this to be a little jQuery plugin that I can reuse in the future without having to write the following into my actions.js file in full. This works when loaded in the same file where I set the height using my variable tallest. var tallest = null; $('.slideshow img').each(function(index) { if ($(this).height...

Jquery Tabs help with onShow function

Hey all i am trying to figiure out why my code is not triggering the "onShow" function for the tabs. Here is my code: $(document).ready(function() { $('#tabMain > ul').tabs({ fx: {height: 'toggle'},onShow: function() {alert('onShow');} }); }) I never see the alert box pop up saying "onShow" so i do not know what ...

load Javascript object from file

Hi there, I asked a question in this thread Stackoverflow, and it works perfect. So tnx to all the users who gave me a reply. But now I have a other question. I would like to have the object in a seperate file, so I only need to update the file in stead of the JS file (otherwise it will be very big). I'm using JQUERY. I now looks like...

Error occurs while validating form input using jQuery in Firebug

I have written a custom validation code in jQuery, which is working fine. I have a login form which has two fields, i.e. userid and password. I have written a custom code for client side validation for these fields. This code is working fine and gives me proper error messages as per the situation. But the problem with this code is that...

How to reference a specific object in an array of objects using jTemplates

I am using the excellent jTemplates plugin to generate content. Given a data object like this... var data = { name: 'datatable', table: [ {id: 1, name: 'Anne'}, {id: 2, name: 'Amelie'}, {id: 3, name: 'Polly'}, {id: 4, name: 'Alice'}, {id: 5, name: 'Martha'} ] }; ..I'm wondering if it is possible to directly specify an ob...

Mega Dropdown menu seen on sitepoint: How do I show the menu on mouse click

Hi, Is there a way to display the dropdown menu shown on sitepoint by mouse click. http://www.sitepoint.com/blogs/2009/03/31/make-a-mega-drop-down-menu-with-jquery/ Currently, it shows the menu only on mouse hover. ...

jQuery AutoComplete Plugin not working for JSON Response (sValue.substring is not a function)

I'm trying to use the autocomplete plugin for jQuery (this one http://docs.jquery.com/Plugins/Autocomplete). My server is returning JSON string, which I'm trying to process on the client via AutoComplete plugin's 'parse' and 'formatItem' parameters, like so: $(document).ready(function() { $('.searchBox input.textbox').autocomplete('...

jQuery plugin for html5 video instream ads?

Are there any jQuery plugins for html5 video to insert instream ads into the video? Most of the flash ones work by pausing the video at a particular timestamp, and playing an ad stream, then resuming the original video stream. The jquery captions plugin for html5 seems very similar, but different. ...

JQuery Qtip not working in IE

I am using the QTIP plugin to create a tool tip over some text. It works great in firefox but not in IE. my code for the page looks like this <script type="text/javascript"> $(document).ready( function() { $("#label_PERSONAL").qtip({ content: 'this is a test!', show: 'mouseover', hide:...

jquery textarea validation

How to check for null,white spaces and new lines while validating for a textarea using jquery. If the textarea is empty and has only new lines or spaces should raise an alert ...

how to insert a new li tag at the specified location?

Hi I wanted to insert a li tag in the middle of a list of li tags based on a css class set to the li tag using jQuery. Consider the following <ul class="myList"> <li><a href="#">test 1</a></li> <li class="active"><a href="#">test 2</a></li> <li><a href="#">test 3</a></li> <li><a href="#">test 4</a></li> <li><a h...

Jquery image blur effect with in a div?

Consider i have three images and one bannerDiv.... On initial page load i should show the first image and after sometimeout say 300ms i must show the second image and vise versa.... I have to blur the first image and show second image .... Any suggestion how it can be done with jquery... <div Id="BannerDiv"> <img src="mylocation" alt="i...

Scrollbar appear / disappear event in jQuery?

Is there a simple way in jQuery to detect when scrollbars appear and disappear on a div that has overflow:auto? (Like an event? Fingers crossed...) (I'd prefer not to have to look at the height of the content of the div) Thanks! ...

getting date from JQueryUI Datepicker

I am using JQueryUI datepicker. I am currently using following: $('#dtpicker').datepicker('getDate'); to get date from the datepicker. This function by default gets me today's date if the user has not selected any date in the picker. Is there some function which gets the date the user has selected? For example, if the user has selecte...

How do I implement a checkbox list in ASP.NET MVC?

Just moved from WebForms to MVC and replacing various userinterfaces. Not sure how the WebForms CheckListBox is implemented, is there a jQuery plugin or a basic example of this somewhere? ...

jQuery: click handler is not invoked when link is opened in new tab/window

Hi! I have noticed when user clicks on a link with, say middle button, or shift/ctrl+left button, click handler attached to hyperlink is not called. I have seen solutions to track mousedown event, but what I'd like is to track exact event of following a link. Are there any suggestions? Thanks ...

JQuery Tools Overlay for modal dialog broken under IE8

I've been developing a website that has several modal dialog boxes. I've been using jQuery Tools Overlay for the dialog boxes. However, I've just discovered that it doesn't seem to work properly on IE8. In Chrome (and I presume other browsers), the dialog is highlighted by darkening the rest of the page "below" it, but on IE8 the page "...