Closed (fixed)
Project:
Views (for Drupal 7)
Version:
6.x-2.6
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
21 Jul 2009 at 06:26 UTC
Updated:
3 Jan 2014 at 00:29 UTC
Jump to comment: Most recent
Comments
Comment #1
dawehneryou could add a custom field, for example Global: custom text.
For example
Then you can use jquery very easy
Comment #2
waltonjones commentedI am not really sure I follow you dereine. I created the Global:custom text field, but where do I call the jquery function?
Thanks for your help.
Comment #3
dawehneryou can call it, for example in your js file of your template etc. the js file has just to be included into the page.
Comment #4
waltonjones commentedI tried that, but I keep getting this error:
Parse error: parse error, expecting `T_VARIABLE' or `'$''
on the line with the function ()
Comment #5
dawehnerI gave you a javascript not a php code.
Comment #6
waltonjones commentedOK. Thanks. I guess I don't know how to do this. Maybe someone else can think of an easier way to make a copy text link?
It seems like I will need pretty specific instructions, since I know almost nothing about javascript.
Comment #7
waltonjones commentedI am learning a little. I created the global text field.
I added exactly what you told me to add to the bottom of my theme's js file, but I am getting the following javascript error in firebug.
$(".copy-link").clicked is not a function
script.js?V()script.js?V (line 13)
[Break on this error] $(".copy-link").clicked(function() {\n
Any ideas? I think I need to wrap it in a function, but which one?
Comment #8
merlinofchaos commentedYou want click() not clicked()
This isn't really a good conversation to be having in the Views issue queue, I'm afraid. Perhaps the Drupal forum, though getting good javascript people to help can be tough, there aren't enough of them.
Comment #9
waltonjones commentedSorry. You are right. Thanks. It was placed here out of my ignorance for where to put it. Thankfully I am learning slowly.
WJ