|
stack posted:tooltips
|
# ? Nov 26, 2009 00:37 |
|
|
# ? May 17, 2024 14:27 |
|
Looks like his site doesn't use the same version as is at github. http://github.com/lukasbob/Tooltip-Toolbox/blob/master/js/tooltip.js
|
# ? Nov 26, 2009 00:42 |
|
I've had great success with qtip for jQuery
|
# ? Nov 26, 2009 01:18 |
|
rt4 posted:I've had great success with qtip for jQuery Thanks! qTip looks really good.
|
# ? Nov 26, 2009 20:53 |
|
For some reason, I cannot get a span to display when I'm passing the name of it using selectedIndex. If I simply use onChange="Show_Stuff(this.display4)" it works. head: code:
body: code:
code:
|
# ? Dec 1, 2009 19:53 |
|
awdio posted:For some reason, I cannot get a span to display when I'm passing the name of it using selectedIndex. If I simply use onChange="Show_Stuff(this.display4)" it works. Off the top of my head, but this should work: code:
body: code:
|
# ? Dec 1, 2009 22:00 |
|
It does not work. I think it's because an options value, not a selected index value, needs to be passed somehow. Without it being so dynamic, this is what originally worked: onChange="Show_Stuff(display4)"
|
# ? Dec 1, 2009 23:00 |
|
awdio posted:It does not work. I think it's because an options value, not a selected index value, needs to be passed somehow. Without it being so dynamic, this is what originally worked: onChange="Show_Stuff(display4)" code:
Supervillin fucked around with this message at 02:00 on Dec 2, 2009 |
# ? Dec 2, 2009 01:56 |
|
Is there a simple way to ask "Are you sure if you want to leave (domain)" on any links clicked that don't match a whitelist of domains (maybe using onunload?) Googled, couldn't really find anything lightweight
|
# ? Dec 3, 2009 04:19 |
|
Elected by Dogs posted:Is there a simple way to ask "Are you sure if you want to leave (domain)" on any links clicked that don't match a whitelist of domains (maybe using onunload?) I think the best way to do this would be to add an onclick handler to all anchor tags. Something like this should work using jQuery: code:
You might also try onbeforeunload, but I don't think you can easily check the next page's url from within that event handler. peepsalot fucked around with this message at 04:52 on Dec 3, 2009 |
# ? Dec 3, 2009 04:50 |
|
Scrap the whitelist I guess.. PHP spits out different URL formats right now depending on where the domain is (/external_leaving?gotourl= final destination) Would it be easier to just make a function asking to click ok/cancel when a link is onclick=""'d?
|
# ? Dec 3, 2009 04:54 |
|
Elected by Dogs posted:Would it be easier to just make a function asking to click ok/cancel when a link is onclick=""'d? That's what peepsalot just showed you, actually. More specifically, (new RegExp(document.domain, 'i')).test(this.href) will tell you if the domain matches, and confirm(...) pops up the OK/Cancel dialog. I use that for an analytics script and it works goodish. For performance's sake you might want to do something like: code:
Edit: Whoops, misread the first question, the above will tell you if the link goes to somewhere other than the current page's domain. To whitelist you could use something like: code:
Supervillin fucked around with this message at 07:15 on Dec 3, 2009 |
# ? Dec 3, 2009 07:11 |
|
Supervillin posted:
|
# ? Dec 3, 2009 07:43 |
|
Supervillin posted:
I'm excited to get closer to a solution, but in your example ShowStuff(this[this.childNodes[this.selectedIndex].value); where does the missing bracket go? I tried all different sorts of combinations.
|
# ? Dec 3, 2009 17:16 |
|
I'm trying this and it's not confirming or asking anything:code:
(sorry, I'm a total newbie to JS)
|
# ? Dec 3, 2009 19:13 |
|
Elected by Dogs posted:any ideas what's wrong? Wrap the javascript in a document ready handler as shown below to get the click function working. Also the test condition in your if-statement evaluates to false so you wouldn't get to the confirm dialog anyway, I added an alert in an else-block that illustrates this. There might be some other problems (I didn't really get into the logic of what you were trying to do, just why the click function wasn't firing, and then why the confirm statement wasn't being reached once the click function was fixed). This should get you going: code:
Kekekela fucked around with this message at 22:29 on Dec 3, 2009 |
# ? Dec 3, 2009 21:43 |
|
awdio posted:I'm excited to get closer to a solution, but in your example ShowStuff(this[this.childNodes[this.selectedIndex].value); where does the missing bracket go? I tried all different sorts of combinations. Whoops! So this is why they always said "show your work" in math class. Didn't need the initial "this". code:
|
# ? Dec 4, 2009 04:36 |
|
Supervillin posted:Whoops! So this is why they always said "show your work" in math class. Didn't need the initial "this". Tried that... still nothing. I'm just trying to pass an options value. From what you mentioned above, shouldn't it be option.value?
|
# ? Dec 4, 2009 18:18 |
|
awdio posted:Tried that... still nothing. I'm just trying to pass an options value. From what you mentioned above, shouldn't it be option.value? this.options[this.selectedIndex].value Really, just google "get selected value with javascript"
|
# ? Dec 4, 2009 20:22 |
|
Lumpy posted:this.options[this.selectedIndex].value I have with no such luck yet. I really thank you guys for helping me out, and it's opened my mind a little bit. But try it if you want. It's not working for me. code:
LP0 ON FIRE fucked around with this message at 21:40 on Dec 4, 2009 |
# ? Dec 4, 2009 21:25 |
|
awdio posted:
|
# ? Dec 4, 2009 23:01 |
|
Just thought I'd share a snippet I've gotten a lot of mileage out of:code:
code:
|
# ? Dec 4, 2009 23:10 |
|
peepsalot posted:Your Show_Stuff function expects a DOM element parameter to be passed to it, and you're passing it the value attribute of an element(a string). Yup, that's why in the code I posted for him before I used getElementById to make a DOM object. I even put in console logging for him.
|
# ? Dec 4, 2009 23:22 |
|
I've got an issue where all the images I'm using in a jquery slideshow I've got on the page (images in a <ul>) all flash on the screen briefly when the page loads. Googling has led me to investigate using CSS to set all the images to be hidden and then using a javascript to automatically set them to unhidden on page load. The javascript I'm using (taken from an about.com page) As you can see below, the javascript as it is written requires an event to be triggered (link click) and a parameter passed to the script (of the element ID to affect). code:
code:
Can anyone lead me in the right direction or suggest a different strategy for tackling this problem? Thanks.
|
# ? Dec 4, 2009 23:39 |
|
Just use jQuery for it:code:
|
# ? Dec 5, 2009 00:56 |
|
epswing posted:Just thought I'd share a snippet I've gotten a lot of mileage out of: The location object already has all these properties
|
# ? Dec 5, 2009 01:43 |
|
well shiver me timbers
|
# ? Dec 5, 2009 01:51 |
|
Aye matey. Could still be useful as a function you pass urls into that aren't the current location.
|
# ? Dec 5, 2009 02:11 |
|
awdio posted:For some reason, I cannot get a span to display when I'm passing the name of it using selectedIndex. If I simply use onChange="Show_Stuff(this.display4)" it works. The following will display the element matching the selected ID attribute: code:
|
# ? Dec 5, 2009 06:56 |
|
jupo posted:Aye matey. ARRRRRR code:
|
# ? Dec 5, 2009 08:13 |
|
ronin109 posted:The following will display the element matching the selected ID attribute: Thanks!!! Works great.
|
# ? Dec 7, 2009 16:45 |
|
is there a good stand-alone interpreter for javascript, so I could write javascript scripts as replacement for perl or LISP scripts?
|
# ? Dec 7, 2009 17:19 |
|
RussianManiac posted:is there a good stand-alone interpreter for javascript, so I could write javascript scripts as replacement for perl or LISP scripts? I think you're looking for Rhino
|
# ? Dec 7, 2009 17:53 |
|
I hear V8 and Node.js are all the rage these days. Seems to be what most of the server side js guys are starting to standardize around. I've written very little server side js so YMMV. http://code.google.com/p/v8/ http://nodejs.org/
|
# ? Dec 7, 2009 20:19 |
|
RussianManiac posted:is there a good stand-alone interpreter for javascript, so I could write javascript scripts as replacement for perl or LISP scripts? You could also try spidermonkey
|
# ? Dec 7, 2009 20:51 |
|
SuckerPunched posted:Just use jQuery for it: Great suggestion, really appreciate it. Worked beautifully.
|
# ? Dec 8, 2009 01:08 |
|
I know absolutely nothing about javascript or really coding in general short of a semester or two 7 years back. We have a display that we want to cycle various web pages, scroll down them, then move to the next one after a short time. I've been able to google up something that'll do the 'cycle through pages' thing, but now I just need to figure out how to make it scroll vertically through the content. This is what I have now: code:
|
# ? Dec 16, 2009 21:46 |
|
NZAmoeba posted:How do I transplant that code into what I have to make it scroll down? Also is this going to get really difficult if I want it to scroll back up once it reaches the bottom?
|
# ? Dec 16, 2009 21:57 |
|
So I'm going to assume you guys have heard of the Google AJAX Feed API right? Pretty killer tool, but I'm having a small issue that really isnt that important, but I'd love to fix it soon. As I am sure most of you know, text overflow is handled pretty well in all browsers BUT Firefox... which seems a bit odd really, but for some reason, they are the only ones that don't offer a 'ellipsis' as an overflow option. So what I have is a plugin I discovered written in JQuery that apparently fixes these problems, but I can't get it to work because said plugin requires an ID be assigned to the link(s) that the Javascript file creates... and it's not fun to gently caress with. I won't bother with the plugin code because I prefer to not gently caress with it, but here is the code Google gave us: http://www.google.com/uds/solutions/dynamicfeed/gfdynamicfeedcontrol.js Now notice the class .gfg-listentry... that is the class that needs an 'id="one"' added in every time it is displayed... otherwise i get a nasty looking text-cutoff in Firefox. Any advice on how to do this or any easier way to accomplish what I need? Thanks.
|
# ? Dec 18, 2009 04:10 |
|
|
# ? May 17, 2024 14:27 |
|
NANERPUSS posted:So I'm going to assume you guys have heard of the Google AJAX Feed API right? Pretty killer tool, but I'm having a small issue that really isnt that important, but I'd love to fix it soon. Modify the plugin to select .gfg-listentry instead of #one ?
|
# ? Dec 18, 2009 15:36 |