Jquery value to java
HI Please somebody help with this :) I need get count all " texetarea" with attr "wicket:id" to some "var d;" and this "d" pass to java ????
Binding a treeview inside a context menu
function initTrees() { $("#mixed").treeview({ url: "source.php", }); } $(document).ready( function() { initTrees(); $("#myList UL LI").contextMenu({ menu: 'myMenu' }, function(asd,asd ,asd ) { }); }); <body> <div id="myList"> <ul> <li>Item 1</li> <li>Item 2</li> </ul> </div> <ul id="myMenu" class="contextMenu"> <ul id="mixed"> <li><span>Event 1</span> <ul> <li><span>Event 1.1</span> <ul> <li><span>Event 1.1.1</span></li> </ul> </li> <li><span>Event 1.2</span></li> </ul> </li> <li id="36" class="hasChildren">
how to bind focus and blur to a new element?
Hi, I am having trouble binding focus and blur to new elements. I have the following HTML code: <div class="ticket"> <input class="firstname" name="firstname[]" title="First Name(s)" value="" /> <input class="lastname" name="lastname[]" title="Last Name" value="" /> <a href="#"><img src="/images/admin/DeleteRed.png" /></a> OR <a href="#" class="add">Add more</a> </div> I then have the following jquery code attached to 'Add more' hyperlink: $("body").on("click",
jquery sortable not working well with li widths
I can use jquery to sort an individual list and sort between lists. However when I attempt to do both, the individual sort works really poorly. (Seemingly can only find room at the end) It seems has to do with specifying the width of the li. Any ideas. Thanks all - ive been struggling for too long. Website its located at is : http://s95311055.onlinehome.us/midwives2012/sortFields-test.php <script> $(function() { $( "#category1, #category2, #category3,#removed" ).sortable({items: "li:not(.ui-state-disabled)"}).disableSelection();
Trying to Enable Insertion of Black Overlay Div on Successful e-mail submission
Hello everyone, I have a question that pertains to inserting a div that disables all the elements inside the body of the page and has an opaque black overlay while displaying a 2nd confirmation form on top of it. I have placed the second form outside of the page's container div. The jQuery involved starts with a .submit() event listener which fires off an .ajax request to a PHP script that tests the user's submission and removes any harmful hijacking code (I believe this may be where the jQuery is
Filtering Wordpress posts by category without reload (jquery?)
I've been looking around for a way to filter my posts on http://www.waziproject.com/wazimagazine/ without reloading the page. I've had a look at jquery / json & ajax and / or a combination of these. Without avail... The Isotope and Quicksand plugins only allow for the use of 5 categories apparently. So my question is if anyone can help me out to turn the following (see code below) into a list of filters that don't require refresh/reload of the page... The Ajax solution I believe the following answer
JQuery after ajax postback (jquery events missing)
Hi, I've got a problem that've seen a lot around, although I have not seen a good solution for it. I've got an ajax form (a partial view). When the form is posted and the response reparsed by the browser (ie, the DOM recreated, but only for the partial view) all jquery events on that partial view are missing. Obviously the orginal DOM was destroyed and a new one is build, but shouldn't the new DOM objects be automatically bound to their corresponding events? Some solutions I've seen: 1. to use "on"
need help in query
hi i have below situation: <div id="1"> <img class="close"> </div> <div id="2"> <img class="close"> </div> like this multiple divs which have same image. now i want to write a jquery function, the divs which has these image, on clicking of the image, divs should hide. i want generalize function.. $(this) wont work.so what should i give here.. $(".close").click(function() { $(this).hide(); });
Scrolling text from right to left
Hello; I want the text to scrol from right to left. The text is dynamic from database. What would be the best solution? <div style="width:300px">Dynamic Text Goes Here</div> Thanks
insertAfter strange behavior
I'm trying to move a div that contains an object element that contains a JW Player. The div looks like this, where it's currently nestled between some p elements: The view above is from the Firebug HTML panel. The jQuery I'm using is $('#container_wrapper').insertAfter('p#crown_li'); After this executes, the player is no longer visible and the HTML looks like this: The div and the object moved to where they should have, but the object element is faded and it no longer displays
hi need help here .. writing a function using query
i have below scenario: <div1> <div2> <div3> all are clickable <div1> click -> <div4> opens, <div5>should hide <div2> click -> <div5> opens, <div4> should hide now on clicking <div4>, <div6> opens everything else should hide. i have written jquery for this, but in separate functons using all div ids separately.. i want to club this up and make a single function.. please tell me hw to do so.. thanks!
Event delegation confirmation
i used to know that this is better $('ul.parent').click(function(e){ if(e.target.nodeName === 'A'){ //the event will bubble [speed optimization] //instead of using $('a').click(function(){$(this).whatever}) } }); in try.jquery.com they say $('ul.parent').on('click','a',function(){...}) // is this the same
T-shirt designer
Hello I really need a t-shirt designer. I have searched the web after a script to use but can not find any. Does anyone in here know of a script? Or can you point me in right direction where to start if I try to build one myself. I know a bit of C# and MVC. The designer have to do this Upload and save pictrures of shirts. Add text to shirts and edit the text such as font, size and color. Have categories with our own prints and just click on them to add to the shirt. Resize, rotate and crop images.
Can anyone help me please... i'm trying to use class instead of Id but class is not working.
<td> <?php $academics=mysql_query("SELECT * FROM tb_academic"); ?> <select onChange="showsub(this.value)" class="required search" id="" name="level"><option>--Select a level--</option> <?php while($row=mysql_fetch_array($academics)) { ?> <option id="<?php echo $row['id']; ?>" value="<?php echo $row['academiclevel'];
switching e.preventDefault() on and off so swipe works on android
Here's a snippet of code that triggers events on swipe left and swipe right. the problem is with androids then need e.preventDefault() to be called to ensure this can happen according to http://code.google.com/p/android/issues/detail?can=2&start=0&num=100&q=&colspec=ID%20Type%20Status%20Owner%20Summary%20Stars&groupby=&sort=&id=4549 Here is my code var maxTime = 1000, // allow movement if < 1000 ms (1 sec) maxDistance = 50, // swipe movement of 50 pixels triggers the swipe target
Upvote & DownVote
Can someonepoint me in the right direction on how one would do this. Basically you vote on something. The ones with the highest votes go on the top. Ones with the least. on the bottom. thanks
Usage for Attr
I am trying to this on a input tag that is a type password and changing it to text, but the below line crashes my script but it work when i use prop instead anyone know why? does not work $(selector).attr('type','text'); works $(selector).prop('type','text');
Navigation may not work if viewed locally
Hi., I need page silde transition effects in offline..... It's not working in offline.... its showing like this.... Note: Navigation may not work if viewed locally The AJAX-based navigation used throughout the jQuery Mobile docs may need to be viewed on a web server to work in certain browsers. If you see an error message when you click a link, try a different browser or view help.
I am trying to populate dropdownlist based on the selection of another dropdown list.
Hi sir, I am trying to populate dropdownlist based on the selection of another dropdown list. But it is not showing the mapping values. Please check it where i am doing the mistake and this is my code. <script type="text/javascript"> $(document).ready(function () { $('#drpCategory').change(function () { var drpCategory = $(this).val(); //$.getJSON('<%= ResolveUrl("~/Recommendation/GetCategoryId/")%>' + $("#drpCategory > option:selected").attr("value"), function (data) { $.getJSON('<%= ResolveUrl("~/Recommendation/GetCategoryId/")%>'
how to use jquery that display the record from the database?
Great day! Kindly help me sir/madam.. heres my code: $('form').validate({ rules: { order_numbr:{ required: true, ordrNum:true }, jQuery.validator.addMethod("ordrNum",function(value,element){ var isExist=false; $.ajax({ type : "POST", async: false, data : "action=checkOrdrNum&id=0&orderno=" + value, url : ajaxurl, dataType:"json", success: function (data) {
Telerik RadGrid cant able to get the id on client side
hi, i need to get the RadGrid id on client side,but i cant able to get the selected row value i am using this code for get the id but its not working,returns the null value function GetSelectedNames() { alert('hello'); var grid = $('#<%# RadGrid1.ClientID %>'); alert(grid); var MasterTable = grid.get_masterTableView(); var selectedRows = MasterTable.get_selectedItems(); for (var i = 0; i < selectedRows.length; i++) { var row =
convert jquery object to javascripb string variable
Is there a means to convert a jquery variable to a javascript variable? for example: i have a jquery variable that I am attempting to assign to a javascript variable so I can use standard javascript methods on. var b = $(b1).text(); b = b.replace(.....) this is not permitted. The text object in jQuery is not the same as a string variable in javascript. Thanks in advance
Change
Hi everyone I'm trying to combine two codes. 1.) Code for append parameter to every href: $(function() { $("a").attr('href', function(i, h) { return h + (h.indexOf('?') != -1 ? "&ajax=1" : "?ajax=1"); }); }); Source (http://stackoverflow.com/questions/2667551/add-parameter-to-links-on-page-using-jquery) 2) Code to make selection within a iframe $("iframe").contents().find("textarea").keydown(...) Source (http://stackoverflow.com/questions/2893280/jquery-select-iframe-children)
Why do we wrap plugin source code with function($)??
The document on jQuery official site documentation metion nothing about it but yet everyone wrap it like that. (function($) { //plugin code })(jQuery); I make my own plugin without wrapping it, it still works. So what is this about?
Help Pleas Help
i use jQuery in Joomla Cms (in a custom module) but events like "on click ..." does not work this works $('.mydiv').css('padding','100px'); this does NOT work $('.mydiv').on('click',function(){$('.mydiv').css('padding','100px');}); wat do you guse the probable reason is ? tx
Parse XML to ordered list
I'm using the following code to parse my XML document into an unordered list. When the code complete's, I get "undefined" in both my hyperlink and text field. Below is an example of my XML and my HTML. <?xml version="1.0" encoding="UTF-8"?> <rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0"> <channel> <title>News
Selector for elements, containing/starts with custom data attribute
Hi I have a couple of elements like <p data-lang-bg="Bulgarian" data-lang-en="English" >Text</p> <p data-lang-bg="Other bulgarian text" data-lang-en="Other english text" >Text 2</p> I have a difficulties writing a jQuery selector, that will select all elements, who have data attributes starting with data-lang . Is it possible to write such a jQuery selector
adding somthing in a div while looping ajax things
Hi, I have to loop ajax requests and to add a dot into a div each time. For example : for (var i=0; i < 100; i++) { jQuery ('#mydiv').append ('.'); jQuery.ajax ({ async: false, ... }); ); With firefox, everything works well but with others browsers (safari, rockmelt, etc.) my dots are displayed only at the end of the loop... Could someone help me ? Thanks.
button interval after some time
i have buttons (0 or more) that loaded, i want after XXX seconds, to change which of them is disabled , and change to enabled. this buttons loaded at run time from server side code (asp.net). 10X for the help.
How can I use jQuery clone() on form objects and integrate json response as variables?
I tried asking this over at stackexchange but didn't get any responses. I'm hoping someone here can point me in the right directions, so here goes: Ok, my objective is: To clone an entire DIV and it's contents, INCLUDING all the javascript inside of it AND integrate the json response as variables. If I understand right, jQuery .clone() should be able to accomplish this, although I'm having trouble finding working examples of it. However, what complicates my clone further, is that I want to clone
Using "and" while querying on attributes?
Hi, I want to search for checkboxes that are checked AND have a certain data-* attribute The HTML <input id="SomeId" type="checkbox" name="MyGridName1" data-companyId="45456" /> //--This finds the checked boxes but finds all of them... $("#SomeId input[type=checkbox]:checked").length 5 //--I want to combine the query to search for both attribute values...but couldn't get it to work $("#SomeId input[type=checkbox]:checked input[data-companyId='45456']").length 0 //--I ended up doing this but thought
Changing the order of images in html
Yo! Would you be able to tell me the best way to get the following images to change the order in which they are positioned in html? <div class="main"> <a class="product" href="#"><img class="hider" alt="" title="" src="img2.jpg"></a> <a class="product" href="#"><img class="hider" alt="" title="" src="img3.jpg"></a> <a class="product" href="#"><img class="displayer" alt="" title="" src="img1.jpg"></a> </div> I want to get img1.jpg with the class displayer to be before the images with class hider so
Sliding div menu
I am trying to create a menu, it is just a plain div and each menu item is an image link. I do not want the menu to be displayed when the page loads but rather when the user slides the mouse to the top edge of the screen(web browser), I am a total nuub and do not know how to go about it but i am designing an asp.net website and would really like to implement this feature. this is the css for the menu: #top_nav { background-color: black; width: 100%; height: 70px; float: left;
fade out image on hover and show some hrefs on top of it
i am in dire need of showing 5 hrefs on top of an image on hover of it. the image would be in faded colored background, and on mouseout hrefs will disappear and image will be 100% visible the closest i could do is <style>#option { display: none; }</style> <div id="container" class="cont"> <a href="#" id="username" class="nomeutente" title=""> Stefano Imparato </a> </div> <div id="options" > <a href="#" id="user" title="">usr</a> </br> <a href="#" title="">impostazioni</a> </br> <a href="#"
load/get/post syntax
is it possible to take this post("someurl",somefunction()); and write it in a longhand way, like you would for a ajax or a long animate command, like this post({ url:someurl, success:somefunction() }); if yes can someone provide me an example so i can see the exact correct syntax
Object disparition when setting its size
Hello Here is my issue : I have one global resize function when the window is resized, and I also call this function as soon as my document is ready. This treatment consists in absolute positionning of various <object> on the screen with regards to the window current size. $(document).ready(function() { ... $(window).resize(); ... }); $(window).resize(function() { ... }; When I load my page, my screen seams to be empty, as if <object> were hidden, but if a resize my window, objects appear properly
Serialize Dynamic Form
I am having trouble serializing inputs from a dynamic form and when I inspect the element using firebug it doesn't appear the value is being updated as well. Dynamic creation of the form $(document).on('click',"#userlists",function() { var userID = $("#userlists").val().replace("#",""); $.ajax({ type:'Get', url: 'http://localhost:8080/sdd/user/'+userID, dataType: 'jsonp',
Onclick refresh div content based on the selected values without reloading a new page.
Hello; I use sliders as filter to show list of hotels based on the selected price range value on the sliders here. The sliders are located on the right side bar. They work fine with no problems. The good thing about them is that they do not reload a whole new page on the div. Problem: Now I also need to use another filter and that is "star type". So the user can choose to see the hotels with 1,2,3,4,5 or 6 stars. I have already made that part working as well but the problem is the way I have coded
Multiple animations on one element
/o\ I'm super new to jquery, so this is probably butchered terribly: http://jsfiddle.net/mJj7U/ I'm trying to make this float with jqfloat (works great), pulsate with a resize animation (works once), and twinkle with an opacity animation (doesn't work at all). I'm sure I'm doing something wrong with the structure, as they each work fine on their own. Although I also can't get the pulsate and twinkle to keep animating infinitely. It'll only go once. How can I make all animations start at once, and
load vs post
I have been reading the documentation on load and post. it seams the only differences are that A) with load you place an element in front of it and it automatically inserts the retrieved data into that element but post does not do this so you have to write this behavior into the callback function. B) post sends the data via POST and load does it via GET (the get function would send it via GET but the get function does not have a parameter for sending any data to the server so in this way it is massively
Next Page