is there anyway to theme an html table (css) with using the jquery css themes ? all of my components look like they belong together except for my html table which look different.
simply i'm doing a test
i have a div called test and mvc action in the client controler
the view
and the controler
public string testout()
{
return DateTime.Now.ToString();
}
and i'm using jquery to update the div
$("#B1").live("click", function() {
$("#test").load("/client/testout");
return false;
});
first time a click the bottun i see the date and time in the div test second time i click the botton nothing changed
I am using jquery corners javascript library to make the corners of a div rounded. It works fine, But if i specify a body background image/color or grident background color, corners are still white. How can i make these corners transparent?
Is there a way in JQuery to loop through or assign to an array all of the classes that are assigned to an element?
ex.
<div class="Lorem ipsum dolor_spec sit amet">Hello World!</div>
I will be looking for a "special" class as in "dolor_spec" above. I know that I could use hasClass() but the actual class name may not necessarily be known at the time.
The following code
stringref = "tab_2";
jQuery('.someclass a:not(.someclass #a_someclass_'+stringref+')').css('color', '#000');
gives me this warning in the FF 3.5.5 error console and I can't figure out why:
Warning: Missing closing ')' in negation pseudo-class '#a_someclass_tab_2'.
Is my syntax failing me or has FF gone bonkers ?
I'm in the midst of writing a slideShow app (click a button, and you slide through a list of images) for jQuery, but I've run into a little bug where it will respond to the click() request even while an animation is happening. I'm using the animate() function already, so that isn't staving off the additional animation requests.
Any way to program around this?
I just want to use javescript /jquery to determine if and xml file exsists
I don't need to process it I just need to know that its available or not.
can seem to find simple check.
thanks
So I have a script which returns a price for a product. However the price may or may not include trailing zeros so sometimes I might have:
258.22
and other times I might have
258.2
In the later case I need to add the trailing zero with jQuery. How would I go about doing this?
I have a large application and I'm going to enabling short-cut key for it. I'd find 2 JQuery plug-ins (demo plug-in 1 - Demo plug-in 2) that do this for me. you can find both of them in this post in StackOverFlow
My application is a completed one and I'm goining to add some functionality to it so I don't want towrite code again.
So as a short-cut is just catching a key combination, I'm wonder how can I call the server methods which a short-cut key should fire?
So How to use either of these plug-ins, by just calling the methods I'd written before?
Actually How to fire Server methods with Jquery?
You can also find a good article here, by Dave Ward
Update: here is the scenario. When User press CTRL+Del the GridView1_OnDeleteCommand so I have this
protected void grdDocumentRows_DeleteCommand(object source, System.Web.UI.WebControls.DataGridCommandEventArgs e)
{
try
{
DeleteRow(grdDocumentRows.DataKeys[e.Item.ItemIndex].ToString());
clearControls();
cmdSaveTrans.Text = Hajloo.Portal.Common.Constants.Accounting.Documents.InsertClickText;
btnDelete.Visible = false;
grdDocumentRows.EditItemIndex = -1;
BindGrid();
}
catch (Exception ex)
{
Page.AddMessage(GetLocalResourceObject("AProblemAccuredTryAgain").ToString(), MessageControl.TypeEnum.Error);
}
}
private void BindGrid()
{
RefreshPage();
grdDocumentRows.DataSource = ((DataSet)Session[Hajloo.Portal.Common.Constants.Accounting.Session.AccDocument]).Tables[AccDocument.TRANSACTIONS_TABLE];
grdDocumentRows.DataBind();
}
private void RefreshPage()
{
Creditors = (decimal)((AccDocument)Session[Hajloo.Portal.Common.Constants.Accounting.Session.AccDocument]).Tables[AccDocument.ACCDOCUMENT_TABLE].Rows[0][AccDocument.ACCDOCUMENT_CREDITORS_SUM_FIELD];
Debtors = (decimal)((AccDocument)Session[Hajloo.Portal.Common.Constants.Accounting.Session.AccDocument]).Tables[AccDocument.ACCDOCUMENT_TABLE].Rows[0][AccDocument.ACCDOCUMENT_DEBTORS_SUM_FIELD];
if ((Creditors - Debtors) != 0)
labBalance.InnerText = GetLocalResourceObject("Differentiate").ToString() + "?" + (Creditors - Debtors).ToString(Hajloo.Portal.Common.Constants.Common.Documents.CF) + "?";
else
labBalance.InnerText = GetLocalResourceObject("Balance").ToString();
lblSumDebit.Text = Debtors.ToString(Hajloo.Portal.Common.Constants.Common.Documents.CF);
lblSumCredit.Text = Creditors.ToString(Hajloo.Portal.Common.Constants.Common.Documents.CF);
if (grdDocumentRows.EditItemIndex == -1)
clearControls();
}
Th other scenario are the same. How to enable short-cut for these kind of code (using session , NHibernate, etc)
I'm using the jQuery validation plugin to validate a form, and I'd like to remove the validation and submit the form if a certain link is clicked.
I am submitting form with javascript like jQuery('form#listing').submit(), so I must remove the validation rules/function with javascript.
The problem is that I can't figure out how to do this. I've tried things like jQuery('form#listing').validate({}); and jQuery('form#listing').validate = null, but with no luck.
It seems to me that jQuery doesn't seem to be written as an OOP framework, it seems too short, and not verbose enough for that. Am I right in thinking this and if it isn't written as OOP, then what methodology are they using?
Hi,
I have a website that changes his inputs ids, and I'm trying to make a semi auto-login, filling automatically the email and the password part...
I'm doing this with greasemonkey and jQuery...
I'm trying something like this
$("input[@type=text]").setValue("[email protected]");
but had no success...
The Page has only the login part, two text type inputs...
What am I missing here?
I've been searching all over the place and just don't see anyone doing it - Is it possible to have some kind of spinner/loader with a jQuery UI Autocomplete? (1.8) while data is being fetched?
Hi there,
I am combing the jQuery validation plug-in with the jQuery Form Plugin to submit the form via AJAX.
This works perfectly in Firefox & Chrome, but (as usual) Internet Explorer is being a pain. For reasons that are alluding me, IE is ignoring the ajaxSubmit, as a result it submits the form in the normal fashion.
I've followed the validation plug-in's documentation when constructing my code:
JS:
$(document).ready(function() {
var validator = $("#form_notify").validate({
messages: {
email: {
required: 'Please insert your email address. Without your email address we will not be able to contact you!',
email:'Please enter a valid email address. Without a valid email address we will not be able to contact you!'
}
},
errorLabelContainer: "#error",
success: "valid",
submitHandler: function(form) {$(form).ajaxSubmit();}
});
$('#email').blur(function() {
if (validator.numberOfInvalids() 0) {
$("#label").addClass("label_error");
return false;
}
else {$("#label").removeClass("label_error");}
});
$('#form_notify').submit(function() {
if (validator.numberOfInvalids() == 0) {
$(this).fadeOut('fast', function() {$('#thank-you').fadeIn();});
return true;
}
return false;
});
});
Form HTML:
<form id="form_notify" class="cmxform" name="form_notify" action="optin.pl" method="get">
<fieldset>
<div class="input">
<label id="label" for="email">Email Address:</label>
<input type="text" id="email" name="email" value="" title="email address" class="{required:true, email:true}"/>
<div class="clearfix"></div>
</div>
<input type="hidden" name="key" value="sub-745-9.224;1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0;;subscribe-224.htm">
<input type="hidden" name="followup" value="19">
<input type="submit" name="submit" id="submit-button" value="Notify Me">
<div id="error"></div>
</fieldset>
</form>
I can't understand what is causing IE to act differently, any assistance would be greatly appreciated.
I can provide more information if needed.
Thanks in advance!
I am using JQuery's thickbox to input form data. Would like to auto close the thickbox and send a variable back to the parent from the thickbox form input upon submit.
I have a 1024x768 image
<span class="frame">
<img alt="Image" title="Image" src="http://localhost/zapav/site/assets/questions/D41120CA-7164-11DF-A79E-F4CE462E9D80_Green_Sea_Turtle.jpg">
</span>
and the below CSS sets the image width to
.frame img{
width:425px;
}
And the jQuery code
$('.uploaded_image img').attr("width");
returns 425
How can i retrieve the actual width of the image 1024 in JavaScipt?
Hello , i'm trying to validate credit card numbers with jQuery but i dont want to use the validation plugin , is there any other plugin for doing this?
thanks
I have an image on the page:
<img id="foobar" src="emptySpace.gif" />
The image has an absolute position of left: 0 and top: 0 in a .css file.
When I try this in JavaScript onmouseover, the height and width don't change. What am I missing?
var image = jQuery("#foobar");
image.height(500).width(500);
What gives?
I can't parse the JSON that I have no control of. What am I doing wrong here?
data.json
{
"img": "img1.jpg",
"img": "img2.jpg",
"size": [52, 97]
}
{
"img": "img3.jpg",
"img": "img4.jpg",
"size": [52, 97]
}
jquery
$.getJSON("data.json",
function(data){
$.each(data, function(i,item){
alert(item.img[i]);
});
});
In javascript the following works to give focus to the edit_2 input box:
document.getElementById("edit_2").focus();
However using Jquery this does not:
$("#edit_2").focus;