jquery

Displaying preview panel automatically in markitup! editor

I'm using the markitup! as a markdown editor (example). Currently, I need to press the preview button (green tick) to display the preview panel. I would like the preview to be displayed automatically - how can I achieve this? ...

ASP.NET MVC Uploading with Extra Data and Jquery

I am following an example from another question for uploading with jQuery. http://aspzone.com/tech/jquery-file-upload-in-asp-net-mvc-without-using-flash/ I would like to extend this a bit to add more data to the upload though, through other form elements. Any idea how this could be done? ...

How to get radio button selection with JQuery?

I have MVC html control for radiobutton like: <%= Html.RadioButton("Choice", false, new { onclick = "Accept()" })%><label for="Choice">Yes</label> <%= Html.RadioButton("Choice", false, new { onclick = "Deny()" })%><label for="Choice">No</label> How to get radio button selection with JQuery? ...

Swapping div contents with jQuery

Here's my HTML: <div class="large"> <img src="/images/photos/Interior.jpg" alt="The interior" style="[...]" /> <div class="caption">The interior</div> </div> <div class="small"> <img src="/images/photos/Bedroom.jpg" alt="Bedroom" style="[A different ...]" /> <div class="caption">A bedroom</div> </div> Upon clicking a d...

JQuery + Page Methods: Method is Never Called

I am just starting to mess around with Page Methods and jQuery together with not much success. Below is my sample code... Default.aspx.cs [WebMethod] public static string test() { return "testing 123"; } test.js $(document).ready(function() { $("#Result").click(function() { $.ajax({ type: "POST", ...

Get textbox value on keydown + Multilingual support

Hi, I want get the value of the text including the character on the keydown event. $(".searchfield").keydown(function(e) { if (e.which >= 32 || e.which < 127) { var c = String.fromCharCode(e.which); callSearch($(this).val() + c)); } }); It works good for characters, numbers and all the essential characters. 32-127 AS...

JQuery Tools Tooltip With UpdatePanel

My problem is related to using the JQuery Tools Tooltip Plugin (http://flowplayer.org/tools/tooltip.html) on items with tooltips that are refreshed in asp.net UpdatePanel controls. The problem is that after the tooltips have been added, any partial postback from an UpdatePanel will cause the tooltips to stop working in any of the UpdateP...

jQuery image rotator plugin

Hello, I am looking for a suggestion on which jquery plugin will achieve what I want. Basically I want to have 5 images on the page which change (fade in/out) automatically and when clicked on the image it goes to a page relative to the image. For example: http://www.lorigrahamdesign.com/index.php? In the page above there are imag...

JQuery line is breaking my page

So I'm working on a little bit of jQuery for a site I'm working on and for some reason when I put single quotes inside double quotes Firefox, in it's eternal glory, changes them to double quotes thus breaking my code. I even tried putting it in an external javascript file even though I'm just prototyping at this point. No good. Wouldn't...

Help with a jquery country/state list

Is there a better way to do this jquery code? Currently I have to use PHP to insert the starting position of the jquery code. The code is for a country/state list. If a user picks USA then a state dropdown list is below it, if any other country is selected, then it will show a different text input box and hide the dropdown list. ...

page elements loaded before script

Hi, I was wondering if I could do the following: load a html page and set the backgroung color of the body element dynamically with javascript, in this case with a jquery script. If the page elements are loaded before the js executes, then the body color will be white for a second, and then it changes the color. If the js would be load...

Jquery .post () giving error message "missing : after property id"

I have written a form using the jQuery .post() function to post the data to a php file. The error I keep getting is "missing : after property id". Any help would be appreciated. Here is the form code: <form id="ev-form" name="ev-form" action="/new_event_submit.php" method="post"> <fieldset> <ol> ...

jqGrid: Why aren't the events that I defined for a grid edit firing?

I'm doing in-line edits on a grid, but can't seem to get any events to fire that would be tied to that edit. Here I have afterSubmit: and I want it to fire after the user has edited the Quantity field in the grid, but it never fires. $('#tblLines').jqGrid({ url: createUrl('/CRA/GetLines/'), editurl: '/CRA/EditModifyLine...

Disable button on submit with xVal MVC

Hi: I have an MVC app using xVal. I am trying to hook into the jquery validation to show a "loading" graphic once the form is valid. I cannot seem to find a way to only show the qraphic when jquery has validated the form. However, it also disables the button when the button is clicked and is NOT validated stopping the user from re-subm...

How to use Jquery contains?

Hi I am looking at the jquery site at the contains selector. $("div:contains('John')").css("text-decoration", "underline"); How can I make this so it takes a non hard-coded value in? I tried to do something like this $("div:contains(" + name + ")") but that does not seem to work and is very messy. I am probably just missing some b...

jquery not working correctly, no errors reported

I am working on a jquery code that has a form country dropdown list USA state dropdown list non-usa state text input box The goal is to have a country dropdown, If a user selects USA then it will show the USA state list and hide the other state text input. If a user selects a country other then the USA then it should HIDE the U...

Whats the difference between jquery-1.3.2-vsdoc.js & jquery-1.3.2.min-vsdoc.js

Hi What is the difference between those 2 files? Like I know they are for intellisense for Visual Studios so why would need 2 versions of it? Like is the difference between jquery and jquery minified just they remove the comments out and spacing? So why would you need a special one for intellisense? ...

how do you implement jquery oop in real site

here is my implementation , wonder if there any improvement , or share your ideas. //* global variable *// //I put all the variable into $('body'); $base_url = $('body').data('base_url'); $logged_in = $('body').data('logged_in'); //... //* Object. like namespace *// lzyy = {}; //* constructor *// //correspond with mvc's c(controller) ...

how to access topmost parent window

Hello, i have a a parent window and inside it i have one more sub parent window and then i have a child window.Nw my problem is that i want to access my topmost parent window from bottommost childwindow.i was using window.opener but i m not able to access my parent window from botom most child window..plz help.how to use it using jquery ...

How to make an Ajax loader follow mouse?

I want to have something on my site that follows the mouse around, sort of like how Windows 7 does it. Like in Windows 7 when something is loading up a little circle comes and follows the mouse. I am using the jQuery library so I know I can use Ajax Start and Stop to make it appear but am not sure how to make it follow the mouse around...