finding keyboard connected to client system using jquery
hi all i have a requirement in which i need to find out whether the system in which the web page is running has a keybroad or not. as it may also be used for touch screens. so my question is. is there a way to access user system information to detect whether it has a keyboard or not or is there any other way or logic by which we can find out the touch screen monitors( not smartphones).
jquery hide show diviions in asp.net
hi all, i've one problem with the jquery i am hiding a <div> using style=display:none; and when i clicked a button whose id is lnkbtnUnitAdd, i want to show the above div but i've written some code on OnClick event of the button, since the below function is returning false, i am not able to execute the code on server side, can anyone tell me how to execute the both functions, when i set the return =true; the div tag is not clearly seen and more over it just showing up and closing (like toggle) I've
Building Marquee element using jQuery
Hello guys I wanted to wrap my rss feeds with Marquee element in order to make them move! But I wasn't ablr to do that :( The script is here: $(document).ready(function () { $('span.marquee:first').before('<marquee>'); $('span.marquee:last').after('</marquee>'); });And the html code is here: <span class="marquee">First Subject</span> <span class="marquee">Second Subject</span>Thanks a lot in advance...
Lightbox for Dummies???
Hello all, I'm a raw newbie trying to implement jquery Lightbox on a page. I relied on psd2css to build most of my page, since I'm not a programmer or scripter and need all the help I can get. Psd2css takes a photoshop document and converts its layers - when they are named according to its specifications- into html and css, in this case into a lightbox gallery. I ran into a problem because I assumed that I could add in a couple "place holder" layers where I could later add thumbs and a lightbox
Events from a datepicker
Hello, My newest quest has been tough to get my hear around... I have not found a thread here to get me on the right path in my situation. I have a single inline datepicker. I have it so the selected date will show in 3 DIV's. One for the day ("DD, d"), the other for the month ("MM"), and then the Year ("yy"). <script type="text/javascript"> $(document).ready(function () { $( "#datepicker" ).datepicker({ onSelect: function(dateText, inst) { //formatDate Requires a new date
jquery flexigrid & javascript problem
hey all, I am modifying the flexigrid to do on-the-fly search I came up to the line that activates the search, it was like this : $('input[name=q],select[name=qtype]',g.sDiv).keydown(function(e){ if(e.keyCode==13) g.doSearch()}); I removed the if(e.keyCode==13) condition to make it fetch the data with every keydown. problem is, it seems to fetch the old data. I have no idea why this is, I think it might be related to some jquery/flexigrid event that clears the list before it re-fetches information
Text Links Trapped, But Not Image Links
I have an image wrapped inside a link tag. <a href="somepage.html"><img id="content" src="img/some.gif" /></a> I want this .click target to be the link: $('a').click(function(e){ Instead, the target returned is the image [HTMLImageElement]. I have tried using closest() and currentTarget: var url = (e.target).closest('a').href; var url = (e.currentTarget).closest('a').href; var url = (e.currentTarget).href; But they all still return the image, not the link. Any suggestions?
problem with Autocomplete plus Javascript to change some <p> text
I'm real new at this. I have a 1 tier Autocomplete working (below), thanks to a tutorial from Jensbits.com. It autocompletes town names and adds the county from a MySQL database. When I added some Javascript to change an instruction phrase based on the town selection, the Autocomplete stopped working and the JS change does not function either. The JS is assembled from several other tutorials, but I must not have it correct. Corrections would be appreciated. Please be very specific because I
onmouseover opening in different div script
Hi, Please can someone answer to my request below: Using a mouse over on : div (left content) to execute or start a script on the div (right content). Is this possible? If there are questions for more explanation about this problem, i will reply! Thanks for your help! regards, Jim
how to pas json data to webmethod using jquery ajax
in asp.net i have on web method which tales list of patient as an argument how to pass this list using jquery my code is function testsave() { $.ajax({ type: "POST", url: "Default.aspx/tests", contentType: "application/json; charset=utf-8", dataType: "json", data: dtata.d, //"{'pes':'" + dtata + "'}", async: false, success: function (response) { }, error: function () { alert("Error"); } }); but getting error
Firebug message not understood, Help!
Hi, I 'm getting this firebug error and, that's is about as much as I can understand. The balance would probably make more sense to me if it were in some obscure Burmese dialect or Serbo-Croatian, please help me, tell me what I need here: This is the error message copied from FB and the source code in my doc head: Error: missing } after property list Source File: http://127.0.0.1/Joomla/ Line: 33, Column: 202 Source Code: jQuery(function($){ $("ul.sf-menu bamboo").superfish({hoverClass:'hover', pathClass:'active',
Linkable image movement? (Explained in post)
I'm wondering if with Jquery you can create an animation where an image moves, but is linkable. I've been looking around and found some tutorials on image animation with Jquery, but nothing about if you can make them linkable. What I want to do is, on a layout I am designing I have tabs on the design that I made graphically and will be images, and I'd like to code it so that the tabs slide "out" to the left and link to a page. I want it to be like you are "pulling" the tab you put your cursor over
How to use jquery for repeating elements in every page of my site? (plain HTML)
Hi everyone. I want to repeat 3 .html file in every page of my site. (header.html, footer.html and navigation.html), I read something about php's include() function. but I like to use JQuery's .ajax() or get() function. How can I do that? Thanks,
How can I get width from neighbour item, and not from the first one in code?
Hello. I have this jQuery code: var imgwidth = $('img').width() $('div').css('left', imgwidth); It works well. But only if there is just one div & img pair. If three is second pair, value of imgwidth are the one of the first item and all divs are left positioned the same way. <table> <tr> <td> <img src="1.png" /> <div></div> </td> <td> <img src="2.png" /> <div></div> </td> </tr> </table> What should I do with my example to get div to be left as more as its neighbour img width are? Thanks for attention.
Using ajax-loaded data by html()
Hi there, I'm new to jQuery, I red the FAQ and some tutorials.. now I ended up with this: $('#food_rate').load('/ajax.php?x=get_food'); $('#tax_rate').load('/ajax.php?x=get_tax'); $('#mood').html(function(){ return ($('#food_rate').html()-$('#tax_rate').html())*10; }); $('#mood').html always contains the value of the values food_rate and tax_rate had before I loaded the new values in. (Before Line 1 and 2 happen) I already red, about event bubbling and event delegation,
J_Query + Form
Dear buddies, I am very new to JQuery. I need to create a form, which will take username and email id and store it in a text/csv file. I do not want to use PHP/ASP. I am familiar with Java script. Is there a way I could do this? Please guide me. Thanks a lot. Alagu
joomla with superfish menu
hi, i´m using superfish menu in joomla. i try to make it a completely horizontal navbar. that means that the second sublevelmenu should also be horizontal and start left at the beginning of the menu and not directly under the "hovered" menu. <ul style="display: none; visibility: hidden;"> Where can I find this attributes? I tried with firebug to change it into: <ul style="display: block; visibility: visible; margin-left:-75px; position:absolute;"> Thanks for your help
Getting Rel Attr value from <p> with an ID when parent TD is clicked
Not really sure how the best way to start explaining this, but I have a small script set up that activates a second section to an accordion to display information. The idea is that a table cell will be clicked and then the second according will activate displaying information relating to the cell that was clicked in accordion part 1. I have managed to get it to update coding in the var's by hand, now I want to be able to get certain bits of information from a nested div that is hidden in the table
Toggle Class
Hi Everyone, Ive a quick question if someone could help me with. I have a simple toggle effect on my menu. Its similar to an accordian effect, but I want the user to be able to open as many links as possible. That is why I went for the Toggle effect instead of the accordian UI effect. But my question is, when a user clicks on a page. I want the toggle menu to be open on default. So it displays all the sublinks. and they can toggle all the other links but whatever page they are on it is open on default.
interactive map
Hi everyone, I created a interactive map viewer like Google maps using my own custom map image and using Mapbox plugin with zooming and panning functionality, and this is what I want to do next: On clicking a location on the map, a small popup displayed showing some data(info or link) so if someone could help how to do this, any idea or advice? I am a new to jquery but I am learning fast. I find some solutions to ad multiple links on one image,but if you take a look how mapbox plugin work, I need
Selectors list and undocumented behaviour
Hi to everyone, I've noticed that using an object as last selector, then the *children* of the element represented by this object are selected. AFAIK both both selectors should be used as described into the documentation[0]. I think it may be a context related feature, but why isn't it documented? Am I missing something? E.g. $outer = $('selector1'); $inner = $('inner', $outer); Thanks in advance for any explanation. Regards, Claudio M. Alessi [0] http://api.jquery.com/multiple-selector/
help me understand this interaction between hover and find
I have a simple block of code that uses hover to apply a slideUp and slideDown. For some reason using $(this).child('p') I can't access the nested paragraph tag. But switching to $(this).find('p') works? Why is this, i tried several different selectors that would have worked in other situations, but these would not work with hover. What is going on here? $('#wrap ul li p').hide(); $('#wrap ul li').hover(function(){ $(this).find('p').slideDown( 300 ); },function(){ $(this).find('p').slideUp(
How do I carry the HREF of a link through my jQuery function?
I should not be coding, to be honest, I know nothing about it ... I have a link: <a href="linkedfile.html">LINK</a> I want the HREF value to be carried through my jQuery function. The function goes as follows: User clicks link Linked icons fade out and reappear smaller at the top of the page Link HREF is followed The new page will have the logos in the same place as they fade out too and content will appear in a frame below. However, I am clueless when it comes to Ajax and jQuery and would really
Refreshing in Chrome
Apologies if this is something asked before - I've tried several searches so far without success. I have a page with a bunch of divs containing pictures with captions below and I used the following to make them all the size of the largest: $(document).ready(function() { var maxHeight = 0; $(".photo-thumb").each(function(){ if ($(this).height() > maxHeight) { maxHeight = $(this).height(); } }); $(".photo-thumb").height(maxHeight);
$.ajax is not working in safari why?
Why my below code not working in safari? below code does not call my page method, but its working on IE, as well as in FireFox my method is calling but alert message does not show. Why? var options = { type: "POST", url: "Test.aspx/SendMessage", data: "{'toMailAddress':'" + val + "','rno':'" + rno+ "', 'nonrno':'" + nonrno+ "'}", contentType: "application/json; charset=utf-8", dataType: "json", success: function (response) {
callback chaining
I'm trying to make the fancybox method to call when the xml ajax is loaded. I've done callbacks on simpler statements, but I can't seem to find the right spot to put it. Any help would be appreciated! <script type="text/javascript"> $(function () { $.ajax({ type: "GET", url: "http://drmartinplasticsurgery.mindbox360.com/images/BeforeAfter/face/PhotoGallery.xml", // replace with absolute URL of your gallery's xml file dataType: "xml",
Applying a class to a link when hovering a different link
This what I have; $('a.toggleLink').mouseover(function() { $('.togglelink').addClass('.hover'); }); 'toggleLink' and 'togglelink' are two different classes, could this be causing problems? Basically I want to apply the class of hover to togglelink when toggleLink is mouseover-d. I'm guessing it's wrong as it isn't working but could someone let me know where im going wrong and how to fix it. Thanks.
jquery maths and vars
I'm having a tough time with this. I would like to scroll a div from left to right accross the browser window no matter what size the window is. I'm have a problem with the syntax, I think my logic is correct. I get the screen size and place it in a var, I place the div off the left side of the screen with css, I animate the div accross the screen using the screen value + the div size so that it will clear the right side of the screen completely, I then animate it back to its starting position by
jQuery And $_GET[] variables in php Problem..
Hello! every body.. I have this echo in PHP echo "<tr class=\"d".($i & 1)."\"> <td class=\"TrConf\">{$row['username']}</td> <td class=\"TrConf\">{$row['tmima_name']}</td> <td class=\"TrConf\" align=\"center\"><a href=\"{$_SERVER['PHP_SELF']}?action=delete&id={$row['id']}\" > [DELETE]</a> <a href=\"{$_SERVER['PHP_SELF']}?action=edit&id={$row['id']}\" onclick=\"$('#example').fadeIn('slow')\"> [EDIT]</a></td></tr>"; here is the jquery script <script>
Jquery inArray function always returns -1
In Firebug when I rollover the SelectList variable it certainly looks like an array. if (GroupList != "") { $('select[name^=DDLColumns1] option').each(function(){ if ($(this).val() != "-1") { var ItemsArray = $(this).val().split('|'); var DataTypes = ItemsArray[1]; var TestItem = "[" + ItemsArray[0] + "]"; PROBLEM IS HERE---> if (jQuery.inArray(TestItem, SelectList) != -1) { if(DataTypes == 104) NewSelectList
from where i should start work on jquery?
Hi friends, I am new in jQuery i never used jQuery and also new in development field anybody can tell me how can i start using jquery in my project. I am working in asp.net web application .net 2008 ver 3.5. and give me some link or article for using jquery easily. Thanks Shiv
IE7 / IE8 scroll bar not recalculating content height, when using .slideToggle();
Hi, IE7 / IE8 scroll bar is not recalculating content height, when using .slideToggle(); so content panels when expanded are lost off the bottom of the page - see screenshot. Has anyone else had this problem? What is the fix? I have tested in Chrome, firefox, opera (it even works in IE6) just not IE 7 and 8... I have attached a screenshot. The weird thing is the slider I am using for the areas causing the problem (pictured) I am using because they allow multiple instances of the slider on the page.
Reducing jquery by 95%
Hi, I purchased webspace that allows me to write and upload custom javascript code. There are rules however such as no "src=", "includes", "replace", or remote script calling, to mention a few. Also the maximum allowed custom code is 40kb. So the site doesn't permit me to reference jquery as such: src="http://code.jquery.com/jquery-1.4.4.min.js" nor does it allow me to copy and paste the minified version (too big). However, all I need jquery for (at this time) is to add classes to elements by traversing
Does sortable() connectedsortable mean there can only be two lists?
Does sortable() connectedsortable mean there can only be two lists? I want a page with many lists where each list can be the either the origin or the landing of the drag-drop. Thanks
Replase character string to html
Hi. I have <ul id="some_id"> <li><a href="#"><span>some text || some text1</span></a></li> </ul> I need to replace it with <ul id="some_id"> <li><a href="#"><span class="some_class">some text</span><span class="some_class1">some_text1</span></a></li> </ul> or just <ul id="some_id"> <li><a href="#"><span>some text<span class="some_class1">some_text1</span></span></a></li> </ul> in case what text is dinamic
binding two elements together....sort of
Hey Folks, here's something I'm trying to do.... I have this HTML code which is on the page. (image with anchor tag around it) <a href="javascript:" class="bookmark_this"><img class="bookmark" src="/images/spacer.gif" alt="Bookmark and Share" title="Bookmark and Share" style="width:79px;height:18px;" /></a> popup code <div id="bookmark"> -- bookmark code -- </div> when I hover over it, a Popup appears with bookmark options. What I'd like to do, is for the popup to automatically disappear on moveout
Button to images using jquery?
Hi, Small problem with button clicking... #button1 says "red colour" and #button2 is a button that says "blue colour" and it should display to whatever colour depending on what button you press. ATM it will display if you click red and then blue but you cant then re-click red, or if you do it blue and then red it wount work if you then click on red. Any idea's where i am going wrong ( hope you understand) Thanks $(document).ready(function(){ var margin =$("#image2").height()/2; var height=$("#image2").height();
.post question... how to post back a variable?
Hi, I am trying to write code to allow a person select one photo to be their base image or Front cover image on a photo album. I am using jquery .post to get the form check box values which are the image file names and then use post to throw them to a php file and then update the database. Now thats cool so far and that part works. Now the problem is that I need the main photo album picture to be replaced once the .post if completed or succeeded. I need to refresh the main image. Right now the
Problem with image horizontal.
I have some problem to get this image in a straight horizontal line. And not in a vertical line. It works well if i remove div title="" but i need that line for my eventghost ajax. <h3>Select</h3> <div data-role="content"> <div data-role="controlgroup" data-type="horizontal"> <div title="Select1"><img src="Pic1.gif"></div> <div title="Select2"><img src="Pic2.gif"></div> <div title="Select3"><img src="Pic3.gif"></div> <div title="Select4"><img
Don't know which jquery files to attach so that I can use the datepicker plugin
I'm new to this and i'm trying to use the jquery datepicker plugin. What I want to know is which files to download and in what folders should i put them so that i can use it. I've been using date picker by linking to external js files but i'm trying to figure which files to save on my computer. I'd appreciate it if anyone can help me.
Next Page