I have a textbox I want to change the watermark on focus.
Please correct me:
$('body').ready(function() {
$('#edit-submitted-full-name').focus(function() {
$(this).css({background:'#FFFFFF'});
});
$('#edit-submitted-full-name').blur(function() {
if ($(this).val() == '') {
$(this).css({background...
Hi,
I have the following code
<div id="element1" style="display:none"></div>
<ul>
<li id="item1">Item 1</li>
<li id="item2">Item 1</li>
</ul>
On click I want to move element1 after item1
<ul>
<li id="item1">Item 1</li>
<div id="element1" style="display:none"></div>
<li id="item2">Item 1</li>
</ul>
If I use
...
Hi,
i hope somebody can help me, the array value is empty in the post.
$(function start() {
c_all = new Array('#div { font-color:#ff0000; border:1px solid #00ff00; }', '#div_2 { font-color:#ff0000; }', '.line2 { font-color:#00ffff; }');
css(c_all);
});
function css(x) {
values = new Array();
for (i = 0; i < x.le...
I'm writing some JavaScript to handle the common scenario of dynamically enabling a form submit button when some text is entered in an associated text field. I've been using the Prototype framework for years but am moving over to jQuery. So I was surprised to discover that the jQuery version of my code seems kind of clunky.
Is there a w...
The scenario is like this ...say i have a grid and on clicking that button it will send that data to the grid and it will refresh automatically with new data display in the data...
$("#wics").click( function(){
var grid = jQuery("#list10");
var ids = grid.jqGrid('getGridParam','selarrrow');
if (ids.length>0) {
var na...
It is all of the sudden much slower then it was.
Is there any way I could use some sort of tool that will tell me what part of my code is making my page slow?
Thanks
...
i use facebox.js to pop-up div on my site ,
but i don't think it is the best one ,
so what plug-in of jquery are you using for pop-up ,
thanks
...
Hi everyone, I've searched around and couldn't find this. I'm trying to get the width of a div, but if it has a decimal point it rounds the number.
example:
#container{
background: blue;
width: 543.5px;
height: 20px;
margin: 0;
padding: 0;
}
if I do $('#container').width(); it will return 543 instead of 543.5. How do I get it to ...
For example, I'm using the script below to check for empty fields :
$('a.submit').click(function() {
if ($('.LoginData').val() == "") {
$('input:text[value=""]').attr('style', 'border-color:#FF0000;');
} else {
$(this).parents('form').submit();
}
});
All the input elements have the class LoginData, so I used the jQuery class s...
Hey guys,
So what I want is to have some tables like this
<ul>
<li>Some Text, Links whatever</li>
</ul>
ordered by the page view. So if the page ends (on the bottom) in the view I wanna have a new table on the right of the first like this:
<div class="left_1 table">
<ul>
<li>First Some Text, Links whatever</li>
</ul>
</d...
When the content is static:
<a href="#nearme">Click</a>
<script>$('#nearme').bind('pageAnimationEnd', function(event, info){});</script>
When the content is AJAX:
<a href="page.html">Click</a>
How do I bind something to occur after the AJAX (page.html) is loaded?
...
I've created somewhat of a complicated slider with jquery Cycle. You can see it running perfectly here
However, when you click it a bunch of times (before the slide has finished its transition), it starts to go wacky and even hides the text..
Here is my code:
$('#dmzSlideHolder').cycle({
fx: 'uncover',
pager: '#slideN...
I am in the the each() loop of a given <tr> on my page. How do I loop through all the <th> within $(this) i.e. within the current <tr>:
$('#my_table > tbody > tr').each(function() {
// how to loop through all the <th>'s inside the current tr?
});
...
What I want to do is take an input for a zipcode and in jQuery if input#zip has 5 characters then function. Also same for a list box when the user chooses one of the choices, might be simpler?
...
I would like a separate DIV that's holding the input to also change in background color. How would I add it to my existing code that works?
<script type="text/javascript">
jQuery(document).ready(function() {
jQuery("input:[type=text]").focus(function () {
jQuery(this).addClass("highLightInput");
});
jQuery("input:[type=text]").blur(f...
I am trying to find parent form from element using code below:
<form id="f1" action="action1.html">
form1 <button id="btn1" onclick="testaction(this); return false;" >test form 1</button>
</form>
<script type="text/javascript" >
function testaction(element) {
var e = $(element.id);
var form = e.parent('form');
alert(form....
Hi all,
I'm using Oembed for the first time with the Oembed jQuery plugin. Everything is working fine when the page loads, my default video is loaded fine, but when I click on a thumbnail to load another file the new movie isn't loaded. I'm not getting any errors and it doesn't look like anything is being run. Here's the code I am using...
I'm using jQuery UI Dialog for adding some news to my site. Every time I click add news button, the dialog should open with the text area. Actually, I'm using ckeditor replacing the textarea and it happens that I can't type inside the text editor due to focus issue (at least I think this is the problem).
Check it out. As just as I clic...
I'm currently using this JSON to get the latest flickr photos of an ID:
http://api.flickr.com/services/feeds/photos_public.gne?id=49107890@N06&tagmode=any&format=json&jsoncallback=?
Now I need to change my code to display a set instead of an ID. I can get some JSON return with this:
http://api.flickr.com/services/rest/?met...
Hello,
I have problem with synchronizing results of function I get with AJAX with that function.
The idea is that I send AJAX request, then after reciving answer I open dialogbox, and after user confirmation function returns proper value. Problem is that my function (even if I set ajax request not to be async) doesn't wait for response a...