I'm new to jQuery and really liking it. I'd like to know if there's an effect similar to IE's in which I can convert images to grayscale in the runtime?
I am working on asp.net and c#.
I am using lots of ASP and HTML controls on the page and in some cases all the controls gets disabled.
Some of the used Controls are:
RadioButton
RadioButtonList
CheckBox
CheckBoxList
TextBox
DropDownList
Button
etc...
I need a Simple and short method to disabled all the Controls when i call this jQuery method on some condition.
Any Help?
Thanks in Advance...
I noticed that the following JQuery code doesn't run on the page load, but instead, it only runs after the page loads and I change the size of my browser window.
$(window).resize(function() {
... // dynamically set the height of some div based on the browser viewpoint height
});
Question: How do I get the code above to also run when the page loads?
I have a background colour set on a series of buttons, .button1, .button2., .button3 & .button4. Each of these buttons has a different background colour set in CSS.
I want to use jQuery to detect the background colour of the button when it is clicked and apply that colour to .toolbar.
Is this possible?
Hi,
I am using jQuery fullcalendar in my application. I want to display the calendar only on the right side of my screen but not sure how to reduce the size of the calendar. Right now it is displaying in the full screen
I have this wordpress blog that has many pages with subpages that dropdown on hover.... the thing is, I dont want the pages that you hover to link to anything unless they dont have any ul with many anchors inside so just the subpages will have a href different than "#"
So basically Im hacking my way through this with some simple javascript.
jQuery(document).ready(function(){
jQuery("#menus li > a").attr("href","#");
});
This is selecting every a.. and I dont want that... I just want the anchors that are main pages, not subpages... heres the html so maybe you can think of a better way to select this.
Ill explain first
the structure is
an ul with many li that have an anchor inside
if the li also has a ul inside then those are subpages that will appear on hover.
hence the initial anchor should have href="#"
if there is no ul inside the li then the li a should keep its href.
<ul id="menus">
<li>
<a href="somelink">Main Page</a> //href should be changed to #
<ul>
<li>
<a href="somelink2/">Subpage1</a>
</li>
<li>
<a href="somelink3">Subpage2</a>
</li>
</ul>
</li>
<li>
<a href="somelink">MainPage-with-no-subpages</a> //href should not be changed
</li>
<li>
<a href="somelink4">MainPage</a> //href should be changed to #
<ul>
<li>
<a href="somelink5">Subpage</a>
</li>
<li>
<a href="somelink6">Subpage</a>
</li>
</ul>
</li>
</ul>
I have a text area in which users can type source code (html/css/js). I want to be able to let them click a "switch to fullscreen" link to make the editor fullscreen.
Of course, this should work on any resolution and must also resize when a users resizes it's window.
I found this plugin, http://plugins.jquery.com/project/fulltextarea, but it's not resizing when the browser windows is resized.
Any tips or plugins for this one?
Hi folks. I was kindly helped by fudgey earlier. Unfortunately the solution doesn't work in IE. Here is the original post:
http://stackoverflow.com/questions/2768141/expand-div-with-focus-jquery
and here is his demo (also doesn't work in IE):
http://pastebin.me/6561cd9a033a5f16940ae12f813e938c
Any idea on how to make this work there?
Thanks!
Is there any place where I can find JQuery video tutorials from novice level to master level? The books I saw mostly assume you are very familiar with CSS syntax. If there is any video tutorial resource for CSS, that would be awesome too.
I'm trying to call the jQuery text() function and run it through the trim() function to remove all trailing and leading whitespace. Seems to work great in Firefox, however, does not work in IE7 (refuses to remove a space trailing at the end).
Any ideas?! Maybe a regex solution?
I have a table fill with cell items.
If I click on a cell item, that cell item is 'linked' or related to other cell items, which need to be highlighted.
If another cell item is clicked, that cell's related cells need to light up.
Is there a jQuery plugin to accomplish something like this? Or would I have to look into writing one myself?
I am using this jQuery plugin
It is very nice, but I can't seem to figure out how to get it to auto-play. (automatically transition to the next image at an interval)
Has anyone else gotten this to do that?
In Prototype I can show a "loading..." image with this code:
var myAjax = new Ajax.Request( url, {method: 'get', parameters: pars,
onLoading: showLoad, onComplete: showResponse} );
function showLoad () {
...
}
In jQuery, I can load a server page into an element with this:
$('#message').load('index.php?pg=ajaxFlashcard');
but how do I attach a loading spinner to this command as I did in Prototype?
I have several javascripts at the head of my document, as well as at the bottom, near the body closing tag. I use jQuery to call an ajax element into place and the elements that are called, require these javascripts to function. How can I include these javascripts to work with the ajax call?
I have this element:
<div class="isthisyou" id="unique_identifier"></div>
I want to use jQuery to insert a link into the div:
$('isthisyou').append('<a href="auth/create_account/'+this.id+'">Is this you?</a>');
Right now this.id is returning undefined instead of unique_identifier. What am I doing wrong?
Thanks!
hi,
I'm using qTip jquery-plugin for my tooltips.
I cannot change the font-size of the tooltips. This is the code.. any number 2..4..8 produces the same results.
$('.option img[title]').qtip({
style: { name: 'light', border: {width: 0}, title: { 'font-size': 2 } },
position: {
corner: {
target: 'topMiddle',
tooltip: 'bottomMiddle'
}
}
});
thanks
Is there any way to handle exceptions thrown from AJAX callbacks in jQuery, other than adding a try..catch block to each callback? The error function is not called in this situation.
$.ajax(
{
url: 'myurl.rails',
success: function( data )
{
throw 'Oh no!';
},
error: function ( xhr, textStatus, errorThrown )
{
console.log( 'AJAX call failed', xhr, textStatus, errorThrown );
}
} );
I'm using UpdatePanel to asynchronously call a button click event in a page that calls a method in another class which writes out an XML file on the output. Is there a way to do this with JQuery instead of UpdatePanel?
Hi guys, I used jQuery tools to create a tabs setup, and I would like to incorporate the fade effect, but when I try to do so, it bombs out, here is my code:
$(function() {
$("#flowtabs").tabs("#flowpanes > div", { history: true, effect: 'fade' });
});
I am assuming that it's because I am also enabling the tabs history?
I am kinda new to all of this, so please be patient! :-)
Thanx in advance!
I have an array (for checkboxes) that I need to pass alongside the regular form in an ajax post, but can't seem to get this to work:
new_data = [a,b,c,d,e];
somedata_assoc = JQuery.param({'choices[]': new_data});
$.ajax({
type: "POST",
url: contract_qurl,
data: $(div).find("form").serialize()+"&"+somedata_assoc,
context: $(this),
success: function(data) { $("#results_table").html(data); }
});
Hi guys,
I'm trying to write a jQuery function to change out href of a link, but I'm not quite sure how to do it. I've implemented a slider, but I have a link which lives outside of the slider (outsideLink) which needs to change as the slider changes.
I'm trying to achieve the following:
for each link in sliderList
get currentLink.href
outsideLink.href = currentLink.href
wait 3 seconds
repeat
end
I'm not sure how to implement the delay when I'm going through a list of items though.
I need a jquery script section that checks to see if the first digit of a textbox entered number string is a '0' and eliminate it if so. For example "044055" needs to become "44055"
Hello,
Is it possible to color the user entering code (inside a textarea) using jquery.
Specific texts like <h1>, <b> etc should be colored or highlighted.
this helps to distinguish the opening closing tags.
Please help
Hello,
I would like to pass to a jQuery function a regular function, instead of the usual anonymous function, but I'm not sure how such a thing could be done.
Instead of this:
function setVersion(feature) {
$.post("some.php", { abc:"abc" },
function(data){
// do something here
}, "json");
}
I would like to do this:
function foo(data){
// do something here
}
function setVersion(feature) {
$.post("some.php", { abc:"abc" }, foo, "json");
}
Thank you.