jquery contextmenu not working with jquery blockUI
I am using 2 plugins of jquery which is contextmenu and blockUI, in asp.net. My requirement is that a context menu should be shown when user right clicks one of the columns of a gridview.And this gridview should be shown as a modal using blockUI.Now the context menu works fine when gridview is normally displayed on the page.But when the gridview is shown as a modal using block UI,the context menu is not working. Please suggest a good soultion for my problem. Thanks.
Looking for a sliding/moving/funky/sexy plugin
Hi there, Its my first post, so first of all, i would like to thanks the jquery community for all its work! This forum is very helpful! I just started to design a new website, and im looking for ideas and examples of jquery pugins. This is the home page: http://img42.imageshack.us/img42/872...te0000home.jpg So, the main idea is to make this a bit dynamic. Ive been searching and ive found some interesting plugins: - Scrollorama - Jqfloat - Parallax etc. But i cant find what im looking for. I would
How to change scrolling direction of this smoothDivScroll?
Hi, I have a code here using smoothDivScroll and I want to make two buttons to change the scrolling direction to the Right and to the Left. As far as I can see the code for changing the direction is already in there, but I do not know how to add a button.... This is the code: <!doctype html> <html> <head> <meta http-equiv="content-type" content="text/html;charset=iso-8859-1"> <title>Lab page - jQuery Smooth Div Scroll - Thomas Kahn</title> <meta charset="utf-8"> <!-- the CSS for Smooth
.find() does not find elements
Hello Community, I am new to jQuery and I came across a Problem with the find function. I got the following two lines in my code console.log($('ul.gallery')); console.log($("ul.gallery").find("img")); And the output in Opera Dragonfly looks like that As you can see, the find function does not find the img tags, but as you can also see, it is there. I don't know if this has something to do with that strange <::after> tag. And I don't know where this comes form. But I need a reference to that img
warnings with jquery 1.8
i hav a webapplication which uses jquery 1.7.2. i upgraded todo to 1.8 and in a special configuration of my application i have issues with jquery. i am testing with FF 14.0.1 on ubuntu 11.10. on loading i get a warning that a script is not responding: jquery.js:4980. i click on continue executing the script and my application works. when i reload my application again i get the same warning but the issue of jquery seems to be on a different place jquery.js:4865. and when i reload again: jquery.js:2299
Beginner....and I mean BEGINNER
Can anyone point me in the direction of jQuery tutorials that are for the absolute beginner? The tuts that are on this site are even over my head. I have very little programming experience and what I do have is mostly HTML. Thanks in advance.
using the .click() to slide toggle 2 divs
<script type="text/javascript" src="jquery-1.8.0.js"> $(document).ready(function(){ $("#edit").hide(); $(".show").click(function(){ $("#info").slideToggle("slow"); $("#edit").slideToggle("slow"); }); }); </script> As you can see, I have two divs with ids "info" and "edit" respectively and a button class called "show". Initially the #edit is hidden. Now on clicking the button, I want #edit to be shown and #info to be hidden. The code seems legit to me. I really don't understand why this isn't working.
jqGrid: possible to re-assign colNames and colModel upon paging?
Hi jqGrid users: My colNames and colModel change upon each paging. If you wonder why, it is because the grid data comes from dynamic crosstab, so I never know in advance how many columns I will have. I do know the maximum number of columns I can have. So, here is what I am doing: Get all possible column names into colNames (and colModel) and feed it to my jqGrid. In loadComplete (or gridComplete), I code to hide those columns that do not contain data. Then in onPaging, I code to show all colNames.
Problem jQuery scroller script
Hey, I'm quite new to jQuery, and i have a question about a script I'm using. I'm using the following script to make a div stay on top of the page when it hits the top. This works. <script>function moveScroller() { var a = function() { var b = $(window).scrollTop(); var d = $("#scroller-anchor").offset().top; var c=$("#scroller"); if (b>d) { c.css({position:"fixed",top:"0px"}) } else { if (b<=d) { c.css({position:"relative",top:""}) } } };
replace and Highlight single word or letter in node type 3
Hi, I'm trying to Highlight words in an iframe like this: $('p',$('iframe').contents()).each(function(){ $(this).find("* :contains('subject')").each(function(){ return this.nodeType==3; }).html(html().replace('subject','<span style=background-color:yellow>subject</span>')); }); I want to replace a letter or entire word with itself highlighted, but not having great results, Regards
How to Lazy Load div background images
Hello. As many of you know it is widely used to lazy load images. Now i want to use this as lazy load div background images. How can i do that ? I am currently able to use http://www.appelsiini.net/projects/lazyload that plugin So i need to modify it in a way that it will work with div backgrounds Need help. Thank you. The below part i suppose lazy loads images $self.one("appear", function() { if (!this.loaded) { if (settings.appear) {
Buttons in header do not always display as inline
The documentation says " Each button is typically an anchor element, but any valid button markup will work. To save space, buttons in toolbars are set to inline styling so the button is only as wide as the text and icons it contains. " but that does not always seem to be true. I have this markup: <!DOCTYPE html> <html> <head> <title>jQuery Mobile button test</title> <link rel="stylesheet" href="http://code.jquery.com/mobile/1.1.1/jquery.mobile-1.1.1.min.css" /> <script src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
SHOPPING CART
How can i get my items to add up when I drop them? Is there anyone out there that might be able to help me out? I have created my files and here is the link: http://resourcesonline.us/JAVA/2/store.html I would also like the trash button to empty the cart and then show the ".emptycart" div. I also want to create an Empty Your Cart Link I want to have this link click-able and open a "Dialog" popup, asking the user to confirm emptying their entire cart. any help would be greatly appreciated.
dataSelector breaks with 1.8
Just a warning to anyone using the popular dataSelector library, it breaks with jQuery 1.8.
Outside ready function
I already read some existing posts here and searched on google and still nothing. $(document).ready(function() { nav = function() { return { on: function(id) { $(id).addClass('test'); } } } }); How can i call the function on outside the document.ready. I also did try window.nav and $.nav and the effect is the same. It will only work if its in document.ready.
.click(.. doesn't work on some IE9? any solution?
I have code like below, but it seems the .click part doesn't work on some IE 9, any idea? how to solve it? thanks $('#M1_M2_M3_B_Z_wp_wph_pl_lpc_hr_gv1_ctl03_field_id_hr_button').click(function(event) event.preventDefault(); loadPopup($(this),...
[jQuery] animate two divs for a slide up effect
Hello, I am trying to animate two divs for a sliding effect. The div currently being shown in the window slides up as it should but the following div just appears without the animation. The code is: $('#np_current').css('overflow', 'auto'); var curHeight = "-"+getHeight($('#np_current')); $('#np_current').css('overflow', 'hidden'); $('#np_current').animate({'marginTop': curHeight}, 1000, function() {$(this).hide()}).removeAttr('id').attr('id',
How to get current element when right click mouse? thanks
I bind a context menu like below, I am wonderring how to get the element where the user right click on? $(doucment).bind('contectmenu',function(e){.... thanks
two strings comparing
I'm comparing two strings exactly equal, but this doesn't seem to work; var id='example1/example2' arrId=id.split('/'); $('div',$('iframe').contents()).each(function(){ var div=$(this); $.each(arrId, function(index, item) { $.each(div.attr('id').split('/'), function(i, l) { if(item==l) alert('equal') }); }); }); regards
Help with centering a slideshow
Hi, I am trying to use a Jquery slideshow plugin for my website and I can't figure out why the slideshow looks centered in one browser but not in another. For example in IE9 the slidshow is in the wrong position but in google chrome it looks fine. Can someone help me out? The website can be found here http://terpconnect.umd.edu/~cmccrea/Home.html and you can take a look at the source code. I think the problem lies somewhere in here... <style type="text/css"> /*** set the width and height to
Passing a variable (object) to the .on() function
I'm trying to bind an event handler for certain elements; past, present, and future (like the deprecated .live() function). I understand I can do this: $(document).on('click', 'input.clickable', function(){ // blah blah }); Where 'input.clickable' is a selector string. I'd like to be able to pass in an actual jQuery object instead, like this: var fancy_input = $(something).find('input.clickable'); $(document).on('click', fancy_input, function(){ // bloo blah blah }); It looks like that's
Change to ThemeRoller generated index.html
I recently discovered the URL imbedded in jquery-ui.xx-xx.css that can be used to edit the custom theme. Very Nice! However, I stumbled upon it at the very bottom of Getting_Started by accident. I wish I had known about it sooner. I manually added it to index.html for easy access in the future: I think it would be very useful to make this link part of the generated index.html .
Appending meta tags in header
JQuery n00b here, any help appreciated. I have a client who is very fussy about the order of her meta tags in the <head>. She wants a series of meta tags to appear right after <meta name="description" content="some stuff here"> rather than down toward the end of the <head> where the WordPress theme outputs it by default. Is there a way to do this in jQuery? Find the meta with name description (regardless of content) and after that tag closes, append some other tags? BTW, arguing the merits of why
i get the same id
I've 3 div. each one has a different id, when i try to right-click on one of this div and then on another I get always the same id in the console log. Why? $("#container").children("div").mousedown(function(event) { switch (event.which) { case 3: // RIGHT CLICK console.log(this.id); break; } });
get the div id from its contextMenu
$(function(){ $.contextMenu({ ..... ..... items: { "id": {name, this.id, icon: ""}, ..... this.id doesn't return the div id.
popup() : cancel the onclose event changePage ?
When I close the popup it appears to call changePage again. Is there any way to cancel this behaviour? Part of the problem is that the resulting changePage call does not seem to call pageShow. Typically I clear map icons on pageBeforeChange and then set a '.one()' handler to redraw the markers when pageShow is called. So when I close the popup() the markers are erased but not redrawn. Thanks! Edit: I am calling $page.popup('close') directly, not using data-rel="back" - but I guess it shouldn't matter.
Using goMap along with different plugins attached to a single webpage
Hello, I'm developing a website which has all of the webpages inside a single html file using "tabbed panels". I put all of the jQuery inside a file called allplugins.js which includes both the plugins and the calls to them, unfortunately when I embed goMap in that file, nothing works anymore. Here is the code: http://pastebin.com/pc5zkmdx I spent 3 days to understand what's wrong and I couldn't find any solution. Thank you in advance. Cheers, Deviad
Is it possible to show a page other than the first one in the DOM by default on a multi-page template?
Title says it all really: <div data-role="page" id="foo"> ... </div> <div data-role="page" id="bar"> ... </div> Any way to make "bar" show first without navigating to page#bar ?
jqm 1.2.0 alpha 1, changepage fired on select
Switching from 1.1 to 1.2.0 alpha 1 I got a regression : the select (with data-native-menu='false') triggers an unexpected "pagechange" event. My workaround is not complex, just avoiding to do something when 'from' and 'o' pages are identical in a pagechange handler, but finding the cause of this regression was tricky. I join the simple page for reproducing the issue.
Issue with entire table being clickable instead of a single row within a WEBGRID in MVC3
I have changed my application to incorporate a frontend changes. I have now created tables and within these tables, i have @RenderBody() When my webgrid shows upon my screen, the entire screen becomes clickable instead of just the individual rows within the WEBGRID. Here is my VIEW for the WEBGRID: @{ var grid = new WebGrid(Model, rowsPerPage: 5, defaultSort: "projectStatus"); } @using (Html.BeginForm()) { if (ViewBag.userTypeID == null)
Are thresholds available on swipeleft or swiperight?
I'll explain the issue. I have a list where each li has a swipeleft AND swiperight event attached. Both actions do different things. I'm getting the age old iphone HD screen issue where the threshold for the horizantal movement is too low at only 30px. BUT it seems that only the swipe event can have this threshold set... not the swipeleft or swiperight event. Is this correct? If so, how do i acheive what i am looking for? I have already tried setting the thresholds in my mobileinit method and i'm
Fix page
Hi, this one is not about fixing the toolbars, but about fixing the complete view. I do have a list view with a fixed header - works fine. What I would like to solve: the user could pull down the complete page including the header and the content. The user has to scroll to the top of the list and then pull down the list again - now I would expect that the list shows some empty space (or a reload area) but not that he pulls down the complete view showing a black background. This is very unusual on
Searchfield in data-role=header div defective on iPad
When using a searchfield outside a div, it works correctly. Even when placing a search field inside a div that has no datarole it works correctly. But as soon as one places a search field inside a div of type data-role="header" it breaks. The x at the right side is outside the field then and too far off. <div data-role="header" data-theme="f"> <input type="search" data-theme="d" name="sfield" id="sfield" /> </div> Any idea how to fix
popup() (alpha) with dynamic listview not working
I cannot seem to get the new popup() to work with a dynamically generated listview. When I try to run listview() on the <UL> I get errors in firebug: When I try $page.page(); I get "Node cannot be inserted at the specified point in the hierarchy" When I try $mUl.listview(); I get: "c[0] is undefined" Here is a jsfiddle link of the approximate code. The offending lines I tried are commented out in function displayPopup(): The problem is that the listview is not formatted. http://jsfiddle.net/jjunkin/rh55X/30/
UI Dialog buttons with jQuery UI 1.8.0 - empty text
Hi, I'm trying to apply buttons on dialog with the newest jQuery 1.8.0 But the button text is empty, see image bellow: It works fine with jQuery 1.7.2 but not with 1.8.0 Thank you for any kind of advice. Daniel
Change css on current URL
Hello, I have one CMS with fixed layout. In that I have make few changes depends on my current URL. If I am on my home page so This class given below is div.layout-column.column-main.with-column-1.with-column-2{ width:790; } And If I am of some other page so this same class look like this. div.layout-column.column-main.with-column-1.with-column-2{ width:790; } I have tried it but it's not working properly. <script> if (location.href.indexOf("example.com") == 1) { document.write("<style>" +
Need help returning value
Hi, I'm having a hard time figuring out how to return a value to a div. I have made this "like" script, so people can press a link, to like an article. (I call it stab instead of like - just fyi) The link is like this: <a href="stab.php?id='.$r['aid'].'" class="stabit" title="Stab it!"> This is my script: <script type="text/javascript"> $("a.stabit").click(function(event) { event.preventDefault(); $.get($(this).attr("href"), function(data) { $('#stabs_value').html(data); }); }); </script> That calls
get page and explode
Dear people , i am making a chrome extension and i need to explode this : <a href="http://www.one2xs.com/profiel/bekijk?gebruiker={a username}" >{a u sername}</a></span><br /><span class="topic-userstatus"> i need to get that url open explode it and get the number that stand before the word post en set that to the variable that is the username that stand in the get. is their a way that i can get the username and open the url explode it en write it in the page? Thanks a lot
Cycle plugin question
Hi All, I'm using a wordpress theme that includes the cycle plugin. Cycle cycles 3 predefined wordpress posts on the homepage, and it all works great. You can see the (very) initial version here. My question: How do i define when the post text is cut off with a MORE button? Currently it cuts off too low. Is it by defining the plugin height? Thanks yaron
Changing theme or color of radio button dyanmically
hi I am developing application using Jquery mobile in which I want 1)to change theme or color of radio button when radio button is selected. it possible or not in jquery mobile 2)I want to change the position of bullet of radio button which is by default displaying on left side.I want to display this on right side. I have Tried for both but its not working can any one solve this problem .
Next Page