I don't know if "escaping" is the right word (please tell me what the right word/phrase is) but in Ruby you can say something like
text = "This is visit number #{numVisits} to this website"
so you can skip concatenation etc.
I'm working in JQuery and have a bit like this:
$(document).ready(function(){
$("a.ajax").click(function(...
I am looking to add functionality to a jQuery method.
I have the code
$('li.s').appendTo('#target');
There are multiple elements which match li.s, and I can see it's grabbed correctly using Firebug.
The append method works fine without my wrapper. However, with my wrapper (which shouldn't change anything about the function):
var o...
Hey Guys,
Got the following code:
$(document).ready(function()
{
$('a.add-item').click(function()
{
if ($(this).parent().find('input').attr('value', '0'))
{
$(this).parent().find('input').attr('value', '1')
}
});
});
What I would like to do is to create a variable and increment it and...
I have a dropdown menu. Its height is animated with jQuery from 5px to 130px and vice versa.
The menu worked fine while it was separated element (when I was developing it) but
when another elements appeared Opera made a surprise:
I marked first state as 1 and second as 2. Third state should be the same as first but as you can see it...
I am trying to create a simple mouseover effect using a combination of mouseover, mouseout, addClass, and removeClass. Basically, when the user mouses over an element, I want to apply a different border (1px dashed gray). The initial state is "1px solid white". I have a class called "highlight" which simply has "border: 1px dashed gra...
I haven't done web development for about 6 years. I'm trying to get back into it and there is a lot of new stuff out there. I've chosen to write my next project with Perl and Catalyst.
I keep hearing about various JavaScript and CSS frameworks. I know very little about these frameworks so maybe this question is overly broad and ope...
I have a unordered list
<ul id="List1">
<li>www.xyz.com</li>
<li>www.abc.com</li>
</ul>
using jquery, i want to convert this li to a link and add font as underline
I am trying it like this
$('li').css('font', 'underline').click(function() {
// how to add hyperlink?
});
...
I am creating a signup form in my website. I want to implement some checkup with username, which are
username can't have any space,
username can't have any special characters other than dot (.) as gmail is doing in thier signup form.
I am using jQUERY in my app, can anyone tell me how to implement above listed two checkups using jqu...
I have created a table in my application, I want to select (change background color) whole row on click of a checkbox, same as gmail is doing, When we click checkbox in gmail, the whole row becomes yellow.
<table>
<tbody>
<tr>
<td><input type="checkbox" name="chk" id="chk" /></td>
<td>My Name</td>
<td>Description of the job</td>
</tr>
<...
write some code lie this,
`<form id="abc">
<input type="text" id="txt" />
</form>
`
and now I want to redirect like this,
var temp = $("#txt").val();
url = "http:abc.com/" + temp;
window.location.replace(url);
or
window.location(url);
Is there anyway in jquery to solve this because it's still let me have url = http://abc.com plea...
Hey guys,
I'm doing some animations and I want to implement something like this on the web. I was thinking that the HTML canvas can do this kind of job. Because I can scale part of an image. I just need the algorithm to actually make it work.
The effect is elastic, if the window is small, the greater the elasticity of the window when y...
I am developing an application in which I am displaying products in a grid. In the grid there is a column which have a disable/enable icon and on click of that icon I am firing a request through AJAX to my page manageProduct.aspx for enabling/disabling that particular product.
In my ajax request I am passing productID as parameter, so t...
I use jQuery jQuery.extend filter: for filtering items. When i use '*' for filtering, it is problem, because filter is case sensitive.
'People' and 'people' are two different strings.
'People' and 'people' filtered same items, but only when starting on this strings.
How I disable case sensitive for string, which start on '*'?
...
How do I create a DOM element in JQuery and fade it in to show up, instead of having it show up immediately?
I try this:
var myDiv = "<div>Hello!</div>"
$("somePlace").after(myDiv).fadeIn('fast');
but this doesn't work, since the .after(myDiv) makes it popup immediately. Any solutions? Thanks!
...
I'd expect the following to open file dialog, but it doesn't. Why?
$('<input type="file"/>').click();
...
I have a jsp page which should load a popup using ajax. The content of the page is determined by form filled by user.
Something like this:
javascript:
ajax('getPage.action', 'content_id', 'form_id');
foo.jsp:
<div id="content_id"></div>
<form id="form_id">
...
</form>
java/spring:
@RequestMapping("getPage.action")
MyController...
hi,
i really love the jquery validation plugins, look neat stylish and accessible, but as you know JavaScript can be turned off and boom your user can enter what ever he wants, therefore you should validate on server too, so what is the best approach here ?
do double validation one with jquery and one on server side or is there a better...
Have been struggling with Javascript closure for a while trying to wrap brain around function scopes, but I think they're wrapping around me instead. I've looked at a number of posts (Nyman's was the most helpful) but obviously still don't get it. Trying to run a loop over the hover method in jQuery. Need hover functions to ultimate trig...
Can I query the DOM with $() using a string variable as a parameter?
i.e.
var divContainerID = "divBlock1";
$(divContainerID).show();
...
how do call specific css for specific browser using jquery
...