I have appended a div to my body
$('<div id="container"><img class="large" src="'+ img +'" /><a href="#">previous</a> | <a href="#" class="next">next</a></div>').appendTo('body').hide().fadeIn();
But i cannot interact with the elements that i;ve added if i try something like
$('a.next').click(function(){
$(this).remove();
...
I have developed below plug-in
(function($) {
$.fn.addressSearch = function(settings) {
settings = jQuery.extend({
searchClass: "quickSearch",
checkElement: "href",
dataElement: "data",
countryListCla...
I am trying to write a function that applies an action through all <strong> elements, and when finishes with one, applies it to the next one.
Also, at the end, it must start again with the first <strong>.
I am sure I remember reading about a jquery function for doing this, but I cannot remember it.
...
I have the following html in my site:
<link type="text/css" href="/Styles/ui-lightness/jquery-ui-1.8.2.custom.css" rel="Stylesheet" />
<link type="text/css" href="/Styles/ui.jqgrid.css" rel="Stylesheet" />
<script type="text/javascript" src="/Scripts/jquery-1.4.2.min.js" ></script>
<script type="text/javascript" src="/Scripts/jquery-ui-...
<div id='adHolder'>
adsense code here
</div>
//on dom ready
jQuery('#adHolder').css('something','somevalue');
-i have placed my adsenese code inside a div and repositioning it on dom ready, i want to know- is iam breaking google adsense TERMS & CONDITIONS
-i also want to know- is performing some javascript/jquery actions on parent el...
I am attempting to track events when links are clicked on my site in a method similar to the following.
<a href="/example" class="track">Example</a>
<script type="text/javascript">
jQuery(function($) {
// track clicks on all anchor tags that require it
$('a.track').live('click', function(e) {
// send an ...
How can I attach a class to the row I'm adding in the datatable, if not possible, how Can i Use fnRowCallback or fnDrawCallback to change the class.
Thanks for your help!
(Please be explicit)
oTable = $('#example').dataTable( {
"bJQueryUI": true,
"bSortClasses": false,
"sDom":'T<"clear">',
...
The following function works perfectly on our production site
function flickrGetPhotos(){
$.getJSON("http://api.flickr.com/services/rest/?method=flickr.photosets.getList&api_key=" + flickrApiKey + "&user_id=" + flickrUserId + "&format=json" + "&per_page=" + galeriaSetsPerPage + "&jsoncallback=?",
function(data){
flickrBuild...
Hello all.
I created this simple function and it works fine apart from the fact that I have more than one ".cta-mask" on the page. What do I need to do to stop affecting all the ".box-hover" when hover one of the ".cta-mask". Code bellow:
$(document).ready(function() {
//header box
$('.box-hover').css('opacity' , '.6');
$...
Hi there,
Tested the below code with FF, Safary and Chrome and all works ok. But with IE... not so
When the button "viewEditButID'" is click the div "customerDetailsDivClass" is hidden. When it's click again the div reapers but before it dose so it download the data is going to display.
$(document).ready( function() {
$('#viewEditButID...
This is not a dupe of permission-denied-ie-iframe but it is very closely related.
I have a page hosted at http://www.enviroissues.com/comments/bpa_i5/default.aspx. This page is being displayed in an IFrame at http://www.bpa.gov/corporate/i-5-eis/ecomment.cfm.
I am NOT trying to access dom elements on one domain from the other. My pag...
How do I write jQuery selector to test if li has ul that has at least one li that is not .disabled (may be other classes or without class at all).
Yes sounds complex but it's simple - I need to know if there're uls that do not have "disabled" class on inner lis.
Something like
$("li").filter("*:has(ul:has(li:not(.disabled)))")
...
If I have the following MVC Action:
[AcceptVerbs(HttpVerbs.Post)]
public ActionResult GetDocument(int id, string fileName)
{
// ..... //
return File(fileStream, "text/plain", fileName);
}
I want to call the action on a click of a table row using jQuery. But I'm a bit confused, because I don't think I want an Ajax call here do...
Hi, stackoverflow newbie here, so I'm hoping you can give me a warm welcoe by helping me with a problem. I've found several questions and answers similar to this, but none that are exactly what I need.
I'm pulling in some XML via AJAX (jquery) that I would like to be able to filter using checkboxes, etc. similar to sites like this:
http...
So I have a table of data, and I'm getting data back using ajax. When data is being retrieved, the data from the table disappears and a small little loading circle appears. I'd prefer for the data to stay (I know how to do that) and for the loading circle to appear over the table in the center of it (not necessarily vertically, just at l...
I am trying to pass a variable to a a function that I believe calls another function (I think) but am having problems. The variable I need to use in the second function is productid but several ways thAt I have tried have not worked. either a fix in javascript or Jquery will be great!!!
This is the line that I need the variable for
var...
I have a paragraphed named dialog I am trying to add content to via ajax. The element is positioned like so:
<div id="modal" style="height:100%; width:100%; position:fixed; z-index:1; left:0; top:0; display:none;">
<div style="position:fixed; top:50%; left:0; width:100%;">
<div style="height:150px; width:300px; margin:auto;">
...
I want to create a rule to match only on the following:
<ul id="root">
<li>
<a href="item.html">Root Menu Item</a>
</li>
</ul>
However it must not match if the "li" element contains another "ul" element:
<ul id="root">
<li>
<a href="#">Sub Menu</a>
<ul>
<li>
<a href="item.html">Sub Menu...
I have this need to show and hide a div if a checkbox is checked for multiple checkboxes.
Each div's id that needs to be shown will be the same as the checkboxes name. Is there an easy way to accomplish this without writing a function to handle each checkbox?
$('input[name=checkbox_1]').click(function() {
if ($('input[name...
I have two connect sortable lists. I want to fire an event when an item is moved away from it's current list but NOT into the other connected list or when the item is being sorted. Anyone know how to do that?
What I'm going for here is to have the user remove an item by dragging it away from the list.
...