It is simple and it works.But repeating it seems wasteful. I have a navigation menu that consists of an ordered list containing a group of list elements. This is a very common design pattern for navigation. Lets say that I want each list item to contain a div, and I want each div to be clickable.Yes, I know there is a usability issue there: relying on js to create hyperlinks is an ugly sin. But its easy enough to put an anchor element inside the "link div" for user agents without javascript. So here is our html:
So back to my problem:I want to make each div clickable. I could replicate my above js snippet for each one of the divs. But I know just enough about programming for that solution to seem kinda wrong.
We recently had our site redeveloped by a professional firm. We originally requested that users not be able to copy and paste text from our site. This has created an outcry and we would like to have text be selectable. I see that they achieved this by using jquery which I am not familiar. I believe that I have found the snippet of code that turns this ability off/on but I do not know how to write the correct code to allow selection of text. This is an IE specific issue, not a problem in Firefox. I have done some investigation online and found this: [URL]. It looks cut and dry but placing this solution in the js file does nothing.
I would like to make an hyperlink invisible, or disabled, with a click. The hyperlink opens a new window (target = _blank) and once the new window is shown, I don't want the hyperlink to be active anymore.
My problem mostly stems out of not knowing how to implement my problem, maybe someone in the jquery world can help. I need a grid to show a list of events. Think for example soccer matches. So for each you can pick the home team, draw or away team. The choice must be mutually exclusive for each match. My current solution has an extra column with a dropdown for your result.
I would like the actual items to be selectable. Im not forced to use a grid. A repeater would work too. The data source which is an object has the home and away team logo's, a match ID which is hidden from the user and a boolean value for home, draw and away. The latter boolean values are mutually exclusive.
So in essence I'd like to have a solution where you can click the home team logo and it will check the home boolean value and highlight the home team logo or select it in some way. The user should only see Home Team Logo, Draw and Away team logo and click on his pick. If he changes his selection then his old selection should be de-selected.
I've recently started working with jQuery. Using v1.3.1 and UI v1.6RC6. I created an accordion with another accordion nested within it. I've set both to selectable. Things seemed to be working fine until I noticed that IE and FF were behaving differently. IE allowed me to open the accordion tab that contained the nested accordion, and then allowed me to open up the nested accordion. In FF, I could not open the nested accordion. I managed to get it working in FF by setting the cancel property to li element (which contained the nested accordion). Questions:
1) I traced through the code and didn't see where jQuery unbound the click event that should have been caught by the accordion headers. The only thing that I can see is that the selectable items catch the mousedown event, and when caught create a helper div element at the same position that the mousedown occurred and at z-index 100. I've read elsewhere that a browser registers a click only if the mousedown and mouseup occurred on the same element. Does adding this element fool the browser into thinking there wasn't a click?
2) Following #1. I've read that event bubbling follows the DOM hierarchy - from child to parent, However, is it correct to assume that the target element initially determined by the element with the highest z-index (assuming all different)? Once triggered then event would bubble up ignoring z-index?
3) If #1 and #2 are fairly accurate, does anyone have any idea why IE would seem to still register a click event? Maybe it ignores the fact that another element with a higher z-indez was added and simply compares mousedown/up coordinates?
What I'm trying to do is fetching Selectable option from my "subcat.php" by get method. It works in Firefox 5.0 and Google Chrome but it doesn't work in IE 7. As far as I know onreadystatechange=function() seems to be not working in IE 7.
I am a JQuery newbie, and was asked to use jquery to do something like this: when clicking hyperlink A, it actually clicks hyperlink B? How to accomplish this using jquery?
I have an imagemap with a list of links to one side. The links highlight areas on the map by overlaying a PNG file, and the links need a "selected" state. The areas on the map need to be clickable too, and when these are clicked, the corresponding link item should get the "selected" state. I've got theselected state workingworking when the user clicks on the links, but can't get it working when they click on the map area.
$(document).ready(function(){ $('a.mapnav').click(function () { var divname= this.name;
[code]....
I checked that "linkname" contains the right text by displaying the label, and it does. All I need to know is how to select the relevant link and add the "selected" class when the imagemap area is clicked.
i came across this plugin [URL] and i thought that it be nice if i could manipulate the content recieved by making the hyperlinks linkable: it be something like select all that start with "http://" and wrap it with an anchor linking to this hyperlink but i have no idea how to do this through jquery
I'm having an issue with adding hyperlinks on images. Please see example below. Without hyperlink on images. [URL]. With hyperlink on images. [URL]. Why the descriptions under the images have disappeared with the hyperlinks on the images?
I have an unordered list of hyperlinks present in a right sidebar on each page where each list item is a specific topic. For example:
Drunk Driving Homicide Rape Molestation Etc.
Right now each of these simply hyperlinks to a page that contains a similar list with a few additions and those list items utilize the .load function to draw an external page for each topic into a div located below the list.
So, the sidebar list currently just links to 'crime.html' and 'crime.html' has a JQuery .load functionality built into the list of crimes that summons the respective topic pages into the target div. What I want to do is figure out a way where IF they click on one of the sidebar list items it takes them to the 'crime.html' and displays the specific topic they clicked on automatically in the target div. Right now anytime they click on the sidebar links (any of them) they merely take the person to the 'crime.html' page where would then have to select the topic again from the list that's present which then summons.. yep.. the external file into the target div. So, trying to eliminate that need for the 2nd click.
Here's the code I have on the 'crime.html' page that summons the external pages into the target div and provides some animation (fade in, out):
$(document).ready(function() { $('#crimecontent').load('prostitution.html'); $('.crimes li a').click(function() { var toLoad = $(this).attr('href');
[Code].....
Notice they all point to crime.html since I don't know how I can pass a specific topic to display. Therefore, they have to click again when they get to crime.html.
I have a cfm file that has a url that directs the page to another cfm pageI would like on clicking the url to call a coldfusion function befor going to the next pageexampleI have a component mycomponent
any one here familiar with GALLERIFFIC? i try insert my own hyperlink in slideshow container instead of �next image�, user may go to my own link when click on the large image, what should i edit? [URL]
I am looking for a plugin that will popup a full size image WITH HYPERLINK when user clicks the thumbnail image link. I found [url] is useful but I can't add the hyperlink to the full size popup image.
I have several classes named 'ratings_colored'. They all contain a number from 1 to 10. If the number is below 5.5, the number should become red. If not it should become green.
The code below works, but if the first .ratings_colored is higher than 5.5 it will make ALL the classes green. Even the numbers below 5.5! I tried using the 'this' but it didn't work either.