I'm currently trying to wrap my head around regex, I have a validation snippet that tests an input box against a regex-expression:
$.validator.addMethod("customerName", function(value, element){
return (/^[a-zA-Z]*$/).test(value);
}, "Some text");
That works well, but when I try to add a space and some special danish characters, it do...
Is there anyway i can fool the Jquery .load Same origin policy? The closest i've come is with this tut.
But that only deals with rss feeds.
...
Hi everyone,
I'm using jquery $.getJSON to retrieve list of cities.
Everything works fine, but I'm from Estonia (probably most of you don't know much about this country =D) and we are using some characters like õ, ü. ä, ö.
When I pass letters like this to callback function, I keep getting empty strings. I've tried to base64 encode(serv...
In my app, I have a temporary div that is shown each time the app is saved (see markup below). I'm using jQuery 1.4.2 and would like to know the command that will fade this div off the screen after 3 seconds...
<script src="../wp-content/themes/mytheme/jquery-1.4.2.min.js" type="text/javascript"></script>
if ($_REQUEST['saved']) echo '<...
Ok, so im trying to work out the fastest way of storing data on my page without slowing the page load:
I need to store information in the
page to be later used by jquery.
My page is an events page and i want to
attach data to each event anchor.
there are 100+ events to attach data to.
The events anchors are created with a php loop,
s...
I want to change the background color of the table cell when radio button inside the cell is clicked.
<table>
<tr>
<c:forEach items="#{books}" var="book">
<td align="center">
<h:selectOneRadio value="#{book.price}" onclick="this.parentElement.style.background-color='red';">
...
The markup below is used for my jQuery carousel widget. The first div serves as a preview div for the currently selected template thumbnail. When a user mouseover event occurs inside the carousel on any thumbnail image, I'd like the preview image to update to show the full size thumbnail of that image (and then revert back to the default...
Due to space limitations I'm trying to place the error messages for a form inside tooltips.
$("form").validate({
rules: {
username: { required: true, email: true },
password: "required"
},
onkeyup: true,
success: "valid",
errorPlacement: function(error, element) {
...
I am redesigning my company's intranet site in Wordpress and one of the things they need is an archive of company memos. There are over 300 memos saved in one location and I'm wondering if there is a jQuery script that I can run that will read the contents of a local (network) folder and auto-generate a list of the contents of that folde...
Hello, my jQuery.ajax return JSon object. I firstly read other articles. but their response text not likes mine.
My Response content: from firebug response
{"item":"[{\"country\":\"USA\",\"lan\":\"EN\"},{\"country\":\"Turkiye\",\"lan\":\"TR\"}]"}
Now i trying to alert countryName:
$('#loadData').click(function() {
$.ajax...
Quicksearch is really cool... but it has a usability issue that makes it behave weird. A lot of users presses enter after inserting a string so the page is reloaded with no parameters and the queries are destroyed.
look at that:
http://www.parksmania.it/parco_list.php?rid=1
Adding
$('form#filtroRapido').submit(function () { return fal...
I am using the autocomplete plugin with jQuery and it is working fine. However, in IE, when the user selects an item in the autocomplete, the focus does not then move to the next input field. Naturally it works in Firefox. The plugin doesn't have a built-in solution but does provide for "options". Is there a way I can force it to move to...
I have ten rows in my table. All the even rows are hidden by default. The odd rows have a 'plus' icon in the first cell. The plus to be clicked to see the next even row in the table. Clicking the icon again will hide the row again. I do this with simple jquery hide and show methods.
The problem with this in IE is whenever I expand and ...
I'm using the jQuery dropdown checklist plug-in, found here, so far everything works fine.
However i am having problem disabling it. we have a checkbox that controls the checklist. if checked then the checklist is enabled, if not checked then disable it.
$("#s1").dropdownchecklist("disable");
$("#s1").dropdownchecklist().attr("disabled...
I'd like to use css pseudo-selectors ( parent > child, element:first-child ) in my stylesheet but IE6 doesn't seem to recognize those. Is there any plugin (jQuery preferably) that would allow me to use pseudo-selectors freely without worrying about the damned IE6?
Thanks
...
Hi,
Very new to JQuery and MVC and webdevelopment over all.
I'm now trying to accomplish this and is asking for a bit of advise:
I'm basically trying to build a filter with 4 input elements, and 1 output.
I have 4 select (drop down) elements in my page. As soon as one of them is changed, I need to build a href and get the partial vie...
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 currentLin...
I've been trying to find a way to do this but, have not found many resources that specifically relate to this situation.
I need a javascript (can make use of Jquery if need be) to swap phone numbers on a site.
2 numbers would be specified. One would show on the site by default.
The script needs to be able to create a cookie and do th...
Hi guys,
i'm using the jquery cookie plugin. Everything works fine except the fact that I have no idea how to set an expiration-time for the cookie?
$.cookie('opt_visible', 'true');
the jquery-cookie documentation says:
hoursToLive (DEPRECATED for expiresAt)
NUMBER
For how many hours should the cookie be valid? (Passing 0 mea...
Hi,
I have a problem where I have code like
<table id="table">
<tr>
<td>...</td>
<tr>
</tr>
<td>...</td>
</tr>
<tr>
<td>...</td>
</tr>
</table>
and JavaScript such that
$('#table').draggable(handle: '#table > tr:eq(0) > td:eq(0)');
but for some reason the entire table becomes the handle. It works when I set the td to have an ident...