Hi all,
I was trying to grab the ID of the SPAN tag when a user clicked it.
Since the ID of each tag contains two digits, they would be used for referring
to the value of their corresponding hidden text box field,
but I am stuck over this question.
Here is part of the code that I have written.
I need your help to finish it because I do...
I want to do the following...
$('.showcomments').click(function()
{
$(this).parent().hide();
jQuery.getJSON('comments.json',function($data)
{
$(this).parent().append($data['value'])
//this is meant to be the instance of
//$('.showcomments') that has be...
Is there a significant difference in performance between the two for relatively small post-backs? I'm taking in user input on a website, calculating some values from it and the returning it. Adding AJAX with update panel was really really quick obviously, but I'm wondering if I should just use jQuery instead.
Also, how to the two metho...
I'm trying to make a javascript bookmarklet that will act as a highlighter, changing the background of selected text on a webpage to yellow when the bookmarklet is pressed.
I'm using the following code to get the selected text, and it works fine, returning the correct string
function getSelText() {
var SelText = '';
if (window.getSelec...
Why does this code (taken from the demo sample at jquery ui), doesn't work for me? It says .button() is not a function.
Update: Tried loading from google no luck. Here is teh error
$(".demo button:first").button is not a function
Line 27
http://pastie.org/1039784
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>...
What better to use in ASP.NET MVC 2:
- Ajax-forms created with the AjaxHelper class
or
- jQuery ajax?
I think it's a little more straightforward to use the AjaxHelper, but I don't know if it's a good practice to have many forms on the page (AjaxHelper creates a form, whereas the jquery doesn't).
...
Hello,
I'm using fullcalendar.
And i want to change my calendar, so the default month is June (the initial month for loading), I believe this is what I need:
http://arshaw.com/fullcalendar/docs/current_date/month/
The problem is, I'm not very good at .js... and the explanation isn't very clear.
This is what i tried:
<script type='te...
I have the following bog standard jQuery ajax request. I've been trying to induce an error state by disconnecting my computer from the network mid-request (the server takes 10 seconds to reply so this is simple).
When I disconnect alert('Success: '+ json); is called, with null for the response json. I would expect the error part to be ...
I want to send table values to printer.That table contails more than 50 records.so there is scrollbar or pagination on that table.Below the printer there print button, if click the button those all values should go to printer.
function print(){
window.print();
window.opener.document.location = window.opener.document.location.href;
wind...
I have $(this) pointing at my input box but cannot seem to reference the surrounding span to add a red border.
<span id="hdr-su_name" class="eforminput">
<input type="text" size="30" id="su_name" name="su_name">
</span>
I have tried this but does not work:
$(this).parent().css({'border-color':'1px solid #ff0000'});
Any help mu...
Hi guys.
I am trying to animate a div when the user click the button. Each button will move a div to a different amount of pixels. My code works in firefox and chrome but not IE8 (I only test it in IE8 so far). I appreciate it if someone could help me about it.
my jquery
$(document).ready(function(){
function breakline(position) {...
I was wondering if there are any packages available out there to make CSS3 capabilities available to browsers that do not support it yet.
The way I envision this, and I've been unable to find anything via search, is the JS would detect the browser and load its own library that essentially do the CSS3 functions using JavaScript.
I kno...
Hi,
Am using jQuery quickSearch plugin to filter a list:
http://lomalogue.com/jquery/quicksearch/
However i want to filter on click of a submit button rather than the default bindings that are supplied with the plugin itself.
I have tried the following to no avail:
$(function(){
var $qs = $('input#id_search').quicksearch('ta...
This is a jQuery example. But i didn't get the part below:
var replacement = $("<li>").text($(this).text()).get(0);
The original code:
var mappedItems = $("li").map(function (index) {
var replacement = $("<li>").text($(this).text()).get(0);
if (index == 0) {
// make the first item all caps
$(replacement).text($(replaceme...
Hi,
I need some help shortening this code and am just a little off. Here is original code:
$("#MKDPT").change(function() {
if ($("#MKDPT").is(":checked") && $("#AMX1N").is(":not(:checked)") ||
("#ERXXN").is(":not(:checked)")) {
alert(this.id);
}
});
I will be adding a lot more id's. Can I just create an array of t...
I have an Index.aspx page with a button. If you click the button a create overlay pops up. In this overlay lies the form. So the create overlay form page and the Index.aspx are seperated. The whole form is rendered into the Index.aspx using jQuery Overlay plugin from http://flowplayer.org/tools/overlay/index.html (in $(document).ready(fu...
Let's say I have a
format string "XXX - XXX - XXXX" (to format a phone number), or any other format string in which X stands for a number
I want to preserve the formatting in the format string (spacing, dashes etc.), but exchange each X for a number and drop all formatting in the source string
Examples:
Input: "abc+d(123)4567890",...
Hi,
The situation
I open a layer (jQueryUI) like this.
$("#dialog").load('userinfo.html #layer').dialog('open');
userinfo.html displays the photo and the name of a facebook user.
<html xmlns:fb="http://www.facebook.com/2008/fbml">
<...some code...>
<div id="layer">
<script type="text/javascript">
$(functi...
I'm using this script to animate some images inside anchors:
$('#locations a').each(function() {
// set opacity 0 take initial position
$(this).css('opacity', '0');
var left = $(this).css('left');
var top = $(this).css('top');
// reset position and animate
$(this).css({'left' : '0', 'top'...
Hello,
I'm want to create a style element after loading of page ( say about 2-3 sec after page loaded )
html
<html>
<body>
<div id="div1" >
<div id= "div2" > some text goes here </div>
</div>
</body>
</html>
javascript
$(function() {
var style = $('<style type="text/css" />').appendTo('head');
...