Welcome Guest, Not a member yet? Register   Sign In
jquery
#1

[eluser]Harshala[/eluser]
Code:
$('<a/>', {
     html : 'This is a <strong>new</strong> link',
     'class' : 'new',
     href : 'foo.html'
});
#2

[eluser]noname525[/eluser]
vv
#3

[eluser]aquary[/eluser]
This is Codeigniter's code discussion, not Jquery discusstion.

And, you should have better read jquery documentation throughly since your selector does nothing except ONLY creating a new anchor element.
#4

[eluser]Harshala[/eluser]
after reading this, i just came to know that its working on anchor tag, the text will be placed at given url, but what is the class for?
#5

[eluser]CodeIgniteMe[/eluser]
[quote author="Harshala" date="1332825592"]after reading this, i just came to know that its working on anchor tag, the text will be placed at given url, but what is the class for?
[/quote]

I think you should review the following in the correct order
HTML
CSS
JavaScript
jQuery

'class' is an attribute for any html tag and is primarily used by CSS and JavaScript to style and/or identify specific of element/s by their class names.
#6

[eluser]Dave The Geek[/eluser]
Class is the classname that you are assigning the anchortag. this can be used for a number of things including CSS and JS/jQuery selection within code.

although, this probably would have been best asked on the jQuery forum




Theme © iAndrew 2016 - Forum software by © MyBB