← Back to team overview

phpdevshell team mailing list archive

[Bug 692558] [NEW] Move JS theme init code to a function

 

Public bug reported:

When a page loads, the /themes/cloud/js/theme.js file has a .ready()
function which applies/removes classes to different elements.

I have added additional js that will allow a user to add and remove new
elements to the page, but when I add the element, the class changes
applied by themes.js are not applied, since they were run when the page
was loaded.

How can I have the .ready() function run again when the user adds a new
element to the page? Is there a way to call these functions from
javascript to run them again so the newly added elements will get the
class changes as well?

** Affects: phpdevshell
     Importance: Undecided
         Status: New

** Affects: phpdevshell/3.1
     Importance: Wishlist
     Assignee: Greg (gregfr)
         Status: Triaged

** Changed in: phpdevshell
     Assignee: (unassigned) => Greg (gregfr)

** Also affects: phpdevshell/3.1
   Importance: Undecided
       Status: New

** Changed in: phpdevshell/3.1
     Assignee: (unassigned) => Greg (gregfr)

** Changed in: phpdevshell/3.1
   Importance: Undecided => Wishlist

** Changed in: phpdevshell/3.1
       Status: New => Triaged

** Changed in: phpdevshell
     Assignee: Greg (gregfr) => (unassigned)

** Summary changed:

- Moved JS theme init code to a function
+ Move JS theme init code to a function

-- 
You received this bug notification because you are a member of
PHPDevShell, which is subscribed to PHPDevShell.
https://bugs.launchpad.net/bugs/692558

Title:
  Move JS theme init code to a function

Status in Open Source PHP RAD Framework with UI.:
  New
Status in PHPDevShell 3.1 series:
  Triaged

Bug description:
  When a page loads, the /themes/cloud/js/theme.js file has a .ready() function which applies/removes classes to different elements.

I have added additional js that will allow a user to add and remove new elements to the page, but when I add the element, the class changes applied by themes.js are not applied, since they were run when the page was loaded.

How can I have the .ready() function run again when the user adds a new element to the page? Is there a way to call these functions from javascript to run them again so the newly added elements will get the class changes as well?







Follow ups

References