Help understand, function(e) in Jquery
I want to learn about the function(e), its functions, parameters and similar. Can you point me to some tutorials I can use ...
I want to learn about the function(e), its functions, parameters and similar. Can you point me to some tutorials I can use ...
I am using JQuery to do an ajax calls to fetch data. I am doing several calls to fetch peices of this data incrementally. So I have something like: for(i=0;i<numOfDataObjects;i++) { $.ajax({ //get the data and do something with it in the success callback }); } I have some code after this loop that I want executed only after...
I am using the Validation jQuery plugin to do some validation. I have a service which returns "true" and "false" right now and everything is great. However, the error message I am using is "That name is already taken." I want the error message to be "That name is already <a href="/item?id=543"> taken</a>." where that item id is some...
I've got a Jquery function that I wrote which blacks out the screen after a certain amount of inactivity, creates a pop-up that allows the user to click a button to stay logged in, and logs them out (closing the application window) if they do not respond in time. We don't technically use master pages, but we do have a parent page in whi...
I'm trying to use the swfUpload jquery/flash plugin for uploads, and I'm following the approach by Steven Sanderson (http://blog.stevensanderson.com/2008/11/24/jquery-ajax-uploader-plugin-with-progress-bar/ ). But I can't get it to work. It works fine in the sample application I downloaded from his site. Just to try to get it to work I h...
Is there a way I can format for example: 0000000000 into (000)000-0000? I'm returning a listbox which holds a collection of phone number which arent formated yet. What I would like is format it. This is what I have in the View: <%= Html.ListBox("phoneList")%> and from the controller: ViewData["phoneList"] = new SelectList(phoneList)...
So here's the summary CSS: input[type="text"]:focus{background:blue;} .error{background:red;} Javascript: if(error){ $('#elementid').focus().addClass('error'); Problem: The field goes red then goes blue immediately and stays blue when it is in focus. How do I make the 'error' class take precedence, when the javascript executes...
Hi. I currently am trying to add tags around certain words in a webpage. This webpage can have many different id's, classes, and names, so it's important that if I'm trying to put a span around "foo" I do the following: <p class='foo'>blah blah blah foo blah blah blah </p> changes into <p class='foo'>blah blah blah <span class='ba...
Hi I've been busy trying to take my knowledge of JQuery to the next level, So far I think I've understood everything but as I've ventured onto more advanced tutorials I've noticed several instances where the JQuery routine is wrapped in a closure (see below) however, the thing that confuses me is that it passes a $ and returns JQuery. My...
Currently I'm using a marquee html tag to scroll data within a div tag eg <marquee align="Top" direction="up" loop="-10" scrollamount="2" scrolldelay="100" style="height: 100px; padding-right: 5px;" onmouseover="this.stop()" onmouseout="this.start()" width="100%">DATA COMES HERE</marquee> What I want is the same effect only I want to d...
$(function() { $("#slider").slider({ value:0, min:0, max: 10, step: 1, slide: function(event, ui) { $("#amount").val(ui.value); $("#price").val('$'+ ui.value * $("#rate").attr("value") * 12); } }); $("#amount").val($("#slider").slider("value")...
Hello. Please see the the following http://valogiannis.com/recent/ .I have a webpage and when user click XHTML code a div with id result loads the contents of a webpage (in this case codes/advocasys.html). In fact what I wish to do is to highlight the html code. I have link the necessary css/js. I use the SyntaxHighlighter 3.0.83. This ...
hello can anyone tell me why datepicker submits the current date when a input field is empty? i need to have this field empty so if a user does not wish to enter a date, then no data is sent. is there a way to do that? many thanks ...
Hi all. I need to incorporate file uploads into my website, and after a few hours of thinking I came up with a pretty good way I think. The page with the upload form will be served by a front end web server. To make sure it uploads the file to my remote storage server I'll do this in the markup: <form action="http://storage.mysite.com/...
I've a script block in HTML which basically has some JSON content. I would like to replace contents inside it using jQuery. I did something like this: $("#data").html(newjson); Above statement only works with Firefox. It does not work with IE? How do I make this work in IE. ...
I am using this probably ugly javascript to show a text box (in a li tag plus its label) if a checkbox is checked. $("#li-2-21").css("display","none"); $("#Languages-spoken-and-understood-8").click(function(){ if ($("#Languages-spoken-and-understood-8").is(":checked")) { $("#li-2-21").show("fast"); } else ...
Hello guys, I've created a very basic slider with jQuery. There are two arrows called .theleft and .theright, which are moving some div contents when clicked, so an horizontal gallery full of images moves from side to side at a 950px range. This is the code: $(".theright").click(function() { $(".mymove").animate({ ...
I open an ajax modal window with jQuery. How can I update the DOM and make the new elements available for jQuery to use? ...
'Hi I am calling a web service from javascript/jquery as follows: function Test(userid) { alert(userid); $.ajax({ type: "POST", url: "testWebService.asmx/GetData", data: "{ userid:'" + userid + "'}", contentType: "application/json; charset=utf-8", dataType: "json", success: functi...
<script type="text/javascript"> $(document).ready(function() { //select all the a tag with name equal to modal $('a[rel=popup]').click(function(e) { //Cancel the link behavior e.preventDefault(); //Get the A tag var id = $(this...