Hi there,
I am looking for an alternative to using an object/variable in global scope -- I would like to associate key/value pairs with specific DOM elements (eg, a DIV), so that I can use them as input for logic that processes other elements (eg, child elements of said DIV).
I tried something naive like: $('[foo=bar]').key='value' , a...
I think this is just a "Best Practices" question, but I was wondering if it is ok to make a jQuery extension that does not depend solely on jQuery, but also on another jQuery extension.
Thanks for your answers! =D
...
I have simple issue -- I would like to check a field to see if its an integer if it is not blank. I'm not using any additional plugins, just jQuery. My code is as follows:
if($('#Field').val() != "")
{
if($('#Field').val().match('^(0|[1-9][0-9]*)$'))
{
errors+= "Field must be numeric.<br/>";
suc...
I am using JQuery with the DataTable plugin, and now I have a big performnce issue on the following line.
aLocalData[jInner] = nTds[j].innerHTML; // jquery.dataTables.js:2220
I have a ajax call, and result string in HTML format. I convert them into HTML nodes, and that part is ok.
var $result = $('<div/>').html(result).find("*:first"...
$('div').animate({ 'background':'yellow' }, 2000,'linear', function() {
})
why??
thanks
...
I need to get all input elements within a div and then attach event handlers, so that whenever values change it updates a hidden field. Children elements within the div might already contain event handlers, if so the attach should chain it.
Any help is much appreciated.
...
I'm trying to remove contents of particular div which are basically list items and a heading by using jquery empty so that I could replace with new contents. What happens when I run the code is, the whole div element blinked and flash the replaced content and then the old one reappear. Can anyone tell me what am I doing wrong? Here's an ...
I am having check box in the column header. The function of this is to check or uncheck all the check boxes in that column.If the row check box is checked and say delete, that row can be deleted from the dataTable.
If the row object is used in some other table as a foreign key i put '-' in that row instead of check box which indicates t...
hi,
i have stumbled upon this site www.netvibes.com of course many of you know it.
now i got 4 questions i hope some one would help me on it
-first is there is a small gray handle between the widgets column that let you re size the whole column and the widgets get re-sized upon that ?
-second is how you can create dropping zones like ...
Does anyone know an easy way to hide hashtags in the user's address bar? I am using a image gallery plugin and the only way to control the start position is to use a hash tag.
The problem is the hash tag gives away the relative path of the images folder and it looks bad.
Without the hash tag it only loads thumbs and not start image so ...
Sorry, Ill try simplify my question. Basically, when a user goes to a page...all the divs on the page and the content of the div fade in. Once loaded. I was thinking maybe something like:
$(window).load(function(){
$('#div').load(function () {
$(this).fadeIn(4000);
});
});
cheers
...
I have a table row with a Delete link on it for deleting that row. I want to create a jQuery feature that pops up above that Delete link an "Are you sure?" yes/no confirm dialog, but in a very small size.
How do I achieve this in the least lines of code in jQuery?
I mean, I need to determine the x,y of the Delete link that was detecte...
I am using the latest version (0.5) of Table Drag and Drop plugin (http://www.isocra.com/2008/02/table-drag-and-drop-jquery-plugin/) for jQuery. I have a problem when the table with the draggable rows is inside an iframe. When I drag a row and take it to the top, the page will not scroll (even after explicitly setting scrollAmount to a p...
Hello,
<div id=i1><span id=e1>Item 1</span></div>
<div id=i2><span id=e2>Item 2</span></div>
When I click on Item 1 it should be deleted and moved to i2 and when I click on Item 1 again it must go back to i1
Yes, I tried append(), it goes to i2, but on clicking again it does not move back to i1
How do I get to do it.
Thanks
Jean
...
Hello,
I have a dialog box, created with the code javascript and HTML generated below. I'd like remove the class "ui-button-text-only" for the buttons and for the container add "style=font-size: 0.9em;"
Could you help me ?
Thanks,
HTML :
<div class="ui-dialog-buttonpane ui-widget-content ui-helper-clearfix">
<button type="butto...
Hi Guys,
I have the following HTML
<div id="testID" class="test1">
<img id="testID2" class="test2" alt="" src="some-image.gif" />
</div>
I basically want to get to #testID2 and replace .test2 class with .test3 class ?
I tried
jQuery('#testID2').find('.test2').replaceWith('.test3');
But this doesn't appear to work ?
A...
Hello all.
I am using PHP + jQuery + Fancybox in my project.
I have multiple tabs that get created dynamically.
I have got a star icon on every tab header and on clicking them I want to open a fancybox.
My tabs are basically ul-li with following dynamic code.
$("#tabs").append("<li class='current'><a class='tab' id='tab_" +
tabCnt ...
I want to set something in the middle of the screen
thanks
...
hello
my code is something like this
//css
li{display:inline-block}
//html #li margin and width are dynamic
<ul>
<li style='margin:30px;width:100px;'>Pic</li>
<li style='margin:40px;width:200px;'>Pic</li>
<li style='margin:10px;width:500px;'>Pic</li>
<li style='margin:50px;width:300px;'>Pic</li>
</ul>
how to make a jquery function ...
in this page:http://api.jquery.com/category/effects/
when you put 'up' or 'down',
the blue border is always in the moddle of the screen,
how to do this .
i have the hotkeys lib:http://www.openjs.com/scripts/events/keyboard_shortcuts/
thanks
...