With jQuery I'm retrieving positions of a sortable list using 'serialize', like this:
var order = $('ul').sortable('serialize');
The variable 'order' then receives the following:
id[]=2&id[]=3&id[]=1&id[]=4&id[]=5
Now how can I use this data in an ajax call?
This is how I plan to do it, but it's ugly and I can't change the parameter name 'id':
$.post('ajax.php?'+order,{action:'updateOrder'});
Maybe I need to unserialize, then implode the variable 'order' and assign it to just one parameter?
If I define the up and over states of a button like this:
.button {color:red;}
.button:hover {color:blue;}
How can I get all the hover state styles for an element using JQuery?
Something like $(".button:hover").styles...
This might seem like an odd request but I'd like to use jQuery's Selectable tool to only select one item at a time and I'd like it to show me a value I'll have within each tag. At the very least I want the contents of that selection. Has anyone tried to do this? For some reason these little things seem to not be all that easily findable in their API for it.
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
This page work in Firefox but not in IE7
http://www.robwalshonline.com/demos/randomImageDemo/randomImage_plugin.html
This is page of plugin http://www.robwalshonline.com/posts/jquery-plugin-random-image-on-page-load/
How to get this work in all browser FF, safari, chrome and IE 6, 7 ,8
How to know without having iphone and ipad, any javascript/jquery effect/plugin which is working fine on all desktop browsers, will work on iphone and ipad also?
Is it enough to check on Latest Safari for Windows? I don't have MAC OSX .My os is Windows.
I'm wanting to delete All bindings (ko.cleanNode) from all child elements of a certain div.
Must be a noobie question but I can't figure out how to use jQuery to loop through all childre, grand-children, great-grand-children, etc. whilst having KnockoutJS remove the bindings of all the DOM elements.
I do NOT want to remove the elements from the DOM. This is a single page application, therefore the elements are pre-loaded as embedded resources and don't get resend to a client if they were to visit the page again. If a client revisits that part of the application I'll have a function rebind the necessary elements, which currently works fine.
Current setup:
<html>
<head>
//loading all resources
</head>
<body>
//load first element using some obscure setup
<div id="firsPage" data-role="page">
<div data-role="header">@Global.header</div>
<div data-role="fieldcontain">
<label for="firstInput" />
<input id="firstInput some other stuff />
</div>
<div data-role="datebox <!-- some settings --> >
//creates table using jQuerymobile (lots of (great-)(grand-)children)
</div>
<div data-role="fieldcontain">
<div id="secondInput">
<div class="checklist">
<ul>
<li />
<li />
</ul>
</div>
</div>
</div>
</div>
//Here the whole thing starts again
<div id="secondPage" data-role="page">
<!-- repeat above innerHTML in your mind ;) -->
</div>
//And here again! and again...
</body>
The problem I'm having is that bindings of the children don't seem to get "cleaned up" when i use
ko.cleanNode($('#firstPage')[0]);
Or when I get the Element into a variable and then format it to ko.cleanNode($element).
Is there a way to do this? Been staring at it for a good few hours now, so probably overlooking a way too obvious way of doing it...
Thanks!
I am having problems with ColorBox to show a hidden report from ReportViewer as explained here.
Is there a JQuery lightbox which works well with the ASP.NET ReportViewer?
I am creating an element with document.createElement().
Now how can I pass it to a function that only takes a Jquery object?
$("#id")
I can not use it, as the element has not been rendered in the page yet.
I have a link in my HTML:
<a href="/DoSomethingDangerous">do something dangerous</a>
Visiting the DoSomethingDangerous link causes a not easily reversable action to occur.
So after the link is clicked on I would like a dialog box (eg "Are you sure?" "OK" "Cancel") to be displayed and if the user clicks Cancel the link is not visited and the browser remains at the same page.
What is the cleanest technique using either Javascript or jQuery to implement this?
Hi,
I am looking for a jquery modal window script for displaying images, text, html, videos, etc.
There are a lot of great ones out there, but I am looking for one that allows for a long description (that isn't pulled from the title) - like highslide that lets you have a caption and will display the photo text to the right or left of your image in the same modal window.
Due to licensing, I can't use highslide. So I'm looking for something else.
Thoughts?
Hello friends I have jquery grid with paging at the footer of the grid,
i have arrows for next and last..
istead of that can i define First Previous , Next and Last
thanks
I want a link that scrolls the page to the start of the <div class="content-body">
The same functionality as a: <a href="#maincontent">Skip</a>, and placing <a name="maincontent"></a> right next to <div class="content-body">
I am seeing if it is possible via jQuery, and want to know if I would run into any problems down the road using that method (besides the user having javascript disabled).
ie6 isn't playing nice with my jquery snippet, why is this throwing a syntax error in IE6
if(typeof isIE6 !="undefined"){
$("#dropdown-list li").hover(
function(){ $(this).addClass("hover"); },
function(){ $(this).removeClass("hover"); },
);
};
how to increase row size using jquery.. I have column like this.
{ name: 'Comments', index: 'Comments', editable: true,
editype: 'textarea', editoptions: { rows: "2", cols: "10"} }
Thanks
var foot = document.createElement("div");
$('<div class="t"></div><div class="b"></div>').appendTo(foot);
foot.id='foot';
//*****
$(foot,'> .t').mouseover(function(){...})
i want to get the '.t' div element,
but now ,the 'foot' div is not already appenTo the 'document.body' ,
so i can't use this $('#foot .t'),
and i use this:$(foot,' .t'), but ,i get the $(foot),
so how do i get the foot's '.t' element using jquery
thanks
I'm watching a tutorial learning JQuery for the first time, and it seems you can select items using pretty much CSS, like:
$('ul li:nth-child(3)').addClass('biscuits');
Is that kind of selector going to work on all browsers, or just ones that support CSS 3 ?