Hi folks, i would like to expand the height of the box when it is clicked on.
$(this).find("textarea").css("height","2.6em").focus();
The code above expands the box, but does so abruptly.
How can i make it do so in a sliding manner that is much more elegant?
...
I have some code like below in an aspx page:
...
function CheckEditing() {
var answer = confirm('You are currently editing an item. If you continue to the next page your changes will not be saved. Would you like to continue?');
if(!answer)
{
return false;
}
...
Hello,
I would like to bind the same event to a list of anchor link. Why this does not work?
Markup:
<a tabindex="0" href="#contactRoles"
class="fg-button fg-button-icon-right ui-widget ui-state-default ui-corner-all"
id="contactAdd">
<span class="ui-icon ui-icon-triangle-1-s"></span>Aggiungi contatto</a>
<div id="contac...
I'm having an issue with this script and for the life of me I can't figure out what's wrong with it. Quick run through what I have:
The HTML:
<ul>
<li id="wildcard_1">
<div>
<a href="#">test</a>
</div>
</li>
</ul>
<a href="#" class="reset">reset</a>
The jQuery:
// Main function
$("[id^=wildcard_]"...
Currently, I'm using an AJAX Handler to populate the JSTree:
$(function () {
$("#jstree").jstree({
"json_data": {
"ajax": {
"url": "AJAXHandler.aspx?action=GetMenu"
}
},
"plugins": ["themes", "json_data", "dnd"]
})
.bin...
Hi,
I am rendering two GSP templates in a controller. The first template is rendered as follows:
String couponspage = (g.render(template: "availableCoupons", contentType:"text/html", model : [:]))?.toString()
I include the results of the first template in the model to the call to render the second template as follows:
render(templat...
I've a link named #link.
It changes color after hover, like this:
$("#link").hover(function(){
$(this).css({color: '#fed900'});
});
All I want to do is smooth, animated color change.
I know I have to put .css in an .animation somehow, but can't figure it out how.
I think that's the right way, but it doens't work at all:
$("#l...
I don't have any trouble grabbing a list of elements and sorting them alphabetically, but I'm having difficulty understanding how to do it with a modulus.
### UPDATE ###
Here's the code working 'my way', however, I like the re-usability of the answer provided below more, so have accepted that answer.
<script type="text/javascript">
$(...
Hello guys, I'm using this plugin http://devthought.com/projects/jquery/textboxlist/ to autocomplete like Facebook Style. I'm just a bit confuse on how to return the Json result that fits the plugin's need.
The json result must be like this:
[[1, 'John', null, ''],[2,'Mary', null, ''],[3,'Mark', null, '']]
The problem is when I retur...
Something like doesn't work, what's the work around?
var tgtCol = $('td[aria-describedby=tblGrid_Subject]');
var tgtHdr = $('#tblGrid_Subject');
$(tgtHdr, tgtCol).attr('colSpan', '3');
...
I have the following javascript (with jQuery)
$(function() {
$(".btnDesc").click(function() {
$("#desc").slideToggle("slow");
$(this).toggleClass("active");
});
When I change .click(function() to .hover(funtion(), as expected, hovering over the link with class="btnDesc" shows the div instead of clicking it, however, I wou...
When I start a webkit browser instance and enter http://localhost, the result of $this.innerWidth() is right (I used jQuery).
But if I tried to refresh the page, the result of $this.innerWidth() will change, which is wrong. It seems no sense, as I think refresh is the same to start a new page loading.
And this only happens in webkit br...
Hi guys,
I'm using AnythingSlider, but i get an error if i only have one slide item.
It gives me this error: 'base.$navLinks' is null or not an object.
The problem should be on line 149 in my jquery.anythingslider.js file. Which is the 3rd row in this bit of code:
if (base.options.buildNavigation){
base.$nav.find('.cur').removeClas...
I have loaded a jsTree with an AJAX call that returns JSON data. How can I refresh the tree so that it reloads its contents?
...
I'm trying to get a basic function to execute when an HTML5 video reaches a specific second value. Currently I haven't had any luck and was hoping that I could get some help here. Here's the code I'm using thus far:
jQuery(function(){
jQuery("video").bind("timeupdate", function() {
if(this.currentTime == "6") { alert("six se...
If I have 4 tabs where the first 2 are loaded with ajax and the last 2 are static, how do I pre-load the 2 ajax tabs by default?
For the moment, only the first tab is automatically loaded, the second one is loaded when clicked. I want them both to be loaded so that when I click the second one, the content is already loaded. I tried to c...
Hey Folks
I want to configure jcarousel for use on a voting site. The idea is that 2 panels slide into view, the user clicks their choice, the 2 panels slide out and 2 more slide into view.
until now i've never tried this level of customization and its pretty daunting. my jquery level is modest at best. thus far ive got the visual side...
Hello,
I'm wondering what's the right way to code a chat application for thousands of users.
I'm just confused how will I be able to ping the server using AJAX every second or maybe less and check if there are new records in MySQL, etc with an acceptable amount of server(s) load.
I'm currently thinking about coding this using jQuery, ...
Basically what I'm trying to accomplish is I want to check multiple dynamic forms on a page. Then if All textareas are empty OR have the default value, perform a function. Otherwise if any of them are not empty without the default value, cancel the function.
I know how to get the total count of the divs/forms or go through each one, sor...
for static html page
$("input:checked").addClass("highlight");
works fine . But for ajax populated page its not working.
Is there any better idea how radio box can be highlighted for ajax pages as well.
...